Skip to content

Conversation

@forshtat
Copy link
Member

No description provided.


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.

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)

export interface BaseAltMempoolRule {
enabled?: boolean
exceptions?: RuleException[]
}
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.

3 participants