-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat: add 7702 compatible semi modular account #288
base: develop
Are you sure you want to change the base?
Conversation
Summary by OctaneNew Contracts
Updated ContractsNo contracts were updated in this PR. 🔗 Commit Hash: 29f57fe |
Contract sizes: | Contract | Runtime Size (B) | Initcode Size (B) | Runtime Margin (B) | Initcode Margin (B) |
|-------------------------------|------------------|-------------------|--------------------|---------------------|
| AccountFactory | 4,814 | 5,239 | 19,762 | 43,913 |
| AllowlistModule | 9,903 | 9,930 | 14,673 | 39,222 |
| ExecutionInstallDelegate | 5,714 | 5,760 | 18,862 | 43,392 |
| ModularAccount | 21,973 | 28,676 | 2,603 | 20,476 |
| NativeFunctionDelegate | 434 | 461 | 24,142 | 48,691 |
| NativeTokenLimitModule | 4,449 | 4,476 | 20,127 | 44,676 |
| PaymasterGuardModule | 1,845 | 1,872 | 22,731 | 47,280 |
+| SemiModularAccount7702 | 23,026 | 29,729 | 1,550 | 19,423 |
| SemiModularAccountBytecode | 23,275 | 29,978 | 1,301 | 19,174 |
| SemiModularAccountStorageOnly | 23,769 | 30,472 | 807 | 18,680 |
| SingleSignerValidationModule | 3,646 | 3,673 | 20,930 | 45,479 |
| TimeRangeModule | 2,000 | 2,027 | 22,576 | 47,125 |
| WebAuthnValidationModule | 7,854 | 7,881 | 16,722 | 41,271 | Code coverage:
|
OverviewOctane AI analysis has finished. No vulnerabilities were found. Cheers! 🎉🎉🎉 🔗 Commit Hash: 29f57fe |
1e1c931
to
29f57fe
Compare
/// @notice An implementation of a semi-modular account which reads the signer as the address(this). | ||
/// @dev Inherits SemiModularAccountBase. This account can be used as the delegate contract of an EOA with | ||
/// EIP-7702, where address(this) (aka the EOA address) is the default fallback signer. | ||
contract SemiModularAccount7702 is SemiModularAccountBase { |
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.
[Discussed offline, but documenting here for alignment]
Only callout here is that ModularAccountBase has the upgradeToAndCall
function which doesn't make sense for the 7702 flow. If we want to tidy things up a bit and reduce an external function, we can probably pull this function out into another base class and exclude it here. Is this worth it? cc @alchemyplatform/contractoors .
Motivation
Support EIP-7702 EOA delegation with semi modular account.
Solution
Default fallback signer to
address(this)
aka EOA address for 7702 EOA account.