Documentation ¶
Index ¶
- Constants
- func Consume(client ThrottleClient, filter *chain.Filter, blockRange *rpcevents.BlockRange, ...) error
- func NewThrottleClient(client EthClient, maxRequests int, timeBase time.Duration, ...) *throttleClient
- type Block
- type Chain
- func (c *Chain) Close() error
- func (c *Chain) Connectivity() connectivity.State
- func (c *Chain) ConsumeBlocks(ctx context.Context, in *rpcevents.BlockRange, ...) error
- func (c *Chain) GetABI(ctx context.Context, address crypto.Address) (string, error)
- func (c *Chain) GetChainID() string
- func (c *Chain) GetVersion() string
- func (c *Chain) StatusMessage(ctx context.Context, lastProcessedHeight uint64) []interface{}
- type EthClient
- type Event
- type ThrottleClient
- type Throttler
- type Transaction
- func (tx *Transaction) GetEvents() []chain.Event
- func (tx *Transaction) GetException() *errors.Exception
- func (tx *Transaction) GetHash() binary.HexBytes
- func (tx *Transaction) GetIndex() uint64
- func (tx *Transaction) GetMetadata(columns types.SQLColumnNames) (map[string]interface{}, error)
- func (tx *Transaction) GetOrigin() *chain.Origin
Constants ¶
View Source
const ConsumerScope = "EthereumConsumer"
View Source
const Scope = "Ethereum"
Variables ¶
This section is empty.
Functions ¶
func Consume ¶
func Consume(client ThrottleClient, filter *chain.Filter, blockRange *rpcevents.BlockRange, config *chain.BlockConsumerConfig, logger *logging.Logger, consume func(block chain.Block) error) error
Types ¶
type Block ¶
type Block struct { Height uint64 Transactions []chain.Transaction // contains filtered or unexported fields }
func (*Block) GetMetadata ¶
func (b *Block) GetMetadata(columns types.SQLColumnNames) (map[string]interface{}, error)
func (*Block) GetTxs ¶
func (b *Block) GetTxs() []chain.Transaction
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
func New ¶
func New(client EthClient, filter *chain.Filter, consumerConfig *chain.BlockConsumerConfig, logger *logging.Logger) (*Chain, error)
We rely on this failing if the chain is not an Ethereum Chain
func (*Chain) Connectivity ¶
func (c *Chain) Connectivity() connectivity.State
func (*Chain) ConsumeBlocks ¶
func (*Chain) GetChainID ¶
func (*Chain) GetVersion ¶
type Event ¶
type Event struct { exec.LogEvent Height uint64 // Index of event in entire block (what ethereum provides us with IndexInBlock uint64 // Index of event in transaction Index uint64 TransactionHash binary.HexBytes }
func (*Event) GetAddress ¶
func (*Event) GetTransactionHash ¶
type ThrottleClient ¶ added in v0.31.2
type ThrottleClient interface { EthClient Throttle() }
type Throttler ¶ added in v0.31.2
type Throttler struct {
// contains filtered or unexported fields
}
func NewThrottler ¶ added in v0.31.2
type Transaction ¶
func NewEthereumTransaction ¶
func NewEthereumTransaction(log *Event) *Transaction
func (*Transaction) GetEvents ¶
func (tx *Transaction) GetEvents() []chain.Event
func (*Transaction) GetException ¶
func (tx *Transaction) GetException() *errors.Exception
func (*Transaction) GetHash ¶
func (tx *Transaction) GetHash() binary.HexBytes
func (*Transaction) GetIndex ¶
func (tx *Transaction) GetIndex() uint64
func (*Transaction) GetMetadata ¶
func (tx *Transaction) GetMetadata(columns types.SQLColumnNames) (map[string]interface{}, error)
func (*Transaction) GetOrigin ¶
func (tx *Transaction) GetOrigin() *chain.Origin
Click to show internal directories.
Click to hide internal directories.