Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComparisonOperator ¶
type ComparisonOperator int32
ComparisonOperator is an enumeration of topic comparison operators. ENUM(and,or)
const ( // ComparisonOperatorAnd is a ComparisonOperator of type And. ComparisonOperatorAnd ComparisonOperator = iota // ComparisonOperatorOr is a ComparisonOperator of type Or. ComparisonOperatorOr )
func ParseComparisonOperator ¶
func ParseComparisonOperator(name string) (ComparisonOperator, error)
ParseComparisonOperator attempts to convert a string to a ComparisonOperator
func (ComparisonOperator) String ¶
func (x ComparisonOperator) String() string
String implements the Stringer interface.
type LogResponse ¶
type LogResponse struct {
Address common.Address
BlockNumber uint64 `etherscan:"blockNumber,hex"`
Data []byte
GasPrice *big.Int `etherscan:"gasPrice,hex"`
GasUsed *big.Int `etherscan:"gasUsed,hex"`
LogIndex uint32 `etherscan:"logIndex,hex"`
Timestamp time.Time `etherscan:"timeStamp,hex"`
Topics []common.Hash
TransactionHash common.Hash `etherscan:"transactionHash"`
TransactionIndex uint32 `etherscan:"transactionIndex,hex"`
}
LogResponse contains information on an ethereum log.
type LogsBlockParam ¶
LogsBlockParam contain block-related parameters.
type LogsClient ¶
LogsClient is the client for logs related actions.
func (*LogsClient) GetLogs ¶
func (c *LogsClient) GetLogs(ctx context.Context, req *LogsRequest) ([]LogResponse, error)
GetLogs provides an alternative to the native eth_getLogs.
type LogsRequest ¶
type LogsRequest struct {
FromBlock LogsBlockParam
ToBlock LogsBlockParam
Address common.Address
Topics []common.Hash
Comparisons []TopicComparison
}
LogsRequest contains the request parameters for GetLogs.
type TopicComparison ¶
type TopicComparison struct {
Topics [2]uint8
Operator ComparisonOperator
}
TopicComparison contains parameters for comparing two topics.
Click to show internal directories.
Click to hide internal directories.