Documentation ¶
Index ¶
- func MustGetDefaultChain(t testing.TB, cc evm.ChainSet) evm.Chain
- func NewChainScopedConfig(t testing.TB, cfg evm.GeneralConfig) evmconfig.ChainScopedConfig
- func NewChainSet(t testing.TB, testopts TestChainOpts) evm.ChainSet
- func NewChainSetOpts(t testing.TB, testopts TestChainOpts) evm.ChainSetOpts
- func NewEthClientMock(t *testing.T) *evmMocks.Client
- func NewEthClientMockWithDefaultChain(t *testing.T) *evmMocks.Client
- func NewMockChainSetWithChain(t testing.TB, ch evm.Chain) *evmmocks.ChainSet
- type MockEth
- type MockORM
- func (mo *MockORM) AddNodes(ns ...evmtypes.Node)
- func (mo *MockORM) Chain(id utils.Big, qopts ...pg.QOpt) (evmtypes.ChainConfig, error)
- func (mo *MockORM) Chains(offset int, limit int, qopts ...pg.QOpt) (chains []evmtypes.ChainConfig, count int, err error)
- func (mo *MockORM) EnsureChains([]utils.Big, ...pg.QOpt) error
- func (mo *MockORM) GetChainsByIDs(ids []utils.Big) (chains []evmtypes.ChainConfig, err error)
- func (mo *MockORM) GetNodesByChainIDs(chainIDs []utils.Big, qopts ...pg.QOpt) (nodes []evmtypes.Node, err error)
- func (mo *MockORM) NodeNamed(name string, opt ...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.ChainConfig)
- type RawSub
- type TestChainOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewChainScopedConfig ¶
func NewChainScopedConfig(t testing.TB, cfg evm.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
func NewChainSetOpts ¶ added in v1.10.0
func NewChainSetOpts(t testing.TB, testopts TestChainOpts) evm.ChainSetOpts
func NewEthClientMockWithDefaultChain ¶ added in v1.4.0
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 NewMockORM ¶
func NewMockORM(chains []evmtypes.ChainConfig, nodes []evmtypes.Node) *MockORM
func (*MockORM) EnsureChains ¶ added in v1.10.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) PutChains ¶ added in v1.4.0
func (mo *MockORM) PutChains(cs ...evmtypes.ChainConfig)
type RawSub ¶ added in v1.4.0
type RawSub[T any] struct { // contains filtered or unexported fields }
type TestChainOpts ¶
type TestChainOpts struct { Client evmclient.Client LogBroadcaster log.Broadcaster GeneralConfig evm.GeneralConfig HeadTracker httypes.HeadTracker DB *sqlx.DB TxManager txmgr.TxManager KeyStore keystore.Eth MailMon *utils.MailboxMonitor }
Click to show internal directories.
Click to hide internal directories.