diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-28 19:47:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-28 19:47:44 +0800 |
commit | b3c251c1548e8f85a76cf1aef8bb698daa5e5ec7 (patch) | |
tree | 8b9cc141b147222f455cfd2d346fd3152a4c9cc5 /docs/solidity-by-example.rst | |
parent | 5bd6254449ec08d93973ef9b070d56e3a745c8ea (diff) | |
parent | 550d646b9727603f39aeaa432d718cd2bb51cf85 (diff) | |
download | dexon-solidity-b3c251c1548e8f85a76cf1aef8bb698daa5e5ec7.tar.gz dexon-solidity-b3c251c1548e8f85a76cf1aef8bb698daa5e5ec7.tar.zst dexon-solidity-b3c251c1548e8f85a76cf1aef8bb698daa5e5ec7.zip |
Merge pull request #2831 from ethereum/docs
Various doc updates
Diffstat (limited to 'docs/solidity-by-example.rst')
-rw-r--r-- | docs/solidity-by-example.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst index ca6b970c..139c8a42 100644 --- a/docs/solidity-by-example.rst +++ b/docs/solidity-by-example.rst @@ -535,6 +535,9 @@ Safe Remote Purchase enum State { Created, Locked, Inactive } State public state; + // Ensure that `msg.value` is an even number. + // Division will truncate if it is an odd number. + // Check via multiplication that it wasn't an odd number. function Purchase() payable { seller = msg.sender; value = msg.value / 2; |