Expand description
Foundryโs main executor backend abstraction and implementation.
Modulesยง
- cow ๐
- A wrapper around
Backendthat is clone-on-write used for fuzzing. - diagnostic ๐
- error ๐
- in_
memory_ ๐db - In-memory database.
- snapshot ๐
- strategy ๐
Structsยง
- Backend
- Provides the underlying
revm::Databaseimplementation. - Backend
Inner - Container type for various Backend related data
- Backend
State Snapshot - Represents a state snapshot taken during evm execution
- Backend
Strategy - Strategy for super::Backend.
- Blockchain
Db - A shareable Block database
- Blockchain
DbMeta - relevant identifying markers in the context of BlockchainDb
- CowBackend
- A wrapper around
Backendthat ensures onlyrevm::DatabaseReffunctions are called. - EmptyDB
Wrapper - An empty database that always returns default values when queried.
- EvmBackend
Strategy Runner - Fork
- Represents a fork
- MemDb
- In-memory [
Database] for Anvil. - Shared
Backend - A cloneable backend type that shares access to the backend data with all its clones.
- State
Snapshot - A minimal abstraction of a state at a certain point in time
- _Object
Safe ๐
Enumsยง
- Backend
Database Snapshot - Variants of a [revm::Database]
- Backend
Error - Errors that can happen when working with [
revm::Database] - Database
Error - Errors that can happen when working with [
revm::Database] - Revert
Diagnostic - Represents possible diagnostic cases on revert
- Revert
State Snapshot Action - What to do when reverting a state snapshot.
Constantsยง
- DEFAULT_
PERSISTENT_ ๐ACCOUNTS - All accounts that will have persistent storage across fork swaps.
- GLOBAL_
FAIL_ SLOT bytes32("failed"), as a storage slot key intoCHEATCODE_ADDRESS.
Traitsยง
- Backend
Strategy Context - Context for BackendStrategyRunner.
- Backend
Strategy Runner - Database
Ext - An extension trait that allows us to easily extend the
revm::Inspectorcapabilities
Functionsยง
- apply_
state_ ๐changeset - 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
- update_
current_ ๐env_ with_ fork_ env - This updates the currently used env with the forkโs environment
- update_
env_ ๐block - Updates the envโs block with the blockโs data
- update_
state - 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ยง
- Backend
Result - Database
Result - Result alias with
DatabaseErroras error - ForkDB
- Fork
Lookup ๐Index - Represents the index of a fork in the created forks vector This is used for fast lookup
- Foundry
EvmIn MemoryDB - Type alias for an in-memory database.
- Journaled
State - Local
Fork Id - Represents a numeric
ForkIdvalid only for the existence of theBackend.