diff options
author | chriseth <chris@ethereum.org> | 2018-09-12 23:39:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 23:39:16 +0800 |
commit | 9214c7c34f5e4501a50cb29de964bbf04131f9a3 (patch) | |
tree | fedf7b035e527103f178f9670bce4cbbc81d283d /test/compilationTests/zeppelin/crowdsale/RefundVault.sol | |
parent | 1994b51ef3eb8de3617efec9747979c9fb5ed453 (diff) | |
parent | 879251a78b2d4e26dc71299d2d7ca989d0855d61 (diff) | |
download | dexon-solidity-9214c7c34f5e4501a50cb29de964bbf04131f9a3.tar dexon-solidity-9214c7c34f5e4501a50cb29de964bbf04131f9a3.tar.gz dexon-solidity-9214c7c34f5e4501a50cb29de964bbf04131f9a3.tar.bz2 dexon-solidity-9214c7c34f5e4501a50cb29de964bbf04131f9a3.tar.lz dexon-solidity-9214c7c34f5e4501a50cb29de964bbf04131f9a3.tar.xz dexon-solidity-9214c7c34f5e4501a50cb29de964bbf04131f9a3.tar.zst dexon-solidity-9214c7c34f5e4501a50cb29de964bbf04131f9a3.zip |
Merge pull request #4953 from ethereum/addressPayableTests
Update test suite to use address payable.
Diffstat (limited to 'test/compilationTests/zeppelin/crowdsale/RefundVault.sol')
-rw-r--r-- | test/compilationTests/zeppelin/crowdsale/RefundVault.sol | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/compilationTests/zeppelin/crowdsale/RefundVault.sol b/test/compilationTests/zeppelin/crowdsale/RefundVault.sol index b7db8ef2..ef1d8061 100644 --- a/test/compilationTests/zeppelin/crowdsale/RefundVault.sol +++ b/test/compilationTests/zeppelin/crowdsale/RefundVault.sol @@ -15,20 +15,20 @@ contract RefundVault is Ownable { enum State { Active, Refunding, Closed } mapping (address => uint256) public deposited; - address public wallet; + address payable public wallet; State public state; event Closed(); event RefundsEnabled(); event Refunded(address indexed beneficiary, uint256 weiAmount); - constructor(address _wallet) public { + constructor(address payable _wallet) public { require(_wallet != address(0x0)); wallet = _wallet; state = State.Active; } - function deposit(address investor) public onlyOwner payable { + function deposit(address payable investor) public onlyOwner payable { require(state == State.Active); deposited[investor] = deposited[investor].add(msg.value); } @@ -46,7 +46,7 @@ contract RefundVault is Ownable { emit RefundsEnabled(); } - function refund(address investor) public { + function refund(address payable investor) public { require(state == State.Refunding); uint256 depositedValue = deposited[investor]; deposited[investor] = 0; |