-
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
refactor: update license + docs + var renaming #244
Conversation
Summary by OctaneNew ContractsNo new contracts were added in this PR. Updated Contracts
🔗 Commit Hash: 2c744c2 |
Contract sizes: | Contract | Size (B) | Margin (B) |
|-------------------------------|----------|------------|
| AccountFactory | 4,814 | 19,762 |
| AllowlistModule | 9,230 | 15,346 |
| ECDSAValidationModule | 3,646 | 20,930 |
| ModularAccount | 26,520 | -1,944 |
| NativeTokenLimitModule | 4,714 | 19,862 |
| PaymasterGuardModule | 1,797 | 22,779 |
| SemiModularAccountBytecode | 28,371 | -3,795 |
| SemiModularAccountStorageOnly | 28,906 | -4,330 |
| TimeRangeModule | 2,000 | 22,576 |
| WebauthnValidationModule | 7,854 | 16,722 | Code coverage:
|
Overview
Detailed findings
|
@@ -132,7 +153,7 @@ contract AllowlistModule is IExecutionHookModule, IValidationHookModule, BaseMod | |||
external | |||
view | |||
override | |||
noValidationData(userOp.signature) | |||
assertNoData(userOp.signature) |
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.
Ok I'm probably dumb - could u explain this line? The UO signature has to be empty to not revert, but wouldn't that cause the UO validation to fail?
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 believe the ExecutionLib.invokeUserOpCallBuffer
manipulates the signature field to not include the actual signature but only extra data after. And those hooks with this modifier wants to make sure there isnt any extra data sent (can be a form of inflation attack through attaching large unused data).
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.
Have some q's otherwise LGTM
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.
Some suggestions inline. Would recommend a spell check extension if you don't have it installed :D
error UnexpectedDataPassed(); | ||
|
||
modifier noValidationData(bytes calldata validationData) { | ||
if (validationData.length > 0) { | ||
revert UnexpectedValidationData(); | ||
modifier assertNoData(bytes calldata data) { | ||
if (data.length > 0) { | ||
revert UnexpectedDataPassed(); |
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.
cc @adamegyed on this naming update
/// @notice This module allows for the setting and enforcement of allowlists with ERC20 spend limit for avalidation | ||
/// entity. |
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.
Have we defined what a "validation entity" is anywhere? Maybe clearer to say this:
/// @notice This module allows for the setting and enforcement of allowlists with ERC20 spend limit for avalidation | |
/// entity. | |
/// @notice This module allows for the setting and enforcement of allowlists with ERC20 spend limit for a validation | |
/// function and a given entity ID. |
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.
Or maybe module entity? Since ModuleEntity
is defined as the address + entity ID
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.
Updated working to avoid confusing terms.
No sweat on the bullet spacing stuff - let's do a pass on all the files for consistency later! |
Motivation
The license and docs need to be updated.
Solution
Updated license to what agreed upon.
Updated docs to be more consistent and clear.
Update some var names.