event

package
v0.0.1-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractEvent

type ContractEvent struct {
	GUID            uuid.UUID      `gorm:"primaryKey"`
	BlockHash       common.Hash    `gorm:"serializer:bytes"`
	ContractAddress common.Address `gorm:"serializer:bytes"`
	TransactionHash common.Hash    `gorm:"serializer:bytes"`
	LogIndex        uint64
	BlockNumber     *big.Int    `gorm:"serializer:u256"`
	EventSignature  common.Hash `gorm:"serializer:bytes"`
	Timestamp       uint64
	RLPLog          *types.Log `gorm:"serializer:rlp;column:rlp_bytes"`
}

func ContractEventFromLog

func ContractEventFromLog(log *types.Log, timestamp uint64, blockNumber *big.Int) ContractEvent

func (*ContractEvent) AfterFind

func (c *ContractEvent) AfterFind(tx *gorm.DB) error

type ContractEventDB

type ContractEventDB interface {
	ContractEventsView
	StoreContractEvents([]ContractEvent) error
}

func NewContractEventsDB

func NewContractEventsDB(db *gorm.DB) ContractEventDB

type ContractEventsView

type ContractEventsView interface {
	ContractEvent(uuid.UUID) (*ContractEvent, error)
	ContractEventWithFilter(ContractEvent) (*ContractEvent, error)
	ContractEventsWithFilter(ContractEvent, *big.Int, *big.Int) ([]ContractEvent, error)
	LatestContractEventWithFilter(ContractEvent) (*ContractEvent, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL