Documentation
¶
Index ¶
- type ABI
- type ABIInput
- type ABIItem
- type Decoder
- type DecoderRoute
- type DecoderRouter
- type MatchFunc
- type StandardDecoder
- func (d *StandardDecoder) Decode(name string, chainId string, log types.Log) (*types.Event, error)
- func (d *StandardDecoder) DecodeBatch(logs []types.Log) (*[]types.Event, error)
- func (d *StandardDecoder) RegisterABI(name, abiJson string) error
- func (d *StandardDecoder) RegisterABIFromFile(name string, filepath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DecoderRoute ¶
type DecoderRoute struct {
// The condition that needs to be fulfill
Match MatchFunc
// Name of the abi that registered in decoder
Name string
// The decoder after the condition is fulfilled
Decoder Decoder
}
DecoderRoute pairs a matcher with a decoder
type DecoderRouter ¶
type DecoderRouter struct {
// contains filtered or unexported fields
}
func NewDecoderRouter ¶
func NewDecoderRouter() *DecoderRouter
func (*DecoderRouter) DecodeBatch ¶
DecodeBatch implements the Decoder interface
func (*DecoderRouter) Register ¶
func (r *DecoderRouter) Register(match MatchFunc, abiName string, dec Decoder) *DecoderRouter
Register a decoder with a match condition
type MatchFunc ¶
MatchFunc determines if a decoder should be used for a given log
func ByAddresses ¶
ByAddresses matches logs from any of the addresses
func ByTopicCount ¶
ByTopicCount matches logs with exactly N topics
type StandardDecoder ¶
type StandardDecoder struct {
// contains filtered or unexported fields
}
func NewStandardDecoder ¶
func NewStandardDecoder() *StandardDecoder
func (*StandardDecoder) DecodeBatch ¶
func (*StandardDecoder) RegisterABI ¶
func (d *StandardDecoder) RegisterABI(name, abiJson string) error
func (*StandardDecoder) RegisterABIFromFile ¶
func (d *StandardDecoder) RegisterABIFromFile(name string, filepath string) error
Click to show internal directories.
Click to hide internal directories.