-
Notifications
You must be signed in to change notification settings - Fork 228
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
AA-522: Support alt-mempool configurations (WIP) #240
base: master
Are you sure you want to change the base?
Conversation
@@ -25,15 +27,50 @@ export interface BaseAltMempoolRule { | |||
} | |||
|
|||
export interface AltMempoolConfig { | |||
[mempoolId: number]: { [rule in ERC7562Rule]?: BaseAltMempoolRule } | |||
[mempoolId: string]: { [rule in ERC7562Rule]?: BaseAltMempoolRule } |
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.
using erc7562 rules as index is not that great: there is no easy 1-1 mapping from rule to code: many rules have code split in several places, and implementation that relates to multiple rules.
|
||
type EnterOpcode = 'CALL' | 'DELEGATECALL' | 'CALLCODE' | 'STATICCALL' | 'CREATE' | 'CREATE2' | ||
export type EnterOpcode = 'CALL' | 'DELEGATECALL' | 'CALLCODE' | 'STATICCALL' | 'CREATE' | 'CREATE2' | ||
|
||
export interface AltMempoolRuleExceptionBase { | ||
role?: Role |
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.
probably addresses, to apply same rule to multiple addresses.
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.
depth is very error-prone: for any depth other than 1, one can wrap a contract to use 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.
enterMethodSelector: should be an array: (e.g. allow all standard token APIs)
@@ -25,15 +27,50 @@ export interface BaseAltMempoolRule { | |||
} |
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.
RuleException: its nice that javascript allows dynamic typing (string/object), but it makes it harder to parse.
better use optional members. e.g: exceptions: [ { "role":"account" } ]
No description provided.