anvil
Documentation for eth_defi.anvil Python module.
Anvil integration.
Anvil is a blazing-fast local testnet node implementation in Rust.
Anvil can replace
eth_tester.main.EthereumTester
as the unit/integration test backend.Anvil is mostly used in mainnet fork test cases.
Anvil is a more stable an alternative to Ganache (
eth_defi.ganache
)Anvil is part of Foundry, a toolkit for Ethereum application development.
To install Anvil on your UNIX computer:
curl -L https://foundry.paradigm.xyz | bash
PATH=~/.foundry/bin:$PATH
foundryup # Needs to be in path, or installation fails
This will install foundryup, anvil at ~/.foundry/bin and adds the folder to your shell rc file PATH.
For more information see Anvil reference.
See also eth_defi.trace
for Solidity tracebacks using Anvil.
This code was originally lifted from Brownie project.
Module Attributes
Mappings between Anvil command line parameters and our internal argument names |
Functions
|
Call evm_snapshot on Anvil |
|
Creates Anvil unit test backend or mainnet fork. |
|
Creates Anvil unit test backend or mainnet fork. |
|
Call evm_snapshot on Anvil |
|
Make a request to special named EVM JSON-RPC endpoint. |
|
Call evm_setNextBlockTimestamp on Anvil |
|
Call evm_revert on Anvil |
|
Call emv_increaseTime on Anvil |
|
Call evm_snapshot on Anvil |
|
Make Anvil mainnet fork to accept transactions to any Ethereum account. |
Classes
Control Anvil processes launched on background. |
Exceptions
Lifted from Brownie. |
|
Lifted from Brownie. |