-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement updates from internal review #9
Conversation
spengrah
commented
Jan 30, 2024
- changes the name to HatsAccount
- cleans up comments, natspec, and dependencies
- more sensible rejection threshold
- more efficient valid vote counting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the following function:
function isExecutableNow(bytes32 _proposalId, address[] calldata _voters) external view returns (bool) {
_checkExecutableNow(_proposalId, _voters);
return true;
}
_checkExecutableNow
reverts if not executable, returns true
if yes. A slightly different design here can be that _checkExecutableNow
won't have a return value at all. Then the view function isExecutableNow
can have the actual logic and return true/false, and the internal_checkExecutableNow
will use it and revert or not. Same also with isRejectableNow
Wonder if we want to add the tx parameters to the function execute(address _to, uint256 _value, bytes calldata _data, uint8 _operation)
external
payable
returns (bytes memory result)
{
if (!_isValidSigner(msg.sender)) revert InvalidSigner();
// increment the state var
_beforeExecute();
// execute the call, routing delegatecalls through the sandbox, and bubble up the result
result = LibHatsAccount._execute(_to, _value, _data, _operation);
// log the executor
emit TxExecuted(msg.sender);
} |
@gershido my thinking in leaving them out was that we could get them from the tx args. But happy to include them in the event if that would improve things on the subgraph side |
Lgtm! Regarding the |