Skip to main content

Module mem

Module mem 

Source
Expand description

In-memory Backend In-memory blockchain backend.

ModulesΒ§

cache
fork_db
in_memory_db
The in memory DB
inspector
Anvil specific [revm::Inspector] implementation
monad πŸ”’ monad
Monad-specific execution and context helpers for the in-memory backend.
optimismoptimism
Optimism-specific transact helpers for the in-memory backend.
state
Support for generating the state root for memdb storage
storage
In-memory blockchain storage

StructsΒ§

Backend
Gives access to the [revm::Database]
EnvelopeExecution πŸ”’
ForkCacheNamespace πŸ”’
Identifies one endpoint’s persisted cache files across all blocks of a source chain.
ForkCacheSource πŸ”’
Identifies the endpoint that supplied the most recently committed fork.
GasEstimateCallOptions πŸ”’
PreparedCall πŸ”’
SimulationHandler πŸ”’
Ethereum handler that skips blob fee cap validation for non-validating calls with a zero cap.
SimulationPrecompileOverrides πŸ”’
StagedForkCacheLease πŸ”’
Keeps a staged fork from persisting remote state unless it is committed.
StagedForkCacheLeaseInner πŸ”’
StagedForkDbUser πŸ”’
Couples an asynchronous staged-database user to its rollback lease.
StagedForkReset πŸ”’
Fully prepared fork replacement awaiting an atomic backend commit.
StagedMemoryReset πŸ”’
Fully prepared in-memory replacement awaiting an atomic backend commit.
StateSnapshot πŸ”’
TypedCallOverrides πŸ”’

EnumsΒ§

BlockRequest
A block request, which includes the Pool Transactions if it’s Pending
CallTxEnv πŸ”’
EnvelopeExecutionKind πŸ”’
MonadExecutionContext πŸ”’ monad

ConstantsΒ§

HOLESKY_DEPOSIT_CONTRACT_ADDRESS πŸ”’
MIN_CREATE_GAS
MIN_TRANSACTION_GAS
SEPOLIA_DEPOSIT_CONTRACT_ADDRESS πŸ”’
SIMULATE_GAS_CAP πŸ”’
Maximum cumulative gas available to one eth_simulateV1 request.
TEMPO_RPC_SIMULATION_CONTEXT πŸ”’
Fixed transaction context for direct Tempo RPC simulations.

TraitsΒ§

BackendInspectormonad and optimism
Marker trait that abstracts over the per-network inspector trait bounds required by the in-memory backend. The OP bound is only included when the optimism feature is enabled.
DatabaseRef
Helper trait that combines revm::DatabaseRef with Debug. This is needed because alloy-evm requires Debug on Database implementations. With trait upcasting now stable, we can now upcast from this trait to revm::DatabaseRef.
IntoInstructionResult
Converts a halt reason into an [InstructionResult].

FunctionsΒ§

apply_tempo_envelope_identity πŸ”’
arbitrum_replay_block_number πŸ”’
build_rpc_transaction πŸ”’
call_config_from_tracer_config πŸ”’
commit_cache πŸ”’
Commits a fully executed candidate cache to the live database.
foundry_header πŸ”’
Wraps an Ethereum-shaped header in the selected network’s consensus header.
genesis_header πŸ”’
Creates an Ethereum-shaped genesis header from the EVM environment.
get_pool_transactions_nonce πŸ”’
Get max nonce from transaction pool by address.
is_arbitrum
mock_tempo_signature πŸ”’
monad_execution_context_at πŸ”’ monad
next_monad_context πŸ”’ monad
noop_before_transaction πŸ”’
noop_on_execution_error πŸ”’
preserve_deleted_storage πŸ”’
previously_deleted_accounts πŸ”’
prove_storage
Prove a storage key’s existence or nonexistence in the account’s storage trie.
rehash πŸ”’
Replaces the cached hash of a [Signed] transaction, preserving the inner tx and signature.
sanitize_simulation_blocks πŸ”’
simulate_rpc_error πŸ”’
simulate_transaction_error πŸ”’
tempo_db_err πŸ”’
Converts a Tempo error into an anvil [DatabaseError].
tempo_nonce πŸ”’
transaction_build
Creates a AnyRpcTransaction as it’s expected for the eth RPC api from storage data
unpack_execution_result πŸ”’
Unpacks an [ExecutionResult] into its exit reason, gas used, output, and logs.

Type AliasesΒ§

MonadReplayContext πŸ”’ monad
OpCallDepositInfo πŸ”’ optimism
Side-channel container for OP-specific deposit info produced by Backend::build_call_env_with_base and consumed by the OP transact path.
State