Skip to content

AA-522: Support alt-mempool configurations (WIP)#240

Open
forshtat wants to merge 8 commits into
masterfrom
AA-522-alt-mempool-testing
Open

AA-522: Support alt-mempool configurations (WIP)#240
forshtat wants to merge 8 commits into
masterfrom
AA-522-alt-mempool-testing

Conversation

@forshtat
Copy link
Copy Markdown
Member

No description provided.


export interface AltMempoolConfig {
[mempoolId: number]: { [rule in ERC7562Rule]?: BaseAltMempoolRule }
[mempoolId: string]: { [rule in ERC7562Rule]?: BaseAltMempoolRule }
Copy link
Copy Markdown
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.

export type EnterOpcode = 'CALL' | 'DELEGATECALL' | 'CALLCODE' | 'STATICCALL' | 'CREATE' | 'CREATE2'

export interface AltMempoolRuleExceptionBase {
role?: Role
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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