Skip to content

Commit

Permalink
Merge pull request #15 from coinbase/wilson/refactor-multiownable
Browse files Browse the repository at this point in the history
cleanup comments
  • Loading branch information
wilsoncusack authored Mar 5, 2024
2 parents ce796de + 3b53115 commit 4b1ec9c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion .gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ TestCanSkipChainIdValidation:test_approvedSelectorsReturnTrue() (gas: 15889)
TestCanSkipChainIdValidation:test_otherSelectorsReturnFalse() (gas: 12491)
TestExecuteWithoutChainIdValidation:testExecute() (gas: 424683)
TestExecuteWithoutChainIdValidation:testExecuteBatch() (gas: 729020)
TestExecuteWithoutChainIdValidation:testExecuteBatch(uint256) (runs: 256, μ: 3421418, ~: 3274019)
TestExecuteWithoutChainIdValidation:testExecuteBatch(uint256) (runs: 256, μ: 3419049, ~: 3273850)
TestExecuteWithoutChainIdValidation:test__codesize() (gas: 48980)
TestExecuteWithoutChainIdValidation:test__codesize() (gas: 49215)
TestExecuteWithoutChainIdValidation:test_canChangeOwnerWithoutChainId() (gas: 287952)
Expand Down
4 changes: 0 additions & 4 deletions src/MultiOwnable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@ contract MultiOwnable {
}

/// @dev convenience function to add address owner
/// can be used if nextOwnerIndex < 255
function addOwnerAddress(address owner) public virtual onlyOwner {
_addOwner(abi.encode(owner));
}

/// @dev convenience function to add passkey owner
/// can be used if nextOwnerIndex < 255
function addOwnerPublicKey(bytes32 x, bytes32 y) public virtual onlyOwner {
_addOwner(abi.encode(x, y));
}
Expand Down Expand Up @@ -93,8 +91,6 @@ contract MultiOwnable {
}
}

/// @dev convenience function that can be used to add the first
/// 255 owners.
function _addOwner(bytes memory owner) internal virtual {
_addOwnerAtIndex(owner, _getMultiOwnableStorage().nextOwnerIndex++);
}
Expand Down

0 comments on commit 4b1ec9c

Please sign in to comment.