-
Notifications
You must be signed in to change notification settings - Fork 25
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: fix IModularAccount to return address of the account for native functions #208
feat: fix IModularAccount to return address of the account for native functions #208
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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 agree that this is the better design. Let's do it!
05058df
to
81abe15
Compare
Summary by OctaneNew ContractsNo new contracts were added in this PR. Updated Contracts
🔗 Commit Hash: 81abe15 |
OverviewOctane AI analysis has finished. No vulnerabilities were found. Cheers! 🎉🎉🎉 🔗 Commit Hash: 81abe15 |
… functions (#208) The reference implementation currently returns `address(this)` which is the address of the account for `ExecutionDataView`'s `module` field. However, the standard currently contradicts this by saying we should return `address(0)` for native functions. The better design seems to be to return the address of the account since the zero address would also be returned for nonexistent selectors, and it would be difficult to differentiate in those cases. The client should have the address of the account handy so it'd be easy to compare it against what is returned to check if it's a native function or not. Thanks @0xrubes for bringing this up!
The reference implementation currently returns
address(this)
which is the address of the account forExecutionDataView
'smodule
field. However, the standard currently contradicts this by saying we should returnaddress(0)
for native functions.The better design seems to be to return the address of the account since the zero address would also be returned for nonexistent selectors, and it would be difficult to differentiate in those cases.
The client should have the address of the account handy so it'd be easy to compare it against what is returned to check if it's a native function or not.
Thanks @0xrubes for bringing this up!