diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-09-18 18:08:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-18 18:08:45 +0800 |
commit | 1e3b7a7b044a4a99d2f951222a9225bd9e115feb (patch) | |
tree | 21c67835c4dac732eade945a1e22ff5574dd9ca0 | |
parent | 2409986cf305c25d6a3d46c122521c7769dc7cd7 (diff) | |
parent | d51cb16ed0f10adb088ffe74b2fdb4131a00cbf9 (diff) | |
download | dexon-solidity-1e3b7a7b044a4a99d2f951222a9225bd9e115feb.tar dexon-solidity-1e3b7a7b044a4a99d2f951222a9225bd9e115feb.tar.gz dexon-solidity-1e3b7a7b044a4a99d2f951222a9225bd9e115feb.tar.bz2 dexon-solidity-1e3b7a7b044a4a99d2f951222a9225bd9e115feb.tar.lz dexon-solidity-1e3b7a7b044a4a99d2f951222a9225bd9e115feb.tar.xz dexon-solidity-1e3b7a7b044a4a99d2f951222a9225bd9e115feb.tar.zst dexon-solidity-1e3b7a7b044a4a99d2f951222a9225bd9e115feb.zip |
Merge pull request #5005 from ethereum/ecrecover_refer_address
Add a link from ecrecover to address (typecast)
-rw-r--r-- | docs/units-and-global-variables.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/units-and-global-variables.rst b/docs/units-and-global-variables.rst index 2e1b90a0..d6ef393e 100644 --- a/docs/units-and-global-variables.rst +++ b/docs/units-and-global-variables.rst @@ -151,6 +151,11 @@ Mathematical and Cryptographic Functions recover the address associated with the public key from elliptic curve signature or return zero on error (`example usage <https://ethereum.stackexchange.com/q/1777/222>`_) +.. note:: + Function ``ecrecover`` returns an ``address``, and not an ``address + payable``. See :ref:`address payable<address>` for conversion, in case you need + to transfer funds to the recovered address. + It might be that you run into Out-of-Gas for ``sha256``, ``ripemd160`` or ``ecrecover`` on a *private blockchain*. The reason for this is that those are implemented as so-called precompiled contracts and these contracts only really exist after they received the first message (although their contract code is hardcoded). Messages to non-existing contracts are more expensive and thus the execution runs into an Out-of-Gas error. A workaround for this problem is to first send e.g. 1 Wei to each of the contracts before you use them in your actual contracts. This is not an issue on the official or test net. .. index:: balance, send, transfer, call, callcode, delegatecall, staticcall |