Documentation
¶
Index ¶
- func DecodeLogArgsToLabelData(contractABI *abi.ABI, topics []string, data string) (map[string]interface{}, error)
- func DecodeTransactionInputDataToInterface(contractABI *abi.ABI, data []byte) (map[string]interface{}, error)
- type AccessList
- type BlockJson
- type BlockchainHandler
- type BlocksBatchJson
- type EventData
- type EventJson
- type EventLog
- type QueryFilter
- type Trace
- type TraceActionCall
- type TraceActionReward
- type TraceResult
- type TransactionJson
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessList ¶
type BlockJson ¶
type BlockJson struct { Difficulty string `json:"difficulty"` ExtraData string `json:"extraData"` GasLimit string `json:"gasLimit"` GasUsed string `json:"gasUsed"` Hash string `json:"hash"` LogsBloom string `json:"logsBloom"` Miner string `json:"miner"` Nonce string `json:"nonce"` BlockNumber string `json:"number"` ParentHash string `json:"parentHash"` ReceiptsRoot string `json:"receiptsRoot"` Sha3Uncles string `json:"sha3Uncles"` StateRoot string `json:"stateRoot"` Timestamp string `json:"timestamp"` TotalDifficulty string `json:"totalDifficulty"` TransactionsRoot string `json:"transactionsRoot"` Size string `json:"size"` BaseFeePerGas string `json:"baseFeePerGas"` IndexedAt string `json:"indexed_at"` MixHash string `json:"mixHash,omitempty"` SendCount string `json:"sendCount,omitempty"` SendRoot string `json:"sendRoot,omitempty"` L1BlockNumber string `json:"l1BlockNumber,omitempty"` Transactions []TransactionJson `json:"transactions,omitempty"` }
func ReadJsonBlocks ¶
func ReadJsonBlocks() []*BlockJson
ReadJsonBlocks reads blocks from a JSON file
type BlockchainHandler ¶
BlockchainHandler defines the interface for handling blockchain data fetching.
type BlocksBatchJson ¶
type EventData ¶
type EventData struct { // Common fields... BlockNumber uint64 Data []byte ChainID string Extra interface{} // Use for blockchain-specific additional data }
EventData outlines the structure for blockchain event data.
type EventJson ¶
type EventJson struct { Address string `json:"address"` Topics []string `json:"topics"` Data string `json:"data"` BlockNumber string `json:"blockNumber"` TransactionHash string `json:"transactionHash"` BlockHash string `json:"blockHash"` Removed bool `json:"removed"` LogIndex string `json:"logIndex"` TransactionIndex string `json:"transactionIndex"` }
SingleEvent represents a single event within a transaction
func ReadJsonEventLogs ¶
func ReadJsonEventLogs() []*EventJson
ReadJsonEventLogs reads event logs from a JSON file
type EventLog ¶
type EventLog struct { Address common.Address `json:"address"` // The address of the contract that generated the log. Topics []common.Hash `json:"topics"` // Topics are indexed parameters during log generation. Data []byte `json:"data"` // The data field from the log. BlockNumber *big.Int `json:"blockNumber"` // The block number where this log was in. TransactionHash common.Hash `json:"transactionHash"` // The hash of the transaction that generated this log. BlockHash common.Hash `json:"blockHash"` // The hash of the block where this log was in. Removed bool `json:"removed"` // True if the log was reverted due to a chain reorganization. LogIndex uint64 `json:"logIndex"` // The index of the log in the block. TransactionIndex uint64 `json:"transactionIndex"` // The index of the transaction in the block. }
type QueryFilter ¶
type Trace ¶
type Trace struct { Action json.RawMessage `json:"action"` BlockHash common.Hash `json:"blockHash"` BlockNumber *big.Int `json:"blockNumber"` Result *TraceResult `json:"result,omitempty"` SubTraces int `json:"subtraces"` TraceAddress []int `json:"traceAddress"` TransactionHash common.Hash `json:"transactionHash"` TransactionPosition uint64 `json:"transactionPosition"` Type string `json:"type"` }
type TraceActionCall ¶
type TraceActionReward ¶
type TraceResult ¶
type TransactionJson ¶
type TransactionJson struct { BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` ChainId string `json:"chainId"` FromAddress string `json:"from"` Gas string `json:"gas"` GasPrice string `json:"gasPrice"` Hash string `json:"hash"` Input string `json:"input"` MaxFeePerGas string `json:"maxFeePerGas"` MaxPriorityFeePerGas string `json:"maxPriorityFeePerGas"` Nonce string `json:"nonce"` V string `json:"v"` R string `json:"r"` S string `json:"s"` ToAddress string `json:"to"` TransactionIndex string `json:"transactionIndex"` TransactionType string `json:"type"` Value string `json:"value"` IndexedAt string `json:"indexed_at"` BlockTimestamp string `json:"block_timestamp"` AccessList []AccessList `json:"accessList,omitempty"` YParity string `json:"yParity,omitempty"` Events []EventJson `json:"events,omitempty"` }
func ReadJsonTransactions ¶
func ReadJsonTransactions() []*TransactionJson
ReadJsonTransactions reads transactions from a JSON file
Click to show internal directories.
Click to hide internal directories.