Documentation ¶
Index ¶
- Constants
- func BytesToAddress(data []byte) common.Address
- func BytesToHash(data []byte) types.Hash
- func Compress(data []byte) []byte
- func Decompress(data []byte) ([]byte, error)
- func DeriveBlockNumberOrHash(db *sql.DB, blockNrOrHash BlockNumberOrHash) (*uint64, *types.Hash, error)
- func GetLogsBloom(db *sql.DB, blockNumber uint64) ([]byte, error)
- func GetTopicIndex(topics []types.Hash, idx int) []byte
- func GetTransactionReceiptsBlock(ctx context.Context, db *sql.DB, offset, limit int, chainid uint64, ...) ([]map[string]interface{}, error)
- func TrimPrefix(data []byte) []byte
- func UintToHexBig(a uint64) *hexutil.Big
- type BlockNumberOrHash
- type LogType
- type PluginLoader
- type SortLogs
Constants ¶
View Source
const ( SafeBlockNumber = rpc.BlockNumber(-4) FinalizedBlockNumber = rpc.BlockNumber(-3) PendingBlockNumber = rpc.BlockNumber(-2) LatestBlockNumber = rpc.BlockNumber(-1) EarliestBlockNumber = rpc.BlockNumber(0) )
Variables ¶
This section is empty.
Functions ¶
func BytesToAddress ¶
func BytesToHash ¶
func BytesToHash(data []byte) types.Hash
func Decompress ¶
func DeriveBlockNumberOrHash ¶
func DeriveBlockNumberOrHash(db *sql.DB, blockNrOrHash BlockNumberOrHash) (*uint64, *types.Hash, error)
func GetTopicIndex ¶
func TrimPrefix ¶
func UintToHexBig ¶
Types ¶
type BlockNumberOrHash ¶
type BlockNumberOrHash struct { BlockNumber *rpc.BlockNumber `json:"blockNumber,omitempty"` BlockHash *types.Hash `json:"blockHash,omitempty"` RequireCanonical bool `json:"requireCanonical,omitempty"` }
func BlockNumberOrHashWithHash ¶
func BlockNumberOrHashWithHash(hash types.Hash, canonical bool) BlockNumberOrHash
func BlockNumberOrHashWithNumber ¶
func BlockNumberOrHashWithNumber(blockNr rpc.BlockNumber) BlockNumberOrHash
func (*BlockNumberOrHash) Hash ¶
func (bnh *BlockNumberOrHash) Hash() (types.Hash, bool)
func (*BlockNumberOrHash) Number ¶
func (bnh *BlockNumberOrHash) Number() (rpc.BlockNumber, bool)
func (*BlockNumberOrHash) String ¶ added in v1.7.0
func (bnh *BlockNumberOrHash) String() string
func (*BlockNumberOrHash) UnmarshalJSON ¶
func (bnh *BlockNumberOrHash) UnmarshalJSON(data []byte) error
type LogType ¶
type LogType struct { Address common.Address `json:"address" gencodec:"required"` Topics []types.Hash `json:"topics" gencodec:"required"` Data hexutil.Bytes `json:"data" gencodec: "required"` BlockNumber string `json:"blockNumber"` TxHash types.Hash `json:"transactionHash" gencodec:"required"` TxIndex hexutil.Uint `json:"transactionIndex"` BlockHash types.Hash `json:"blockHash"` Index hexutil.Uint `json:"logIndex"` Removed bool `json:"removed"` }
type PluginLoader ¶
type PluginLoader struct { Plugins []pluginDetails LookupCache map[string][]interface{} }
func NewPluginLoader ¶
func NewPluginLoader(cfg *config.Config) (*PluginLoader, error)
func (*PluginLoader) Initialize ¶
func (pl *PluginLoader) Initialize(cfg *config.Config)
func (*PluginLoader) Lookup ¶
func (pl *PluginLoader) Lookup(name string, validate func(interface{}) bool) []interface{}
Click to show internal directories.
Click to hide internal directories.