matter-labs / era-test-node

In-memory node that can be used for integration testing and debugging.
https://matter-labs.github.io/era-test-node
Apache License 2.0
313 stars 76 forks source link

feat: implement `anvil_setChainId` API endpoint #426

Open itegulov opened 3 days ago

itegulov commented 3 days ago

A method to switch chain id programatically without restart:

#[rpc(name = "anvil_setBlockGasLimit")]
fn set_block_gas_limit(&self, limit: U256) -> RpcResult<bool>;

Useful when starting a new fork with anvil_reset (this flow should be tested as I am not sure we even support switching from pure local to fork via reset).