@@ -5,41 +5,44 @@ import (
55 "math/big"
66 "strings"
77 "sync"
8+ "time"
89
910 "github.com/ethereum/go-ethereum/accounts/abi"
1011 "github.com/rs/zerolog/log"
1112)
1213
1314type Transaction struct {
14- ChainId * big.Int `json:"chain_id" ch:"chain_id" swaggertype:"string"`
15- Hash string `json:"hash" ch:"hash"`
16- Nonce uint64 `json:"nonce" ch:"nonce"`
17- BlockHash string `json:"block_hash" ch:"block_hash"`
18- BlockNumber * big.Int `json:"block_number" ch:"block_number" swaggertype:"string"`
19- BlockTimestamp uint64 `json:"block_timestamp" ch:"block_timestamp"`
20- TransactionIndex uint64 `json:"transaction_index" ch:"transaction_index"`
21- FromAddress string `json:"from_address" ch:"from_address"`
22- ToAddress string `json:"to_address" ch:"to_address"`
23- Value * big.Int `json:"value" ch:"value" swaggertype:"string"`
24- Gas uint64 `json:"gas" ch:"gas"`
25- GasPrice * big.Int `json:"gas_price" ch:"gas_price" swaggertype:"string"`
26- Data string `json:"data" ch:"data"`
27- FunctionSelector string `json:"function_selector" ch:"function_selector"`
28- MaxFeePerGas * big.Int `json:"max_fee_per_gas" ch:"max_fee_per_gas" swaggertype:"string"`
29- MaxPriorityFeePerGas * big.Int `json:"max_priority_fee_per_gas" ch:"max_priority_fee_per_gas" swaggertype:"string"`
30- TransactionType uint8 `json:"transaction_type" ch:"transaction_type"`
31- R * big.Int `json:"r" ch:"r" swaggertype:"string"`
32- S * big.Int `json:"s" ch:"s" swaggertype:"string"`
33- V * big.Int `json:"v" ch:"v" swaggertype:"string"`
34- AccessListJson * string `json:"access_list_json" ch:"access_list"`
35- ContractAddress * string `json:"contract_address" ch:"contract_address"`
36- GasUsed * uint64 `json:"gas_used" ch:"gas_used"`
37- CumulativeGasUsed * uint64 `json:"cumulative_gas_used" ch:"cumulative_gas_used"`
38- EffectiveGasPrice * big.Int `json:"effective_gas_price" ch:"effective_gas_price" swaggertype:"string"`
39- BlobGasUsed * uint64 `json:"blob_gas_used" ch:"blob_gas_used"`
40- BlobGasPrice * big.Int `json:"blob_gas_price" ch:"blob_gas_price" swaggertype:"string"`
41- LogsBloom * string `json:"logs_bloom" ch:"logs_bloom"`
42- Status * uint64 `json:"status" ch:"status"`
15+ ChainId * big.Int `json:"chain_id" ch:"chain_id" swaggertype:"string"`
16+ Hash string `json:"hash" ch:"hash"`
17+ Nonce uint64 `json:"nonce" ch:"nonce"`
18+ BlockHash string `json:"block_hash" ch:"block_hash"`
19+ BlockNumber * big.Int `json:"block_number" ch:"block_number" swaggertype:"string"`
20+ BlockTimestamp BlockTimestamp `json:"block_timestamp" ch:"block_timestamp"`
21+ TransactionIndex uint64 `json:"transaction_index" ch:"transaction_index"`
22+ FromAddress string `json:"from_address" ch:"from_address"`
23+ ToAddress string `json:"to_address" ch:"to_address"`
24+ Value * big.Int `json:"value" ch:"value" swaggertype:"string"`
25+ Gas uint64 `json:"gas" ch:"gas"`
26+ GasPrice * big.Int `json:"gas_price" ch:"gas_price" swaggertype:"string"`
27+ Data string `json:"data" ch:"data"`
28+ FunctionSelector string `json:"function_selector" ch:"function_selector"`
29+ MaxFeePerGas * big.Int `json:"max_fee_per_gas" ch:"max_fee_per_gas" swaggertype:"string"`
30+ MaxPriorityFeePerGas * big.Int `json:"max_priority_fee_per_gas" ch:"max_priority_fee_per_gas" swaggertype:"string"`
31+ TransactionType uint8 `json:"transaction_type" ch:"transaction_type"`
32+ R * big.Int `json:"r" ch:"r" swaggertype:"string"`
33+ S * big.Int `json:"s" ch:"s" swaggertype:"string"`
34+ V * big.Int `json:"v" ch:"v" swaggertype:"string"`
35+ AccessListJson * string `json:"access_list_json" ch:"access_list"`
36+ ContractAddress * string `json:"contract_address" ch:"contract_address"`
37+ GasUsed * uint64 `json:"gas_used" ch:"gas_used"`
38+ CumulativeGasUsed * uint64 `json:"cumulative_gas_used" ch:"cumulative_gas_used"`
39+ EffectiveGasPrice * big.Int `json:"effective_gas_price" ch:"effective_gas_price" swaggertype:"string"`
40+ BlobGasUsed * uint64 `json:"blob_gas_used" ch:"blob_gas_used"`
41+ BlobGasPrice * big.Int `json:"blob_gas_price" ch:"blob_gas_price" swaggertype:"string"`
42+ LogsBloom * string `json:"logs_bloom" ch:"logs_bloom"`
43+ Status * uint64 `json:"status" ch:"status"`
44+ Sign int8 `json:"sign" ch:"sign"`
45+ InsertTimestamp time.Time `json:"insert_timestamp" ch:"insert_timestamp"`
4346}
4447
4548type DecodedTransactionData struct {
0 commit comments