Skip to content
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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

forshtat
Copy link
Contributor

No description provided.

@@ -25,15 +27,50 @@ export interface BaseAltMempoolRule {
}

export interface AltMempoolConfig {
[mempoolId: number]: { [rule in ERC7562Rule]?: BaseAltMempoolRule }
[mempoolId: string]: { [rule in ERC7562Rule]?: BaseAltMempoolRule }
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

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 {
}
Copy link
Contributor

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" } ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants