From 559fa58ddf3d6b32242286e392b2695d56594423 Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 13 Apr 2018 18:36:33 +0200 Subject: Document ABI encoding functions. --- docs/miscellaneous.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/miscellaneous.rst') diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst index 8270727f..c7c32528 100644 --- a/docs/miscellaneous.rst +++ b/docs/miscellaneous.rst @@ -317,6 +317,11 @@ The following is the order of precedence for operators, listed in order of evalu Global Variables ================ +- ``abi.encode(...) returns (bytes)``: :ref:`ABI `-encodes the given arguments +- ``abi.encodePacked(...) returns (bytes)``: Performes :ref:`packed encoding ` of the given arguments +- ``abi.encodeWithSelector(bytes4 selector, ...) returns (bytes)``: :ref:`ABI `-encodes the given arguments + starting from the second and prepends the given four-byte selector +- ``abi.encodeWithSignature(string signature, ...) returns (bytes)``: Equivalent to ``abi.encodeWithSelector(bytes4(keccak256(signature), ...)``` - ``block.blockhash(uint blockNumber) returns (bytes32)``: hash of the given block - only works for 256 most recent, excluding current, blocks - deprecated in version 0.4.22 and replaced by ``blockhash(uint blockNumber)``. - ``block.coinbase`` (``address``): current block miner's address - ``block.difficulty`` (``uint``): current block difficulty -- cgit v1.2.3