Documentation
¶
Index ¶
- type Event
- type EventCriteria
- type EventFilter
- type LogDB
- func (db *LogDB) Close() error
- func (db *LogDB) FilterEvents(ctx context.Context, filter *EventFilter) ([]*Event, error)
- func (db *LogDB) FilterTransfers(ctx context.Context, filter *TransferFilter) ([]*Transfer, error)
- func (db *LogDB) HasBlockID(id thor.Bytes32) (bool, error)
- func (db *LogDB) Log(f func(*Writer) error) error
- func (db *LogDB) NewestBlockID() (thor.Bytes32, error)
- func (db *LogDB) Path() string
- type Options
- type Order
- type Range
- type Transfer
- type TransferCriteria
- type TransferFilter
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
BlockNumber uint32
Index uint32
BlockID thor.Bytes32
BlockTime uint64
TxID thor.Bytes32
TxOrigin thor.Address //contract caller
ClauseIndex uint32
Address thor.Address // always a contract address
Topics [5]*thor.Bytes32
Data []byte
}
Event represents tx.Event that can be stored in db.
type EventCriteria ¶
type EventFilter ¶
type EventFilter struct {
CriteriaSet []*EventCriteria
Range *Range
Options *Options
Order Order //default asc
}
EventFilter filter
type LogDB ¶
type LogDB struct {
// contains filtered or unexported fields
}
func (*LogDB) FilterEvents ¶
func (*LogDB) FilterTransfers ¶
func (*LogDB) HasBlockID ¶
HasBlockID query whether given block id related logs were written.
func (*LogDB) NewestBlockID ¶
NewestBlockID query newest written block id.
type Transfer ¶
type Transfer struct {
BlockNumber uint32
Index uint32
BlockID thor.Bytes32
BlockTime uint64
TxID thor.Bytes32
TxOrigin thor.Address
ClauseIndex uint32
Sender thor.Address
Recipient thor.Address
Amount *big.Int
}
Transfer represents tx.Transfer that can be stored in db.
type TransferCriteria ¶
type TransferFilter ¶
type TransferFilter struct {
CriteriaSet []*TransferCriteria
Range *Range
Options *Options
Order Order //default asc
}
Click to show internal directories.
Click to hide internal directories.