Expand description
Foundryβs main executor backend abstraction and implementation.
Modules§
- cow πA wrapper around
Backend
that is clone-on-write used for fuzzing. - diagnostic π
- error π
- in_
memory_ πdb In-memory database. - snapshot π
Structs§
- Provides the underlying
revm::Database
implementation. - Container type for various Backend related data
- Represents a state snapshot taken during evm execution
- A shareable Block database
- relevant identifying markers in the context of BlockchainDb
- A wrapper around
Backend
that ensures onlyrevm::DatabaseRef
functions are called. - An empty database that always returns default values when queried.
- Represents a fork
- In-memory [
Database
] for Anvil. - A cloneable backend type that shares access to the backend data with all its clones.
- A minimal abstraction of a state at a certain point in time
- _Object
Safe π
Enums§
- Variants of a [revm::Database]
- Errors that can happen when working with [
revm::Database
] - Errors that can happen when working with [
revm::Database
] - Represents possible diagnostic cases on revert
- What to do when reverting a state snapshot.
Constants§
- All accounts that will have persistent storage across fork swaps.
bytes32("failed")
, as a storage slot key intoCHEATCODE_ADDRESS
.
Traits§
- An extension trait that allows us to easily extend the
revm::Inspector
capabilities
Functions§
- Applies the changeset of a transaction to the active journaled state and also commits it in the forked db
- commit_
transaction πExecutes the given transaction and commits state changes to the database and the journaled state, with an inspector. - is_
contract_ πin_ state Returns true of the address is a contract - merge_
account_ πdata Clones the data of the givenaccounts
from theactive
database into thefork_db
This includes the data held in storage (CacheDB
) and kept in theJournaledState
. - Clones the account data from the
active
db into theForkDB
- Clones the account data from the
active_journaled_state
into thefork_journaled_state
- This updates the currently used env with the forkβs environment
- update_
env_ πblock Updates the envβs block with the blockβs data - Helper method which updates data in the state with the data from the database. Does not change state for persistent accounts (for roll fork to transaction and transact).
Type Aliases§
- Result alias with
DatabaseError
as error - ForkDB π
- Fork
Lookup πIndex Represents the index of a fork in the created forks vector This is used for fast lookup - Type alias for an in-memory database.
- Represents a numeric
ForkId
valid only for the existence of theBackend
.