diff options
author | chriseth <chris@ethereum.org> | 2018-04-14 00:36:33 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-04-14 00:36:33 +0800 |
commit | 559fa58ddf3d6b32242286e392b2695d56594423 (patch) | |
tree | 2336e003d25a9709e214010fdb8d80670d4b2a63 /docs/miscellaneous.rst | |
parent | 2001cc6bdca87d715380b15f11c797666528e040 (diff) | |
download | dexon-solidity-559fa58ddf3d6b32242286e392b2695d56594423.tar dexon-solidity-559fa58ddf3d6b32242286e392b2695d56594423.tar.gz dexon-solidity-559fa58ddf3d6b32242286e392b2695d56594423.tar.bz2 dexon-solidity-559fa58ddf3d6b32242286e392b2695d56594423.tar.lz dexon-solidity-559fa58ddf3d6b32242286e392b2695d56594423.tar.xz dexon-solidity-559fa58ddf3d6b32242286e392b2695d56594423.tar.zst dexon-solidity-559fa58ddf3d6b32242286e392b2695d56594423.zip |
Document ABI encoding functions.
Diffstat (limited to 'docs/miscellaneous.rst')
-rw-r--r-- | docs/miscellaneous.rst | 5 |
1 files changed, 5 insertions, 0 deletions
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 <ABI>`-encodes the given arguments +- ``abi.encodePacked(...) returns (bytes)``: Performes :ref:`packed encoding <abi_packed_mode>` of the given arguments +- ``abi.encodeWithSelector(bytes4 selector, ...) returns (bytes)``: :ref:`ABI <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 |