Skip to content

Commit

Permalink
replace onlyOwner
Browse files Browse the repository at this point in the history
  • Loading branch information
bulbozaur committed Aug 7, 2024
1 parent 432f15e commit 94e29fa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion contracts/Executor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ contract Executor is IExternalExecutor, Ownable {
address target,
uint256 value,
bytes calldata payload
) external payable onlyOwner returns (bytes memory result) {
) external payable returns (bytes memory result) {
_checkOwner();
result = Address.functionCallWithValue(target, payload, value);
}

Expand Down
13 changes: 9 additions & 4 deletions contracts/committees/HashConsensus.sol
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ abstract contract HashConsensus is Ownable {
/// @dev Only callable by the owner
/// @param newMember The address of the new member
/// @param newQuorum The new quorum value
function addMember(address newMember, uint256 newQuorum) public onlyOwner {
function addMember(address newMember, uint256 newQuorum) public {
_checkOwner();
_addMember(newMember);

if (newQuorum == 0 || newQuorum > _members.length()) {
Expand All @@ -127,7 +128,9 @@ abstract contract HashConsensus is Ownable {
/// @dev Only callable by the owner
/// @param memberToRemove The address of the member to remove
/// @param newQuorum The new quorum value
function removeMember(address memberToRemove, uint256 newQuorum) public onlyOwner {
function removeMember(address memberToRemove, uint256 newQuorum) public {
_checkOwner();

if (!_members.contains(memberToRemove)) {
revert IsNotMember();
}
Expand Down Expand Up @@ -159,15 +162,17 @@ abstract contract HashConsensus is Ownable {
/// @notice Sets the timelock duration
/// @dev Only callable by the owner
/// @param timelock The new timelock duration in seconds
function setTimelockDuration(uint256 timelock) public onlyOwner {
function setTimelockDuration(uint256 timelock) public {
_checkOwner();
timelockDuration = timelock;
emit TimelockDurationSet(timelock);
}

/// @notice Sets the quorum value
/// @dev Only callable by the owner
/// @param newQuorum The new quorum value
function setQuorum(uint256 newQuorum) public onlyOwner {
function setQuorum(uint256 newQuorum) public {
_checkOwner();
if (newQuorum == 0 || newQuorum > _members.length()) {
revert InvalidQuorum();
}
Expand Down

0 comments on commit 94e29fa

Please sign in to comment.