Specifies visibility in unit tests.

This commit is contained in:
Erik Kundt
2018-07-16 14:49:55 +02:00
parent 931794001e
commit 893f4cf092
9 changed files with 150 additions and 150 deletions
+8 -8
View File
@@ -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);