aboutsummaryrefslogtreecommitdiffstats
path: root/docs/structure-of-a-contract.rst
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-09-05 22:29:08 +0800
committerchriseth <c@ethdev.com>2016-09-07 01:11:41 +0800
commit4f5a95d569408e6a0a94c54b1eb39ea62b873c5e (patch)
treee0624ae19d837fb8e2acf9f828c4464e9e788c60 /docs/structure-of-a-contract.rst
parentfbe0edb32c973166efbd5c0ac556f37fd38584d6 (diff)
downloaddexon-solidity-4f5a95d569408e6a0a94c54b1eb39ea62b873c5e.tar.gz
dexon-solidity-4f5a95d569408e6a0a94c54b1eb39ea62b873c5e.tar.zst
dexon-solidity-4f5a95d569408e6a0a94c54b1eb39ea62b873c5e.zip
Update documentation to version 0.4.0.
Diffstat (limited to 'docs/structure-of-a-contract.rst')
-rw-r--r--docs/structure-of-a-contract.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/structure-of-a-contract.rst b/docs/structure-of-a-contract.rst
index 1036289a..c7af0c8c 100644
--- a/docs/structure-of-a-contract.rst
+++ b/docs/structure-of-a-contract.rst
@@ -43,7 +43,7 @@ Functions are the executable units of code within a contract.
pragma solidity ^0.4.0;
contract SimpleAuction {
- function bid() { // Function
+ function bid() payable { // Function
// ...
}
}
@@ -69,7 +69,7 @@ Function modifiers can be used to amend the semantics of functions in a declarat
modifier onlySeller() { // Modifier
if (msg.sender != seller) throw;
- _
+ _;
}
function abort() onlySeller { // Modifier usage
@@ -91,7 +91,7 @@ Events are convenience interfaces with the EVM logging facilities.
contract SimpleAuction {
event HighestBidIncreased(address bidder, uint amount); // Event
- function bid() {
+ function bid() payable {
// ...
HighestBidIncreased(msg.sender, msg.value); // Triggering event
}