models

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Transfer       = HashTopic{common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), "Transfer"}
	TransferSingle = HashTopic{common.HexToHash("0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62"), "TransferSingle"}
	ApprovalForAll = HashTopic{common.HexToHash("0x17307eabf5b53c6c7f7c9b5b9d9e9f0b3b2b2b7b0b4b2b2b2b2b2b2b2b2b2b2b2"), "ApprovalForAll"}
)

Functions

This section is empty.

Types

type HashTopic added in v0.11.2

type HashTopic struct {
	common.Hash
	// contains filtered or unexported fields
}

func NewHashTopic added in v0.11.2

func NewHashTopic(topicHash common.Hash) HashTopic

func (*HashTopic) String added in v0.11.2

func (t *HashTopic) String() string

type HashTopics added in v0.11.2

type HashTopics map[int]HashTopic

func HashTopicsFromLog added in v0.11.2

func HashTopicsFromLog(rawTopics []common.Hash) HashTopics

type LogParser added in v0.11.2

type LogParser struct {
	// the name of the event
	EventName string
	// the signature of the event
	EventSignature string
	// the abi of the event
	EventAbi string
}

type ParsedLog added in v0.11.2

type ParsedLog interface {
	// get the number of topics
	NumTopics() int

	// get all topics
	Topics() HashTopics

	// get the string representation of the log
	String() string
}

func ParseLog added in v0.11.2

func ParseLog(parser *LogParser, rawLog *types.Log) ParsedLog

NewParsedLog creates a new ParsedLog.

type Topic

type Topic int64

type TxWithLogs

type TxWithLogs struct {
	*types.Transaction
	*types.Receipt
	Pending bool
}

func (*TxWithLogs) Sender

func (t *TxWithLogs) Sender() *common.Address

getTxMessage is used to get the From field of a transaction.

Jump to

Keyboard shortcuts

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