-
Notifications
You must be signed in to change notification settings - Fork 5
[EXPERIMENTAL] [DO NOT MERGE] chore: ID-3927: ERC 7579 compliance adopting from Rhinestone's version of Nexus smart account #70
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
base: chore/ID-3927-ERC7579-solidity-version
Are you sure you want to change the base?
Conversation
/// @dev Primary check: caller is an executor module. Secondary check: signature format indicates validator module. | ||
function _shouldUseERC7579Validation() internal view returns (bool) { | ||
// Primary: Check if caller is an executor module | ||
if (_getAccountStorage().executors.contains(msg.sender)) { |
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.
but msg.sender in this case is the contract that's trying to validate the signature right? this does work for our intentexecutor, but in the case of a permit2 transfer or compact claim. _shouldUseERC7579Validation() returns false. so you lose single singature flows. target/preclaimops (executions) need to be signed differently than the permit2 / compact EIP712.
I would stick to the proposed solution in the call where you check against installed 7579 validators via the sig = abi.encodePacked(validatorModule, sig).
that's how much 7579 accounts do it.
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.
I've had to make a small change to your suggestion because there is no valid DEFAULT_VALIDATOR
in the current setup and its hard coded to be the zero address.
…act size savings.
…ootstrapping contract.
This version of the Passport Wallet Smart Account upgrade adopts code heavily from Rhinestone's Nexus smart account implementation.
I've stripped out some items that I've deemed unnecessary for this initial PoC like UUPSUpgradeable, ComposableExecution etc.
Pre-work:
0.8.27
here and evm_version (in this PR) tocancun
to comply with the requirements of newly added project dependencies - e.g solady.Key objectives:
function executeFromExecutor(bytes32 mode, bytes calldata executionCalldata) external returns (bytes[] memory returnData);
- this is implemented in MainModuleDynamicAuthV2.sol