diff options
author | Erik Kundt <bitshift@posteo.org> | 2018-07-11 21:57:07 +0800 |
---|---|---|
committer | Erik Kundt <bitshift@posteo.org> | 2018-07-16 20:49:55 +0800 |
commit | 893f4cf092c98d13116741d1ebc19846f6873536 (patch) | |
tree | 9449cbeb1abd76e2ca83804caa44c9f93f916de5 /test/contracts/Wallet.cpp | |
parent | 931794001e92cbfe99c91da037cf36a1808d9df1 (diff) | |
download | dexon-solidity-893f4cf092c98d13116741d1ebc19846f6873536.tar.gz dexon-solidity-893f4cf092c98d13116741d1ebc19846f6873536.tar.zst dexon-solidity-893f4cf092c98d13116741d1ebc19846f6873536.zip |
Specifies visibility in unit tests.
Diffstat (limited to 'test/contracts/Wallet.cpp')
-rw-r--r-- | test/contracts/Wallet.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/contracts/Wallet.cpp b/test/contracts/Wallet.cpp index 08470d8e..e22d6646 100644 --- a/test/contracts/Wallet.cpp +++ b/test/contracts/Wallet.cpp @@ -101,7 +101,7 @@ contract multiowned { // constructor is given number of sigs required to do protected "onlymanyowners" transactions // as well as the selection of addresses capable of confirming them. - constructor(address[] memory _owners, uint _required) { + constructor(address[] memory _owners, uint _required) public { m_numOwners = _owners.length + 1; m_owners[1] = uint(msg.sender); m_ownerIndex[uint(msg.sender)] = 1; @@ -173,11 +173,11 @@ contract multiowned { emit RequirementChanged(_newRequired); } - function isOwner(address _addr) returns (bool) { + function isOwner(address _addr) public returns (bool) { return m_ownerIndex[uint(_addr)] > 0; } - function hasConfirmed(bytes32 _operation, address _owner) view returns (bool) { + function hasConfirmed(bytes32 _operation, address _owner) public view returns (bool) { PendingState storage pending = m_pending[_operation]; uint ownerIndex = m_ownerIndex[uint(_owner)]; @@ -288,7 +288,7 @@ contract daylimit is multiowned { // METHODS // constructor - stores initial daily limit and records the present day's index. - constructor(uint _limit) { + constructor(uint _limit) public { m_dailyLimit = _limit; m_lastDay = today(); } @@ -348,7 +348,7 @@ contract multisig { // TODO: document function changeOwner(address _from, address _to) external; function execute(address _to, uint _value, bytes _data) external returns (bytes32); - function confirm(bytes32 _h) returns (bool); + function confirm(bytes32 _h) public returns (bool); } // usage: @@ -369,7 +369,7 @@ contract Wallet is multisig, multiowned, daylimit { // constructor - just pass on the owner array to the multiowned and // the limit to daylimit - constructor(address[] memory _owners, uint _required, uint _daylimit) payable + constructor(address[] memory _owners, uint _required, uint _daylimit) public payable multiowned(_owners, _required) daylimit(_daylimit) { } @@ -385,7 +385,7 @@ contract Wallet is multisig, multiowned, daylimit { emit Deposit(msg.sender, msg.value); } - // Outside-visible transact entry point. Executes transaction immediately if below daily spend limit. + // Outside-visible transact entry point. Executes transacion immediately if below daily spend limit. // If not, goes into multisig process. We provide a hash on return to allow the sender to provide // shortcuts for the other confirmations (allowing them to avoid replicating the _to, _value // and _data arguments). They still get the option of using them if they want, anyways. @@ -409,7 +409,7 @@ contract Wallet is multisig, multiowned, daylimit { // confirm a transaction through just the hash. we use the previous transactions map, m_txs, in order // to determine the body of the transaction from the hash provided. - function confirm(bytes32 _h) onlymanyowners(_h) returns (bool) { + function confirm(bytes32 _h) onlymanyowners(_h) public returns (bool) { if (m_txs[_h].to != 0x0000000000000000000000000000000000000000) { m_txs[_h].to.call.value(m_txs[_h].value)(m_txs[_h].data); emit MultiTransact(msg.sender, _h, m_txs[_h].value, m_txs[_h].to, m_txs[_h].data); |