Documentation ¶
Index ¶
- type MockChain
- func (c *MockChain) Config() *config.ChainConfig
- func (c *MockChain) Endpoint() string
- func (c *MockChain) EthClient() *ethclient.Client
- func (c *MockChain) LogPath() string
- func (c *MockChain) SetBalance(ctx context.Context, result interface{}, address common.Address, ...) error
- func (c *MockChain) SetCode(ctx context.Context, result interface{}, address common.Address, code string) error
- func (c *MockChain) SetIntervalMining(ctx context.Context, result interface{}, interval int64) error
- func (c *MockChain) SetStorageAt(ctx context.Context, result interface{}, address common.Address, ...) error
- func (c *MockChain) SimulatedLogs(ctx context.Context, tx *types.Transaction) ([]types.Log, error)
- func (c *MockChain) Start(_ context.Context) error
- func (c *MockChain) Stop(_ context.Context) error
- func (c *MockChain) String() string
- type MockChainReader
- func (m *MockChainReader) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
- func (m *MockChainReader) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
- func (m *MockChainReader) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
- func (m *MockChainReader) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
- func (m *MockChainReader) SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error)
- func (m *MockChainReader) TransactionCount(ctx context.Context, blockHash common.Hash) (uint, error)
- func (m *MockChainReader) TransactionInBlock(ctx context.Context, blockHash common.Hash, index uint) (*types.Transaction, error)
- type MockSubscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockChain ¶
type MockChain struct { }
func NewMockChain ¶
func NewMockChain() *MockChain
func (*MockChain) Config ¶
func (c *MockChain) Config() *config.ChainConfig
func (*MockChain) SetBalance ¶
func (*MockChain) SetIntervalMining ¶
func (*MockChain) SetStorageAt ¶
func (*MockChain) SimulatedLogs ¶
type MockChainReader ¶
type MockChainReader struct {
// contains filtered or unexported fields
}
func NewMockChainReader ¶
func NewMockChainReader(block *types.Block) *MockChainReader
func (*MockChainReader) BlockByHash ¶
func (*MockChainReader) BlockByNumber ¶
func (*MockChainReader) HeaderByHash ¶
func (*MockChainReader) HeaderByNumber ¶
func (*MockChainReader) SubscribeNewHead ¶
func (*MockChainReader) TransactionCount ¶
func (*MockChainReader) TransactionInBlock ¶
func (m *MockChainReader) TransactionInBlock(ctx context.Context, blockHash common.Hash, index uint) (*types.Transaction, error)
type MockSubscription ¶
type MockSubscription struct{}
func (*MockSubscription) Err ¶
func (s *MockSubscription) Err() <-chan error
func (*MockSubscription) Unsubscribe ¶
func (s *MockSubscription) Unsubscribe()
Click to show internal directories.
Click to hide internal directories.