reset_anvil_snapshot

Documentation for eth_defi.provider.anvil.reset_anvil_snapshot function.

reset_anvil_snapshot(web3, state)

Revert a shared Anvil backend to a stored snapshot and resave it.

evm_revert consumes the snapshot it restores. Because of this, the helper immediately creates a new snapshot after each reset so the same AnvilSnapshotState instance can be reused by the next test.

See AnvilSnapshotState for a pytest usage example.

Parameters
Return type

None