Skip to main content

Module db

Module db 

Source
Expand description

[revm] related types Helper types for working with [revm]

StructsΒ§

AnvilCacheDB
A wrapper around [CacheDB] that executes transactions at spec.
EmptyAsAbsentDb πŸ”’
A read-only view of a database that reports empty accounts as absent.
LegacyBlobExcessGasAndPrice
Legacy blob excess gas and price structure from before v1.3.
LegacyBlockEnv
Legacy block environment from before v1.3.
MonadBlockReplayProfilemonad
Execution inputs needed to replay a locally stored Monad block faithfully.
SerializableAccountRecord
SerializableBlock
SerializableHistoricalStates
SerializableState
SerializableTransaction
StateDb
Represents a state at certain point

EnumsΒ§

SerializableTransactionType
Defines a backwards-compatible enum for transactions. This is essential for maintaining compatibility with state dumps created before the changes introduced in PR #8411.
StringOrU64
Legacy string or u64 type from before v1.3.

ConstantsΒ§

BLOCKHASH_HISTORY πŸ”’
Number of preceding block hashes available to the EVM’s BLOCKHASH opcode.

TraitsΒ§

Db
This bundles all required revm traits
MaybeForkedDatabase
Helper trait to reset the DB if it’s forked
MaybeFullDatabase
Helper trait get access to the full state data of the database

FunctionsΒ§

cache_block_hash πŸ”’
Inserts a block hash, discards entries outside the EVM-visible cache, and returns its head.
deserialize_best_block_number_compat πŸ”’
Custom deserializer for best_block_number that handles both v1.2 and v1.3+ formats.
deserialize_block_env_compat πŸ”’
Custom deserializer for BlockEnv that handles both v1.2 and v1.3+ formats.
deserialize_btree πŸ”’