devnet

package
v1.14.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultChainID = 77799777

Variables

This section is empty.

Functions

func DefaultAnvilRPC added in v1.13.5

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

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 added in v1.14.3

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

func NewMockPreStateBuilder added in v1.13.0

func NewMockPreStateBuilder(opts ...mockPreStateBuilderOption) *mockPreStateBuilder

func WithBuildPrestate added in v1.13.0

func WithBuildPrestate(buildPrestate func(ctx context.Context, opts ...prestate.PrestateBuilderOption) (prestate.PrestateManifest, error)) mockPreStateBuilderOption

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 added in v1.14.3

func WithForkBlockNumber(block uint64) AnvilOption

func WithForkURL

func WithForkURL(url string) 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