Crate anvil

Crate anvil 

Source
Expand description

Anvil is a fast local Ethereum development node.

Modulesยง

argscmd
cmdcmd
contains cli command
config ๐Ÿ”’
eth
ethereum related implementations
evm ๐Ÿ”’
Evm related abstractions
filter
support for polling filters Support for polling based filters
hardfork ๐Ÿ”’
logging
commandline output User facing Logger
optscmd
pubsub
types for subscriptions
server
axum RPC server implementations Contains the code to launch an Ethereum RPC server.
service ๐Ÿ”’
contains the background service that drives the node background service
shutdown ๐Ÿ”’
Futures for shutdown signal Helper for shutdown signals
tasks ๐Ÿ”’
additional task management Task management support

Structsยง

AccountGenerator
Can create dev accounts
NodeConfig
Configurations of the EVM node
NodeHandle
A handle to the spawned node and server tasks.

Enumsยง

EthereumHardfork
The name of an Ethereum hardfork.
ForkChoice
Fork delimiter used to specify which block or transaction to fork from.

Constantsยง

CHAIN_ID
Default chain id of the node
DEFAULT_GAS_LIMIT
The default gas limit for all transactions
VERSION_MESSAGE
The short version message information for the Foundry CLI.

Traitsยง

PrecompileFactory
Object-safe trait that enables injecting extra precompiles when using anvil as a library.

Functionsยง

inject_precompiles
Inject precompiles into the EVM dynamically.
spawn
Creates the node and runs the server.
try_spawn
Creates the node and runs the server

Type Aliasesยง

IpcTask ๐Ÿ”’