evmtest

package
v1.10.17 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChainArbitrumMainnet

func ChainArbitrumMainnet(t *testing.T) evmconfig.ChainScopedConfig

func ChainArbitrumRinkeby

func ChainArbitrumRinkeby(t *testing.T) evmconfig.ChainScopedConfig

func ChainEthMainnet

func ChainEthMainnet(t *testing.T) evmconfig.ChainScopedConfig

func ChainOptimismKovan

func ChainOptimismKovan(t *testing.T) evmconfig.ChainScopedConfig

func ChainOptimismMainnet

func ChainOptimismMainnet(t *testing.T) evmconfig.ChainScopedConfig

func MustGetDefaultChain

func MustGetDefaultChain(t testing.TB, cc evm.ChainSet) evm.Chain

func MustInsertChainWithNode

func MustInsertChainWithNode(t testing.TB, db *gorm.DB, chain evmtypes.Chain) evmtypes.Chain

func NewChainSet

func NewChainSet(t testing.TB, testopts TestChainOpts) evm.ChainSet

NewChainSet returns a simple chain collection with one chain and allows to mock client/config on that chain

Types

type MockORM

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

func NewMockORM

func NewMockORM(chains []evmtypes.Chain) *MockORM

func (*MockORM) Chain

func (mo *MockORM) Chain(id utils.Big) (evmtypes.Chain, error)

func (*MockORM) Chains

func (mo *MockORM) Chains(offset int, limit int) ([]evmtypes.Chain, int, error)

func (*MockORM) Clear

func (mo *MockORM) Clear(chainID *big.Int, key string) error

func (*MockORM) CreateChain

func (mo *MockORM) CreateChain(id utils.Big, config evmtypes.ChainCfg) (evmtypes.Chain, error)

func (*MockORM) CreateNode

func (mo *MockORM) CreateNode(data evmtypes.NewNode) (evmtypes.Node, error)

func (*MockORM) DeleteChain

func (mo *MockORM) DeleteChain(id utils.Big) error

func (*MockORM) DeleteNode

func (mo *MockORM) DeleteNode(id int64) error

func (*MockORM) EnabledChainsWithNodes

func (mo *MockORM) EnabledChainsWithNodes() ([]evmtypes.Chain, error)

func (*MockORM) Nodes

func (mo *MockORM) Nodes(offset int, limit int) ([]evmtypes.Node, int, error)

func (*MockORM) NodesForChain

func (mo *MockORM) NodesForChain(chainID utils.Big, offset int, limit int) ([]evmtypes.Node, int, error)

func (*MockORM) StoreString

func (mo *MockORM) StoreString(chainID *big.Int, key, val string) error

func (*MockORM) UpdateChain

func (mo *MockORM) UpdateChain(id utils.Big, enabled bool, config evmtypes.ChainCfg) (evmtypes.Chain, error)

type TestChainOpts

type TestChainOpts struct {
	Client         eth.Client
	LogBroadcaster log.Broadcaster
	GeneralConfig  config.GeneralConfig
	ChainCfg       evmtypes.ChainCfg
	HeadTracker    httypes.Tracker
	DB             *gorm.DB
	TxManager      bulletprooftxmanager.TxManager
	KeyStore       keystore.Eth
}

Jump to

Keyboard shortcuts

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