ethtest

package
v0.0.0-...-b4d4280 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package ethtest provides test helpers and scaffolding for testing with a fake Ethereum network

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableLogging

func EnableLogging(t *testing.T)

func NewKey

func NewKey() *ecdsa.PrivateKey

NewKey returns a pre-generated test key.

Types

type Account

type Account struct {
	Key     *ecdsa.PrivateKey
	Address common.Address
}

func NewAccount

func NewAccount() *Account

func (*Account) AddTxToBlock

func (acc *Account) AddTxToBlock(tb testing.TB, block *core.BlockGen, to common.Address, amount *big.Int, gasLimit uint64, gasPrice *big.Int)

type Quoter

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

func NewQuoter

func NewQuoter() *Quoter

func (*Quoter) GetQuote

func (quoter *Quoter) GetQuote(ctx context.Context, symbol coinmarketcap.Symbol) (*coinmarketcap.Quote, error)

func (*Quoter) SetQuote

func (quoter *Quoter) SetQuote(symbol coinmarketcap.Symbol, quote *coinmarketcap.Quote)

Jump to

Keyboard shortcuts

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