Documentation ¶
Index ¶
- func ChainArbitrumMainnet(t *testing.T) evmconfig.ChainScopedConfig
- func ChainArbitrumRinkeby(t *testing.T) evmconfig.ChainScopedConfig
- func ChainEthMainnet(t *testing.T) evmconfig.ChainScopedConfig
- func ChainOptimismKovan(t *testing.T) evmconfig.ChainScopedConfig
- func ChainOptimismMainnet(t *testing.T) evmconfig.ChainScopedConfig
- func MustGetDefaultChain(t testing.TB, cc evm.ChainSet) evm.Chain
- func MustInsertChain(t testing.TB, db *sqlx.DB, chain *evmtypes.DBChain)
- func NewChainScopedConfig(t testing.TB, cfg config.GeneralConfig) evmconfig.ChainScopedConfig
- func NewChainSet(t testing.TB, testopts TestChainOpts) evm.ChainSet
- func NewEthClientMock(t *testing.T) *evmMocks.Client
- func NewEthClientMockWithDefaultChain(t *testing.T) *evmMocks.Client
- type MockEth
- type MockORM
- func (mo *MockORM) AddNodes(ns ...evmtypes.Node)
- func (mo *MockORM) Chain(id utils.Big, qopts ...pg.QOpt) (evmtypes.DBChain, error)
- func (mo *MockORM) Chains(offset int, limit int, qopts ...pg.QOpt) (chains []evmtypes.DBChain, count int, err error)
- func (mo *MockORM) Clear(chainID utils.Big, key string) error
- func (mo *MockORM) CreateChain(id utils.Big, config *evmtypes.ChainCfg, qopts ...pg.QOpt) (evmtypes.DBChain, error)
- func (mo *MockORM) CreateNode(data evmtypes.Node, qopts ...pg.QOpt) (n evmtypes.Node, err error)
- func (mo *MockORM) DeleteChain(id utils.Big, qopts ...pg.QOpt) error
- func (mo *MockORM) DeleteNode(id int32, qopts ...pg.QOpt) error
- func (mo *MockORM) EnabledChains(qopts ...pg.QOpt) ([]evmtypes.DBChain, error)
- func (mo *MockORM) GetChainsByIDs(ids []utils.Big) (chains []evmtypes.DBChain, err error)
- func (mo *MockORM) GetNodesByChainIDs(chainIDs []utils.Big, qopts ...pg.QOpt) (nodes []evmtypes.Node, err error)
- func (mo *MockORM) Node(id int32, qopts ...pg.QOpt) (evmtypes.Node, error)
- func (mo *MockORM) Nodes(offset int, limit int, qopts ...pg.QOpt) (nodes []evmtypes.Node, cnt int, err error)
- func (mo *MockORM) NodesForChain(chainID utils.Big, offset int, limit int, qopts ...pg.QOpt) ([]evmtypes.Node, int, error)
- func (mo *MockORM) PutChains(cs ...evmtypes.DBChain)
- func (mo *MockORM) SetupNodes([]evmtypes.Node, []utils.Big) error
- func (mo *MockORM) StoreString(chainID utils.Big, key, val string) error
- func (mo *MockORM) UpdateChain(id utils.Big, enabled bool, config *evmtypes.ChainCfg, qopts ...pg.QOpt) (evmtypes.DBChain, error)
- type RawSub
- type TestChainOpts
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 NewChainScopedConfig ¶
func NewChainScopedConfig(t testing.TB, cfg config.GeneralConfig) evmconfig.ChainScopedConfig
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 MockEth ¶ added in v1.4.0
type MockEth struct { EthClient *evmMocks.Client CheckFilterLogs func(int64, int64) // contains filtered or unexported fields }
func (*MockEth) SubscribeCallCount ¶ added in v1.4.0
func (*MockEth) UnsubscribeCallCount ¶ added in v1.4.0
type MockORM ¶
type MockORM struct {
// contains filtered or unexported fields
}
func (*MockORM) CreateChain ¶
func (*MockORM) CreateNode ¶
func (*MockORM) EnabledChains ¶ added in v1.4.0
func (*MockORM) GetChainsByIDs ¶
func (*MockORM) GetNodesByChainIDs ¶
func (mo *MockORM) GetNodesByChainIDs(chainIDs []utils.Big, qopts ...pg.QOpt) (nodes []evmtypes.Node, err error)
GetNodesByChainIDs implements evmtypes.ORM
func (*MockORM) Nodes ¶
func (mo *MockORM) Nodes(offset int, limit int, qopts ...pg.QOpt) (nodes []evmtypes.Node, cnt int, err error)
Nodes implements evmtypes.ORM
func (*MockORM) NodesForChain ¶
func (mo *MockORM) NodesForChain(chainID utils.Big, offset int, limit int, qopts ...pg.QOpt) ([]evmtypes.Node, int, error)
NodesForChain implements evmtypes.ORM
func (*MockORM) SetupNodes ¶ added in v1.4.0
NodesForChain implements evmtypes.ORM
func (*MockORM) StoreString ¶
type RawSub ¶ added in v1.4.0
type RawSub[T any] struct { // contains filtered or unexported fields }
type TestChainOpts ¶
Click to show internal directories.
Click to hide internal directories.