Skip to content

Commit

Permalink
Moving the newly introducedd errors into ExecutionTracker
Browse files Browse the repository at this point in the history
  • Loading branch information
cristovaoth committed Oct 12, 2023
1 parent e5a977f commit b80933d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion contracts/core/GuardableModifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ abstract contract GuardableModifier is Module, Guardable, Modifier {
}
}

function sentOrSignedBy() private returns (address) {
function sentOrSignedBy() private view returns (address) {
if (modules[msg.sender] != address(0)) {
return msg.sender;
}
Expand Down
6 changes: 0 additions & 6 deletions contracts/core/Modifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ abstract contract Modifier is
/// @param sender The address of the sender.
error NotAuthorized(address sender);

/// @param hash already executed.
error HashAlreadyExecuted(bytes32 hash);

/// @param hash already executed.
error HashInvalidated(bytes32 hash);

/// `module` is invalid.
error InvalidModule(address module);

Expand Down
3 changes: 3 additions & 0 deletions contracts/signature/ExecutionTracker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ pragma solidity >=0.8.0 <0.9.0;

/// @title ExecutionTracker - A contract that keeps track of executed and invalidated hashes
contract ExecutionTracker {
error HashAlreadyExecuted(bytes32);
error HashInvalidated(bytes32);

mapping(address => mapping(bytes32 => bool)) public executed;
mapping(address => mapping(bytes32 => bool)) public invalidated;

Expand Down

0 comments on commit b80933d

Please sign in to comment.