devnet

package
v1.20.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultChainID = 77799777

Variables

This section is empty.

Functions

func DefaultAnvilRPC

func DefaultAnvilRPC(t *testing.T, lgr log.Logger, opts ...AnvilOption) (string, *ethclient.Client)

DefaultAnvilRPC starts Anvil with DefaultChainID. Later options can override this default.

func NewForked

func NewForked(lgr log.Logger, rpcURL string, anvilOpts ...AnvilOption) (*Anvil, CleanupFunc, error)

func NewForkedSepolia

func NewForkedSepolia(lgr log.Logger) (*Anvil, CleanupFunc, error)

func NewForkedSepoliaFromBlock

func NewForkedSepoliaFromBlock(lgr log.Logger, block uint64) (*Anvil, CleanupFunc, error)

Types

type Anvil

type Anvil struct {
	// contains filtered or unexported fields
}

func NewAnvil

func NewAnvil(logger log.Logger, opts ...AnvilOption) (*Anvil, error)

func (*Anvil) RPCUrl

func (r *Anvil) RPCUrl() string

func (*Anvil) Start

func (r *Anvil) Start() error

func (*Anvil) Stop

func (r *Anvil) Stop() error

type AnvilOption

type AnvilOption func(*Anvil)

func WithBaseFee

func WithBaseFee(baseFee uint64) AnvilOption

func WithBlockTime

func WithBlockTime(bt int) AnvilOption

func WithChainID

func WithChainID(id uint64) AnvilOption

func WithForkBlockNumber

func WithForkBlockNumber(block uint64) AnvilOption

func WithForkURL

func WithForkURL(url string) AnvilOption

func WithFoundryHome

func WithFoundryHome(dir string) AnvilOption

func WithHardfork added in v1.19.5

func WithHardfork(hardfork string) AnvilOption

func WithTimestamp added in v1.19.5

func WithTimestamp(timestamp uint64) AnvilOption

type CleanupFunc

type CleanupFunc func() error

type Option

type Option func(*RetryProxy)

type RetryProxy

type RetryProxy struct {
	// contains filtered or unexported fields
}

func NewRetryProxy

func NewRetryProxy(lgr log.Logger, upstream string, opts ...Option) *RetryProxy

func (*RetryProxy) Endpoint

func (p *RetryProxy) Endpoint() string

func (*RetryProxy) ServeHTTP

func (p *RetryProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*RetryProxy) Start

func (p *RetryProxy) Start() error

func (*RetryProxy) Stop

func (p *RetryProxy) Stop() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL