Versions in this module Expand all Collapse all v0 v0.2.0 Oct 5, 2021 Changes in this version + func AddTransactionData(ctx context.Context, client *ethclient.Client, bs *BlockSlice) error v0.1.0 Sep 19, 2021 Changes in this version + const DefaultBatchOverlap + const DefaultFetchBatchSize + const DefaultPollInterval + const MaxEventlogSize + func BigIntFromString(s string) (*big.Int, error) + func BigIntToString(x *big.Int) string + func BlockSliceToProto(bs *BlockSlice) *epb.BlockSlice + func BlockToProto(b *Block) *epb.Block + func EventToProto(e *Event) *epb.Event + func FilterQueryFromProto(pb *epb.FilterQuery) (ethereum.FilterQuery, error) + func FilterQueryToProto(q *ethereum.FilterQuery) *epb.FilterQuery + func MatchBlocks(new, old *BlockSlice) (bool, uint64, error) + type Action int + const Append + const Rollback + const SetNext + type Block struct + Events []Event + Hash common.Hash + Number uint64 + func BlockFromProto(pb *epb.Block) (*Block, error) + type BlockSlice struct + Blocks []*Block + DistanceFromHead uint64 + End uint64 + Start uint64 + func BlockSliceFromProto(pb *epb.BlockSlice) (*BlockSlice, error) + func EmptyBlockSlice(from uint64) *BlockSlice + func GetLogs(ctx context.Context, client *ethclient.Client, q *ethereum.FilterQuery, ...) (*BlockSlice, error) + func (b *BlockSlice) Append(blk *Block) error + func (b *BlockSlice) Concat(other *BlockSlice) error + func (b *BlockSlice) DeleteBeforeBlock(n uint64) + func (b *BlockSlice) DeleteFromBlock(n uint64) + func (b *BlockSlice) Extend(n uint64) error + func (b *BlockSlice) Rollback(n uint64) error + type CanceledError string + const Canceled + func (CanceledError) Error() string + type ChainStreamer struct + BatchOverlap uint64 + Ctx context.Context + FetchBatchSize uint64 + FetchTxDetails bool + Filter ethereum.FilterQuery + Url string + func (cr *ChainStreamer) Stream(done chan struct{}, from uint64) (*Subscription, error) + type Event struct + Address common.Address + BlockHash common.Hash + BlockNumber uint64 + Data []byte + Index uint64 + Topics []common.Hash + TxData []byte + TxFrom common.Address + TxGas uint64 + TxHash common.Hash + TxIndex uint64 + TxValue *big.Int + func EventFromProto(pb *epb.Event) (*Event, error) + func (e *Event) Log() *types.Log + type EventLog interface + Append func(*Block) error + Close func() error + Filter func() ethereum.FilterQuery + FirstBlock func() uint64 + NextBlock func() uint64 + Rollback func(uint64) error + SetNext func(uint64) error + type InMemoryEventLog struct + func InMemoryEventLogFromProto(pb *epb.EventLogFile) (*InMemoryEventLog, error) + func NewInMemoryEventLog(from uint64, filter ethereum.FilterQuery) *InMemoryEventLog + func (l *InMemoryEventLog) Append(b *Block) error + func (l *InMemoryEventLog) Close() error + func (l *InMemoryEventLog) Filter() ethereum.FilterQuery + func (l *InMemoryEventLog) FirstBlock() uint64 + func (l *InMemoryEventLog) NextBlock() uint64 + func (l *InMemoryEventLog) Rollback(n uint64) error + func (l *InMemoryEventLog) SetNext(n uint64) error + func (l *InMemoryEventLog) Stream(done chan struct{}, from uint64) (*Subscription, error) + func (l *InMemoryEventLog) ToProto() *epb.EventLogFile + type LiveEventLog struct + func NewLiveEventLog(e EventLog, s ChainStreamer) *LiveEventLog + func (l *LiveEventLog) Stream(done chan struct{}, from uint64) (*Subscription, error) + type Message struct + Action Action + Block *Block + Number uint64 + type Streamer interface + Stream func(done chan struct{}, from uint64) (*Subscription, error) + type Subscription struct + C chan *Message + Done chan struct{} + Err chan error