diff options
author | João Vítor <joaovmferreira@gmail.com> | 2018-06-04 05:20:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-04 05:20:53 +0800 |
commit | 1db78a1660313ab0aa5228094e690de881e1128f (patch) | |
tree | 337d1e1ded18e601ffe3a03083c3ca52e9dde720 /docs/solidity-by-example.rst | |
parent | 94381c67b9c070d7580ccdda015b375e0495a3ea (diff) | |
download | dexon-solidity-1db78a1660313ab0aa5228094e690de881e1128f.tar.gz dexon-solidity-1db78a1660313ab0aa5228094e690de881e1128f.tar.zst dexon-solidity-1db78a1660313ab0aa5228094e690de881e1128f.zip |
fix recoverSigner function
Diffstat (limited to 'docs/solidity-by-example.rst')
-rw-r--r-- | docs/solidity-by-example.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst index b1bc11d9..52beb862 100644 --- a/docs/solidity-by-example.rst +++ b/docs/solidity-by-example.rst @@ -792,7 +792,7 @@ The full contract mapping(uint256 => bool) usedNonces; - function ReceiverPays() public payable {} + constructor() public payable {} function claimPayment(uint256 amount, uint256 nonce, bytes signature) public { require(!usedNonces[nonce]); @@ -801,7 +801,7 @@ The full contract // this recreates the message that was signed on the client bytes32 message = prefixed(keccak256(msg.sender, amount, nonce, this)); - require(recoverSigner(message,sig) == owner); + require(recoverSigner(message, signature) == owner); msg.sender.transfer(amount); } @@ -841,7 +841,7 @@ The full contract pure returns (address) { - uint8; + uint8 v; bytes32 r; bytes32 s; |