Skip to content

extend eth_createAccessList with stateOverrides #27630

@huahuayu

Description

@huahuayu

Rationale

Think about this case, you need to create accesslist for the second tx.

Let's say two txs are tx0 & tx1, tx0 has an impact on tx1 execution, if tx0 failed, tx1 fails (e.g. router approve tx & swap tx).

eth_createAccessList can be used to create acceelist before you send tx0, but for tx1, you can't do it in the same way, because tx0's state changes are not applied, tx1 will fail.

Implementation

Maybe it can be done by extend

CreateAccessList(ctx context.Context, msg ethereum.CallMsg)

to

CreateAccessList(ctx context.Context, msg ethereum.CallMsg, stateOverrides ...*ethapi.StateOverride)

So first I can find the state changes by tx0, then call eth_createAccessList with the state changes. e.g. approved balance / erc20 balance changes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions