diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-09-13 23:30:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-13 23:30:54 +0800 |
commit | e7daed68c1977683546ac3e72d4f84ff538f6711 (patch) | |
tree | bb2595e6cc12d420c22bc0373bcb5a7f81c3b0bb /docs/solidity-by-example.rst | |
parent | 5aa5fa78f32c89fcf8f635db026d18a6ba8ef132 (diff) | |
parent | ae35a58124852eda9a5e6bf67f9976198d2f9c0f (diff) | |
download | dexon-solidity-e7daed68c1977683546ac3e72d4f84ff538f6711.tar dexon-solidity-e7daed68c1977683546ac3e72d4f84ff538f6711.tar.gz dexon-solidity-e7daed68c1977683546ac3e72d4f84ff538f6711.tar.bz2 dexon-solidity-e7daed68c1977683546ac3e72d4f84ff538f6711.tar.lz dexon-solidity-e7daed68c1977683546ac3e72d4f84ff538f6711.tar.xz dexon-solidity-e7daed68c1977683546ac3e72d4f84ff538f6711.tar.zst dexon-solidity-e7daed68c1977683546ac3e72d4f84ff538f6711.zip |
Merge pull request #4911 from ethereum/addressPayable
Payable and non-payable address type.
Diffstat (limited to 'docs/solidity-by-example.rst')
-rw-r--r-- | docs/solidity-by-example.rst | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst index 72b3581b..0b183ca5 100644 --- a/docs/solidity-by-example.rst +++ b/docs/solidity-by-example.rst @@ -231,7 +231,7 @@ activate themselves. // Parameters of the auction. Times are either // absolute unix timestamps (seconds since 1970-01-01) // or time periods in seconds. - address public beneficiary; + address payable public beneficiary; uint public auctionEndTime; // Current state of the auction. @@ -258,7 +258,7 @@ activate themselves. /// beneficiary address `_beneficiary`. constructor( uint _biddingTime, - address _beneficiary + address payable _beneficiary ) public { beneficiary = _beneficiary; auctionEndTime = now + _biddingTime; @@ -396,7 +396,7 @@ high or low invalid bids. uint deposit; } - address public beneficiary; + address payable public beneficiary; uint public biddingEnd; uint public revealEnd; bool public ended; @@ -421,7 +421,7 @@ high or low invalid bids. constructor( uint _biddingTime, uint _revealTime, - address _beneficiary + address payable _beneficiary ) public { beneficiary = _beneficiary; biddingEnd = now + _biddingTime; @@ -545,8 +545,8 @@ Safe Remote Purchase contract Purchase { uint public value; - address public seller; - address public buyer; + address payable public seller; + address payable public buyer; enum State { Created, Locked, Inactive } State public state; @@ -990,11 +990,11 @@ The full contract pragma solidity ^0.4.24; contract SimplePaymentChannel { - address public sender; // The account sending payments. - address public recipient; // The account receiving the payments. + address payable public sender; // The account sending payments. + address payable public recipient; // The account receiving the payments. uint256 public expiration; // Timeout in case the recipient never closes. - constructor (address _recipient, uint256 duration) + constructor (address payable _recipient, uint256 duration) public payable { |