diff options
author | William Morriss <wjmelements@gmail.com> | 2017-10-09 04:24:27 +0800 |
---|---|---|
committer | William Morriss <wjmelements@gmail.com> | 2017-10-09 04:24:27 +0800 |
commit | c3ec0beba553ccb5653c4d38c32ef9d70e48471d (patch) | |
tree | 571a746f03a9d17eca16872d4b4b427d896a0c37 /docs | |
parent | 6c09e32c3fff143bd71d82d54d8599bee231222a (diff) | |
download | dexon-solidity-c3ec0beba553ccb5653c4d38c32ef9d70e48471d.tar dexon-solidity-c3ec0beba553ccb5653c4d38c32ef9d70e48471d.tar.gz dexon-solidity-c3ec0beba553ccb5653c4d38c32ef9d70e48471d.tar.bz2 dexon-solidity-c3ec0beba553ccb5653c4d38c32ef9d70e48471d.tar.lz dexon-solidity-c3ec0beba553ccb5653c4d38c32ef9d70e48471d.tar.xz dexon-solidity-c3ec0beba553ccb5653c4d38c32ef9d70e48471d.tar.zst dexon-solidity-c3ec0beba553ccb5653c4d38c32ef9d70e48471d.zip |
remove auctionStart
Diffstat (limited to 'docs')
-rw-r--r-- | docs/solidity-by-example.rst | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst index 139c8a42..7b28296f 100644 --- a/docs/solidity-by-example.rst +++ b/docs/solidity-by-example.rst @@ -221,7 +221,7 @@ activate themselves. // absolute unix timestamps (seconds since 1970-01-01) // or time periods in seconds. address public beneficiary; - uint public auctionStart; + uint public auctionEnd; uint public biddingTime; // Current state of the auction. @@ -251,7 +251,7 @@ activate themselves. address _beneficiary ) { beneficiary = _beneficiary; - auctionStart = now; + auctionEnd = now + biddingTime; biddingTime = _biddingTime; } @@ -268,7 +268,7 @@ activate themselves. // Revert the call if the bidding // period is over. - require(now <= (auctionStart + biddingTime)); + require(now <= auctionEnd); // If the bid is not higher, send the // money back. @@ -322,7 +322,7 @@ activate themselves. // external contracts. // 1. Conditions - require(now >= (auctionStart + biddingTime)); // auction did not yet end + require(now >= auctionEnd); // auction did not yet end require(!ended); // this function has already been called // 2. Effects @@ -382,7 +382,6 @@ high or low invalid bids. } address public beneficiary; - uint public auctionStart; uint public biddingEnd; uint public revealEnd; bool public ended; @@ -410,7 +409,6 @@ high or low invalid bids. address _beneficiary ) { beneficiary = _beneficiary; - auctionStart = now; biddingEnd = now + _biddingTime; revealEnd = biddingEnd + _revealTime; } |