Documentation
¶
Index ¶
- type Event
- type EventCriteria
- type EventFilter
- type LogDB
- func (db *LogDB) Close()
- 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) NewTask() *Task
- func (db *LogDB) NewestBlockID() (thor.Bytes32, error)
- func (db *LogDB) Path() string
- type Options
- type Order
- type Range
- type RangeType
- type Task
- type Transfer
- type TransferCriteria
- type TransferFilter
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 ¶ added in v1.0.3
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 ¶ added in v1.1.0
HasBlockID query whether given block id related logs were written.
func (*LogDB) NewTask ¶ added in v1.1.0
NewTask create a new task to perform transactional operations of writing logs.
func (*LogDB) NewestBlockID ¶ added in v1.1.0
NewestBlockID query newest written block id.
type Task ¶ added in v1.1.0
type Task struct {
// contains filtered or unexported fields
}
Task to transactionally perform logs writting.
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 ¶ added in v1.0.3
type TransferFilter ¶
Click to show internal directories.
Click to hide internal directories.