From c8b36c3f8e3899558b1767f653523794ad3bcc7f Mon Sep 17 00:00:00 2001 From: kompotkot Date: Thu, 30 May 2024 13:01:45 +0000 Subject: [PATCH 01/13] Code generator for blockchains, typo fix, updated blockchain struct --- blockchain/blockchain.go.tmpl | 592 ++++++++++++++++++ blockchain/common/decoding.go | 180 +++++- blockchain/decoding.go | 112 ---- blockchain/{common => }/handlers.go | 10 +- cmd.go | 77 ++- crawler/README.md | 2 + crawler/crawler.go | 10 +- go.mod | 5 +- go.sum | 4 + indexer/types.go | 2 +- .../synchronizer => synchronizer}/settings.go | 0 .../synchronizer.go | 4 +- 12 files changed, 838 insertions(+), 160 deletions(-) create mode 100644 blockchain/blockchain.go.tmpl delete mode 100644 blockchain/decoding.go rename blockchain/{common => }/handlers.go (93%) rename {blockchain/synchronizer => synchronizer}/settings.go (100%) rename {blockchain/synchronizer => synchronizer}/synchronizer.go (99%) diff --git a/blockchain/blockchain.go.tmpl b/blockchain/blockchain.go.tmpl new file mode 100644 index 0000000..6a0fd0c --- /dev/null +++ b/blockchain/blockchain.go.tmpl @@ -0,0 +1,592 @@ +package {{.BlockchainNameLower}} + +import ( + "context" + "encoding/base64" + "encoding/hex" + "encoding/json" + "fmt" + "math/big" + "strings" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rpc" + seer_common "github.com/moonstream-to/seer/blockchain/common" + "github.com/moonstream-to/seer/indexer" + "google.golang.org/protobuf/proto" +) + +// Client is a wrapper around the specified blockchain JSON-RPC client. +type Client struct { + rpcClient *rpc.Client +} + +func NewClient(url string) (*Client, error) { + rpcClient, err := rpc.DialContext(context.Background(), url) + if err != nil { + return nil, err + } + return &Client{rpcClient: rpcClient}, nil +} + +// Client common + +// ChainType returns the chain type. +func (c *Client) ChainType() string { + return "{{.BlockchainNameLower}}" +} + +// Close closes the underlying RPC client. +func (c *Client) Close() { + c.rpcClient.Close() +} + +// GetLatestBlockNumber returns the latest block number. +func (c *Client) GetLatestBlockNumber() (*big.Int, error) { + var result string + if err := c.rpcClient.CallContext(context.Background(), &result, "eth_blockNumber"); err != nil { + return nil, err + } + + // Convert the hex string to a big.Int + blockNumber, ok := new(big.Int).SetString(result, 0) // The 0 base lets the function infer the base from the string prefix. + if !ok { + return nil, fmt.Errorf("invalid block number format: %s", result) + } + + return blockNumber, nil +} + +// BlockByNumber returns the block with the given number. +func (c *Client) GetBlockByNumber(ctx context.Context, number *big.Int) (*seer_common.BlockJson, error) { + + var rawResponse json.RawMessage // Use RawMessage to capture the entire JSON response + err := c.rpcClient.CallContext(ctx, &rawResponse, "eth_getBlockByNumber", "0x"+number.Text(16), true) + if err != nil { + fmt.Println("Error calling eth_getBlockByNumber: ", err) + return nil, err + } + + var response_json map[string]interface{} + + err = json.Unmarshal(rawResponse, &response_json) + + delete(response_json, "transactions") + + var block *seer_common.BlockJson + err = c.rpcClient.CallContext(ctx, &block, "eth_getBlockByNumber", "0x"+number.Text(16), true) // true to include transactions + return block, err +} + +// BlockByHash returns the block with the given hash. +func (c *Client) BlockByHash(ctx context.Context, hash common.Hash) (*seer_common.BlockJson, error) { + var block *seer_common.BlockJson + err := c.rpcClient.CallContext(ctx, &block, "eth_getBlockByHash", hash, true) // true to include transactions + return block, err +} + +// TransactionReceipt returns the receipt of a transaction by transaction hash. +func (c *Client) TransactionReceipt(ctx context.Context, hash common.Hash) (*types.Receipt, error) { + var receipt *types.Receipt + err := c.rpcClient.CallContext(ctx, &receipt, "eth_getTransactionReceipt", hash) + return receipt, err +} + +func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]*seer_common.EventJson, error) { + var logs []*seer_common.EventJson + fromBlock := q.FromBlock + toBlock := q.ToBlock + batchStep := new(big.Int).Sub(toBlock, fromBlock) // Calculate initial batch step + + for { + // Calculate the next "lastBlock" within the batch step or adjust to "toBlock" if exceeding + nextBlock := new(big.Int).Add(fromBlock, batchStep) + if nextBlock.Cmp(toBlock) > 0 { + nextBlock = new(big.Int).Set(toBlock) + } + + var result []*seer_common.EventJson + err := c.rpcClient.CallContext(ctx, &result, "eth_getLogs", struct { + FromBlock string `json:"fromBlock"` + ToBlock string `json:"toBlock"` + Addresses []common.Address `json:"addresses"` + Topics [][]common.Hash `json:"topics"` + }{ + FromBlock: toHex(fromBlock), + ToBlock: toHex(nextBlock), + Addresses: q.Addresses, + Topics: q.Topics, + }) + + if err != nil { + if strings.Contains(err.Error(), "query returned more than 10000 results") { + // Halve the batch step if too many results and retry + batchStep.Div(batchStep, big.NewInt(2)) + if batchStep.Cmp(big.NewInt(1)) < 0 { + // If the batch step is too small we will skip that block + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + if fromBlock.Cmp(toBlock) > 0 { + break + } + continue + } + continue + } else { + // For any other error, return immediately + return nil, err + } + } + + // Append the results and adjust "fromBlock" for the next batch + logs = append(logs, result...) + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + + // Break the loop if we've reached or exceeded "toBlock" + if fromBlock.Cmp(toBlock) > 0 { + break + } + } + + return logs, nil +} + +// fetchBlocks returns the blocks for a given range. +func (c *Client) fetchBlocks(ctx context.Context, from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + + for i := from; i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + return blocks, nil +} + +// Utility function to convert big.Int to its hexadecimal representation. +func toHex(number *big.Int) string { + return fmt.Sprintf("0x%x", number) +} + +func fromHex(hex string) *big.Int { + number := new(big.Int) + number.SetString(hex, 0) + return number +} + +// FetchBlocksInRange fetches blocks within a specified range. +// This could be useful for batch processing or analysis. +func (c *Client) FetchBlocksInRange(from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + ctx := context.Background() // For simplicity, using a background context; consider timeouts for production. + + for i := new(big.Int).Set(from); i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + fmt.Println("Block number: ", i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + + return blocks, nil +} + +// ParseBlocksAndTransactions parses blocks and their transactions into custom data structures. +// This method showcases how to handle and transform detailed block and transaction data. +func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*{{.BlockchainName}}Block, []*{{.BlockchainName}}Transaction, error) { + blocksJson, err := c.FetchBlocksInRange(from, to) + if err != nil { + return nil, nil, err + } + + var parsedBlocks []*{{.BlockchainName}}Block + var parsedTransactions []*{{.BlockchainName}}Transaction + for _, blockJson := range blocksJson { + // Convert BlockJson to Block and Transactions as required. + parsedBlock := ToProtoSingleBlock(blockJson) + + // Example: Parsing transactions within the block + for _, txJson := range blockJson.Transactions { + + txJson.BlockTimestamp = blockJson.Timestamp + + parsedTransaction := ToProtoSingleTransaction(txJson) + parsedTransactions = append(parsedTransactions, parsedTransaction) + } + + parsedBlocks = append(parsedBlocks, parsedBlock) + } + + return parsedBlocks, parsedTransactions, nil +} + +func (c *Client) ParseEvents(from, to *big.Int, blocksCache map[uint64]indexer.BlockCache) ([]*{{.BlockchainName}}EventLog, error) { + + logs, err := c.ClientFilterLogs(context.Background(), ethereum.FilterQuery{ + FromBlock: from, + ToBlock: to, + }) + + if err != nil { + fmt.Println("Error fetching logs: ", err) + return nil, err + } + + var parsedEvents []*{{.BlockchainName}}EventLog + for _, log := range logs { + parsedEvent := ToProtoSingleEventLog(log) + parsedEvents = append(parsedEvents, parsedEvent) + } + + return parsedEvents, nil +} + +func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCache, error) { + parsedBlocks, parsedTransactions, err := c.ParseBlocksAndTransactions(from, to) + + if err != nil { + return nil, nil, nil, nil, nil, err + } + + blocksCache := make(map[uint64]indexer.BlockCache) + + var blocksProto []proto.Message + var blockIndex []indexer.BlockIndex + for index, block := range parsedBlocks { + blocksProto = append(blocksProto, block) // Assuming block is already a proto.Message + blocksCache[block.BlockNumber] = indexer.BlockCache{ + BlockNumber: block.BlockNumber, + BlockHash: block.Hash, + BlockTimestamp: block.Timestamp, + } // Assuming block.BlockNumber is int64 and block.Hash is string + blockIndex = append(blockIndex, indexer.NewBlockIndex("{{.BlockchainNameLower}}", + block.BlockNumber, + block.Hash, + block.Timestamp, + block.ParentHash, + uint64(index), + "", + )) + } + + var transactionsProto []proto.Message + var transactionIndex []indexer.TransactionIndex + for index, transaction := range parsedTransactions { + transactionsProto = append(transactionsProto, transaction) // Assuming transaction is also a proto.Message + + selector := "0x" + + if len(transaction.Input) > 10 { + selector = transaction.Input[:10] + } + + transactionIndex = append(transactionIndex, indexer.TransactionIndex{ + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + BlockTimestamp: transaction.BlockTimestamp, + FromAddress: transaction.FromAddress, + ToAddress: transaction.ToAddress, + RowID: uint64(index), + Selector: selector, // First 10 characters of the input data 0x + 4 bytes of the function signature + TransactionHash: transaction.Hash, + TransactionIndex: transaction.TransactionIndex, + Type: transaction.TransactionType, + Path: "", + }) + } + + return blocksProto, transactionsProto, blockIndex, transactionIndex, blocksCache, nil +} + +func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]indexer.BlockCache) ([]proto.Message, []indexer.LogIndex, error) { + + parsedEvents, err := c.ParseEvents(from, to, blocksCahche) + + if err != nil { + return nil, nil, err + } + + var eventsProto []proto.Message + var eventsIndex []indexer.LogIndex + for index, event := range parsedEvents { + eventsProto = append(eventsProto, event) // Assuming event is already a proto.Message + + var topic0, topic1, topic2 *string + + if len(event.Topics) == 0 { + fmt.Println("No topics found for event: ", event) + } else { + topic0 = &event.Topics[0] // First topic + } + + // Assign topics based on availability + if len(event.Topics) > 1 { + topic1 = &event.Topics[1] // Second topic, if present + } + if len(event.Topics) > 2 { + topic2 = &event.Topics[2] // Third topic, if present + } + + eventsIndex = append(eventsIndex, indexer.LogIndex{ + Address: event.Address, + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + BlockTimestamp: blocksCahche[event.BlockNumber].BlockTimestamp, + TransactionHash: event.TransactionHash, + Selector: topic0, // First topic + Topic1: topic1, + Topic2: topic2, + RowID: uint64(index), + LogIndex: event.LogIndex, + Path: "", + }) + } + + return eventsProto, eventsIndex, nil + +} +func ToProtoSingleBlock(obj *seer_common.BlockJson) *{{.BlockchainName}}Block { + return &{{.BlockchainName}}Block{ + BlockNumber: fromHex(obj.BlockNumber).Uint64(), + Difficulty: fromHex(obj.Difficulty).Uint64(), + ExtraData: obj.ExtraData, + GasLimit: fromHex(obj.GasLimit).Uint64(), + GasUsed: fromHex(obj.GasUsed).Uint64(), + BaseFeePerGas: obj.BaseFeePerGas, + Hash: obj.Hash, + LogsBloom: obj.LogsBloom, + Miner: obj.Miner, + Nonce: obj.Nonce, + ParentHash: obj.ParentHash, + ReceiptRoot: obj.ReceiptRoot, + Uncles: strings.Join(obj.Uncles, ","), + // convert hex to int32 + Size: fromHex(obj.Size).Uint64(), + StateRoot: obj.StateRoot, + Timestamp: fromHex(obj.Timestamp).Uint64(), + TotalDifficulty: obj.TotalDifficulty, + TransactionsRoot: obj.TransactionsRoot, + IndexedAt: obj.IndexedAt, + } +} + +func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *{{.BlockchainName}}Transaction { + return &{{.BlockchainName}}Transaction{ + Hash: obj.Hash, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), + BlockHash: obj.BlockHash, + FromAddress: obj.FromAddress, + ToAddress: obj.ToAddress, + Gas: obj.Gas, + GasPrice: obj.GasPrice, + MaxFeePerGas: obj.MaxFeePerGas, + MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, + Input: obj.Input, + Nonce: obj.Nonce, + TransactionIndex: fromHex(obj.TransactionIndex).Uint64(), + TransactionType: uint32(fromHex(obj.TransactionType).Uint64()), + Value: obj.Value, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), + BlockTimestamp: fromHex(obj.BlockTimestamp).Uint64(), + } +} + +func ToProtoSingleEventLog(obj *seer_common.EventJson) *{{.BlockchainName}}EventLog { + + return &{{.BlockchainName}}EventLog{ + Address: obj.Address, + Topics: obj.Topics, + Data: obj.Data, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), + TransactionHash: obj.TransactionHash, + LogIndex: fromHex(obj.LogIndex).Uint64(), + BlockHash: obj.BlockHash, + Removed: obj.Removed, + } +} + +func (c *Client) DecodeProtoEventLogs(data []string) ([]*{{.BlockchainName}}EventLog, error) { + var events []*{{.BlockchainName}}EventLog + for _, d := range data { + var event {{.BlockchainName}}EventLog + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &event); err != nil { + return nil, err + } + events = append(events, &event) + } + return events, nil +} + +func (c *Client) DecodeProtoTransactions(data []string) ([]*{{.BlockchainName}}Transaction, error) { + var transactions []*{{.BlockchainName}}Transaction + for _, d := range data { + var transaction {{.BlockchainName}}Transaction + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &transaction); err != nil { + return nil, err + } + transactions = append(transactions, &transaction) + } + return transactions, nil +} + +func (c *Client) DecodeProtoBlocks(data []string) ([]*{{.BlockchainName}}Block, error) { + var blocks []*{{.BlockchainName}}Block + for _, d := range data { + var block {{.BlockchainName}}Block + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &block); err != nil { + return nil, err + } + blocks = append(blocks, &block) + } + return blocks, nil +} + +func (c *Client) DecodeProtoEventsToLabels(events []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.EventLabel, error) { + + decodedEvents, err := c.DecodeProtoEventLogs(events) + + if err != nil { + return nil, err + } + + var labels []indexer.EventLabel + + for _, event := range decodedEvents { + + var topicSelector string + + if len(event.Topics) > 0 { + topicSelector = event.Topics[0][:10] + } else { + continue + } + + checksumAddress := common.HexToAddress(event.Address).Hex() + + // Get the ABI string + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][topicSelector]["abi"])) + if err != nil { + fmt.Println("Error initializing contract ABI: ", err) + return nil, err + } + + // Decode the event data + decodedArgs, err := seer_common.DecodeLogArgsToLabelData(&contractAbi, event.Topics, event.Data) + + if err != nil { + fmt.Println("Error decoding event data: ", err) + return nil, err + } + + // Convert decodedArgs map to JSON + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert event to label + eventLabel := indexer.EventLabel{ + Label: indexer.SeerCrawlerLabel, + LabelName: abiMap[checksumAddress][topicSelector]["abi_name"], + LabelType: "event", + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + Address: event.Address, + TransactionHash: event.TransactionHash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[event.BlockNumber], + LogIndex: event.LogIndex, + } + + labels = append(labels, eventLabel) + + } + + return labels, nil +} + +func (c *Client) DecodeProtoTransactionsToLabels(transactions []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.TransactionLabel, error) { + + decodedTransactions, err := c.DecodeProtoTransactions(transactions) + + if err != nil { + return nil, err + } + + var labels []indexer.TransactionLabel + + for _, transaction := range decodedTransactions { + + selector := transaction.Input[:10] + + // To checksum address + checksumAddress := common.HexToAddress(transaction.ToAddress).Hex() + + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][selector]["abi"])) + + if err != nil { + return nil, err + } + + inputData, err := hex.DecodeString(transaction.Input[2:]) + if err != nil { + fmt.Println("Error decoding input data: ", err) + return nil, err + } + + decodedArgs, err := seer_common.DecodeTransactionInputData(&contractAbi, inputData) + + if err != nil { + fmt.Println("Error decoding transaction input data: ", err) + return nil, err + } + + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert transaction to label + transactionLabel := indexer.TransactionLabel{ + Address: transaction.ToAddress, + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + CallerAddress: transaction.FromAddress, + LabelName: abiMap[checksumAddress][selector]["abi_name"], + LabelType: "tx_call", + OriginAddress: transaction.FromAddress, + Label: indexer.SeerCrawlerLabel, + TransactionHash: transaction.Hash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[transaction.BlockNumber], + } + + labels = append(labels, transactionLabel) + + } + + return labels, nil +} diff --git a/blockchain/common/decoding.go b/blockchain/common/decoding.go index 122302f..e03209d 100644 --- a/blockchain/common/decoding.go +++ b/blockchain/common/decoding.go @@ -1,41 +1,51 @@ package common import ( + "encoding/hex" "encoding/json" "fmt" "log" + "math/big" + "strings" "os" - // "time" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" ) type BlockJson struct { - Difficulty int64 `json:"difficulty"` + Difficulty uint64 `json:"difficulty"` ExtraData string `json:"extraData"` - GasLimit int64 `json:"gasLimit"` - GasUsed int64 `json:"gasUsed"` + GasLimit uint64 `json:"gasLimit"` + GasUsed uint64 `json:"gasUsed"` Hash string `json:"hash"` LogsBloom string `json:"logsBloom"` Miner string `json:"miner"` - MixHash string `json:"mixHash"` Nonce string `json:"nonce"` - BlockNumber int64 `json:"number"` + BlockNumber uint64 `json:"number"` ParentHash string `json:"parentHash"` ReceiptRoot string `json:"receiptRoot"` Sha3Uncles string `json:"sha3Uncles"` StateRoot string `json:"stateRoot"` - Timestamp int64 `json:"timestamp"` + Timestamp uint64 `json:"timestamp"` TotalDifficulty string `json:"totalDifficulty"` TransactionsRoot string `json:"transactionsRoot"` - Uncles string `json:"uncles"` - Size int32 `json:"size"` + Size uint32 `json:"size"` BaseFeePerGas string `json:"baseFeePerGas"` - IndexedAt int64 `json:"indexed_at"` + IndexedAt uint64 `json:"indexed_at"` + + MixHash string `json:"mixHash,omitempty"` + SendCount string `json:"sendCount,omitempty"` + SendRoot string `json:"sendRoot,omitempty"` + L1BlockNumber uint64 `json:"l1BlockNumber,omitempty"` + + Transactions []TransactionJson `json:"transactions,omitempty"` } -type SingleTransactionJson struct { +type TransactionJson struct { AccessList []AccessList `json:"accessList"` BlockHash string `json:"blockHash"` - BlockNumber int64 `json:"blockNumber"` + BlockNumber uint64 `json:"blockNumber"` ChainId string `json:"chainId"` FromAddress string `json:"from"` Gas string `json:"gas"` @@ -45,15 +55,17 @@ type SingleTransactionJson struct { 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 int64 `json:"transactionIndex"` - TransactionType int32 `json:"type"` + TransactionIndex uint64 `json:"transactionIndex"` + TransactionType uint32 `json:"type"` Value string `json:"value"` - YParity string `json:"yParity"` - IndexedAt int64 `json:"indexed_at"` - BlockTimestamp int64 `json:"block_timestamp"` + IndexedAt uint64 `json:"indexed_at"` + BlockTimestamp uint64 `json:"block_timestamp"` + + YParity string `json:"yParity,omitempty"` } type AccessList struct { @@ -62,16 +74,24 @@ type AccessList struct { } // SingleEvent represents a single event within a transaction -type SingleEventJson struct { +type EventJson struct { Address string `json:"address"` Topics []string `json:"topics"` Data string `json:"data"` - BlockNumber int64 `json:"blockNumber"` + BlockNumber uint64 `json:"blockNumber"` TransactionHash string `json:"transactionHash"` BlockHash string `json:"blockHash"` Removed bool `json:"removed"` - LogIndex int64 `json:"logIndex"` - TransactionIndex int64 `json:"transactionIndex"` + LogIndex uint64 `json:"logIndex"` + TransactionIndex uint64 `json:"transactionIndex"` +} + +type QueryFilter struct { + BlockHash string `json:"blockHash"` + FromBlock string `json:"fromBlock"` + ToBlock string `json:"toBlock"` + Address []string `json:"address"` + Topics [][]string `json:"topics"` } // ReadJsonBlocks reads blocks from a JSON file @@ -86,14 +106,14 @@ func ReadJsonBlocks() []*BlockJson { decoder := json.NewDecoder(file) err = decoder.Decode(&blocks) if err != nil { - fmt.Println("error:", err) + log.Printf("error: %v", err) } return blocks } // ReadJsonTransactions reads transactions from a JSON file -func ReadJsonTransactions() []*SingleTransactionJson { +func ReadJsonTransactions() []*TransactionJson { file, err := os.Open("data/transactions_go.json") if err != nil { @@ -101,18 +121,18 @@ func ReadJsonTransactions() []*SingleTransactionJson { } defer file.Close() - var transactions []*SingleTransactionJson + var transactions []*TransactionJson decoder := json.NewDecoder(file) err = decoder.Decode(&transactions) if err != nil { - fmt.Println("error:", err) + log.Printf("error: %v", err) } return transactions } // ReadJsonEventLogs reads event logs from a JSON file -func ReadJsonEventLogs() []*SingleEventJson { +func ReadJsonEventLogs() []*EventJson { file, err := os.Open("data/event_logs_go.json") if err != nil { @@ -120,18 +140,118 @@ func ReadJsonEventLogs() []*SingleEventJson { } defer file.Close() - var eventLogs []*SingleEventJson + var eventLogs []*EventJson decoder := json.NewDecoder(file) - fmt.Println("decoder:", decoder) + log.Printf("decoder: %v", decoder) err = decoder.Decode(&eventLogs) if err != nil { - fmt.Println("error:", err) + log.Printf("error: %v", err) } - fmt.Println("eventLogs:", eventLogs[0]) + log.Printf("eventLogs: %v", eventLogs[0]) return eventLogs } + + +func DecodeTransactionInputDataToInterface(contractABI *abi.ABI, data []byte) (map[string]interface{}, error) { + methodSigData := data[:4] + inputsSigData := data[4:] + method, err := contractABI.MethodById(methodSigData) + if err != nil { + log.Fatal(err) + } + inputsMap := make(map[string]interface{}) + if err := method.Inputs.UnpackIntoMap(inputsMap, inputsSigData); err != nil { + return nil, err + } + + // Prepare the extended map + labelData := make(map[string]interface{}) + labelData["type"] = "tx_call" + labelData["gas_used"] = 0 + labelData["args"] = inputsMap + + // check if labeData is valid json + _, err = json.Marshal(labelData) + if err != nil { + fmt.Println("Error marshalling labelData: ", labelData) + return nil, err + } + + return labelData, nil +} + +func DecodeLogArgsToLabelData(contractABI *abi.ABI, topics []string, data string) (map[string]interface{}, error) { + + topic0 := topics[0] + + // Convert the topic0 string to common.Hash + topic0Hash := common.HexToHash(topic0) + + event, err := contractABI.EventByID( + topic0Hash, + ) + if err != nil { + log.Fatal(err) + } + + // Decode the data string from hex to bytes + dataBytes, err := hex.DecodeString(strings.TrimPrefix(data, "0x")) + if err != nil { + log.Fatalf("Failed to decode data string: %v", err) + } + + // Prepare the map to hold the input data + labelData := make(map[string]interface{}) + labelData["type"] = "event" + labelData["name"] = event.Name + labelData["args"] = make(map[string]interface{}) + + i := 1 + // Extract indexed parameters from topics + for _, input := range event.Inputs { + var arg interface{} + if input.Indexed { + // Note: topic[0] is the event signature, so indexed params start from topic[1] + switch input.Type.T { + case abi.AddressTy: + arg = common.HexToAddress(topics[i]).Hex() + case abi.BytesTy: + arg = common.HexToHash(topics[i]).Hex() + case abi.FixedBytesTy: + if input.Type.Size == 32 { + arg = common.HexToHash(topics[i]).Hex() + } else { + arg = common.BytesToHash(common.Hex2Bytes(topics[i][2:])).Hex() // for other fixed sizes + } + case abi.UintTy: + arg = new(big.Int).SetBytes(common.Hex2Bytes(topics[i][2:])) + case abi.BoolTy: + arg = new(big.Int).SetBytes(common.Hex2Bytes(topics[i][2:])).Cmp(big.NewInt(0)) != 0 + case abi.StringTy: + argBytes, err := hex.DecodeString(strings.TrimPrefix(topics[i], "0x")) + if err != nil { + return nil, fmt.Errorf("failed to decode hex string to normal string: %v", err) + } + arg = string(argBytes) + default: + log.Fatalf("Unsupported indexed type: %s", input.Type.String()) + } + i++ + } else { + arg = "NON-INDEXED" // Placeholder for non-indexed arguments, which will be unpacked later + } + labelData["args"].(map[string]interface{})[input.Name] = arg + } + + // Unpack the data bytes into the args map + if err := event.Inputs.UnpackIntoMap(labelData["args"].(map[string]interface{}), dataBytes); err != nil { + return nil, err + } + + return labelData, nil +} diff --git a/blockchain/decoding.go b/blockchain/decoding.go deleted file mode 100644 index a9b0853..0000000 --- a/blockchain/decoding.go +++ /dev/null @@ -1,112 +0,0 @@ -package blockchain - -import ( - "encoding/hex" - "encoding/json" - "fmt" - "log" - "math/big" - "strings" - - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/common" -) - -func DecodeTransactionInputData(contractABI *abi.ABI, data []byte) (map[string]interface{}, error) { - methodSigData := data[:4] - inputsSigData := data[4:] - method, err := contractABI.MethodById(methodSigData) - if err != nil { - log.Fatal(err) - } - inputsMap := make(map[string]interface{}) - if err := method.Inputs.UnpackIntoMap(inputsMap, inputsSigData); err != nil { - return nil, err - } - - // Prepare the extended map - labelData := make(map[string]interface{}) - labelData["type"] = "tx_call" - labelData["gas_used"] = 0 - labelData["args"] = inputsMap - - // check if labeData is valid json - _, err = json.Marshal(labelData) - if err != nil { - fmt.Println("Error marshalling labelData: ", labelData) - return nil, err - } - - return labelData, nil -} - -func DecodeLogArgsToLabelData(contractABI *abi.ABI, topics []string, data string) (map[string]interface{}, error) { - - topic0 := topics[0] - - // Convert the topic0 string to common.Hash - topic0Hash := common.HexToHash(topic0) - - event, err := contractABI.EventByID( - topic0Hash, - ) - if err != nil { - log.Fatal(err) - } - - // Decode the data string from hex to bytes - dataBytes, err := hex.DecodeString(strings.TrimPrefix(data, "0x")) - if err != nil { - log.Fatalf("Failed to decode data string: %v", err) - } - - // Prepare the map to hold the input data - labelData := make(map[string]interface{}) - labelData["type"] = "event" - labelData["name"] = event.Name - labelData["args"] = make(map[string]interface{}) - - i := 1 - // Extract indexed parameters from topics - for _, input := range event.Inputs { - var arg interface{} - if input.Indexed { - // Note: topic[0] is the event signature, so indexed params start from topic[1] - switch input.Type.T { - case abi.AddressTy: - arg = common.HexToAddress(topics[i]).Hex() - case abi.BytesTy: - arg = common.HexToHash(topics[i]).Hex() - case abi.FixedBytesTy: - if input.Type.Size == 32 { - arg = common.HexToHash(topics[i]).Hex() - } else { - arg = common.BytesToHash(common.Hex2Bytes(topics[i][2:])).Hex() // for other fixed sizes - } - case abi.UintTy: - arg = new(big.Int).SetBytes(common.Hex2Bytes(topics[i][2:])) - case abi.BoolTy: - arg = new(big.Int).SetBytes(common.Hex2Bytes(topics[i][2:])).Cmp(big.NewInt(0)) != 0 - case abi.StringTy: - argBytes, err := hex.DecodeString(strings.TrimPrefix(topics[i], "0x")) - if err != nil { - return nil, fmt.Errorf("failed to decode hex string to normal string: %v", err) - } - arg = string(argBytes) - default: - log.Fatalf("Unsupported indexed type: %s", input.Type.String()) - } - i++ - } else { - arg = "NON-INDEXED" // Placeholder for non-indexed arguments, which will be unpacked later - } - labelData["args"].(map[string]interface{})[input.Name] = arg - } - - // Unpack the data bytes into the args map - if err := event.Inputs.UnpackIntoMap(labelData["args"].(map[string]interface{}), dataBytes); err != nil { - return nil, err - } - - return labelData, nil -} diff --git a/blockchain/common/handlers.go b/blockchain/handlers.go similarity index 93% rename from blockchain/common/handlers.go rename to blockchain/handlers.go index 19b7a76..a9487f9 100644 --- a/blockchain/common/handlers.go +++ b/blockchain/handlers.go @@ -1,4 +1,4 @@ -package common +package blockchain import ( "errors" @@ -37,8 +37,8 @@ type BlockData struct { type BlockchainClient interface { // GetBlockByNumber(ctx context.Context, number *big.Int) (*proto.Message, error) GetLatestBlockNumber() (*big.Int, error) - FetchAsProtoEvents(*big.Int, *big.Int, map[uint64]indexer.BlockCahche) ([]proto.Message, []indexer.LogIndex, error) - FetchAsProtoBlocks(*big.Int, *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCahche, error) + FetchAsProtoEvents(*big.Int, *big.Int, map[uint64]indexer.BlockCache) ([]proto.Message, []indexer.LogIndex, error) + FetchAsProtoBlocks(*big.Int, *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCache, error) DecodeProtoEventsToLabels([]string, map[uint64]uint64, map[string]map[string]map[string]string) ([]indexer.EventLabel, error) DecodeProtoTransactionsToLabels([]string, map[uint64]uint64, map[string]map[string]map[string]string) ([]indexer.TransactionLabel, error) ChainType() string @@ -69,7 +69,7 @@ func NewClient(chainType string, url string) (BlockchainClient, error) { } // crawl blocks -func CrawlBlocks(client BlockchainClient, startBlock *big.Int, endBlock *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCahche, error) { +func CrawlBlocks(client BlockchainClient, startBlock *big.Int, endBlock *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCache, error) { blocks, transactions, blocksIndex, transactionsIndex, blocksCache, err := client.FetchAsProtoBlocks(startBlock, endBlock) if err != nil { return nil, nil, nil, nil, nil, err @@ -81,7 +81,7 @@ func CrawlBlocks(client BlockchainClient, startBlock *big.Int, endBlock *big.Int } -func CrawlEvents(client BlockchainClient, startBlock *big.Int, endBlock *big.Int, BlockCahche map[uint64]indexer.BlockCahche) ([]proto.Message, []indexer.LogIndex, error) { +func CrawlEvents(client BlockchainClient, startBlock *big.Int, endBlock *big.Int, BlockCahche map[uint64]indexer.BlockCache) ([]proto.Message, []indexer.LogIndex, error) { events, eventsIndex, err := client.FetchAsProtoEvents(startBlock, endBlock, BlockCahche) if err != nil { diff --git a/cmd.go b/cmd.go index ff1cf51..a0e4985 100644 --- a/cmd.go +++ b/cmd.go @@ -6,17 +6,19 @@ import ( "fmt" "go/format" "io" + "log" "os" "strings" + "text/template" "github.com/spf13/cobra" - "github.com/moonstream-to/seer/blockchain/synchronizer" "github.com/moonstream-to/seer/crawler" "github.com/moonstream-to/seer/evm" "github.com/moonstream-to/seer/indexer" "github.com/moonstream-to/seer/starknet" "github.com/moonstream-to/seer/storage" + "github.com/moonstream-to/seer/synchronizer" "github.com/moonstream-to/seer/version" ) @@ -32,12 +34,13 @@ func CreateRootCommand() *cobra.Command { completionCmd := CreateCompletionCommand(rootCmd) versionCmd := CreateVersionCommand() + blockchainCmd := CreateBlockchainCommand() starknetCmd := CreateStarknetCommand() crawlerCmd := CreateCrawlerCommand() indexCmd := CreateIndexCommand() evmCmd := CreateEVMCommand() synchronizerCmd := CreateSynchronizerCommand() - rootCmd.AddCommand(completionCmd, versionCmd, starknetCmd, evmCmd, crawlerCmd, indexCmd, synchronizerCmd) + rootCmd.AddCommand(completionCmd, versionCmd, blockchainCmd, starknetCmd, evmCmd, crawlerCmd, indexCmd, synchronizerCmd) // By default, cobra Command objects write to stderr. We have to forcibly set them to output to // stdout. @@ -112,6 +115,76 @@ func CreateVersionCommand() *cobra.Command { return versionCmd } +func CreateBlockchainCommand() *cobra.Command { + blockchainCmd := &cobra.Command{ + Use: "blockchain", + Short: "Generate methods and types for different blockchains", + Run: func(cmd *cobra.Command, args []string) { + cmd.Help() + }, + } + + blockchainGenerateCmd := CreateBlockchainGenerateCommand() + blockchainCmd.AddCommand(blockchainGenerateCmd) + + return blockchainCmd +} + +type BlockchainTemplateData struct { + BlockchainName string + BlockchainNameLower string +} + +func CreateBlockchainGenerateCommand() *cobra.Command { + var blockchainNameLower string + + blockchainGenerateCmd := &cobra.Command{ + Use: "generate", + Short: "Generate methods and types for different blockchains from template", + RunE: func(cmd *cobra.Command, args []string) error { + blockchainNameFilePath := fmt.Sprintf("blockchain/%s/%s.go", blockchainNameLower, blockchainNameLower) + + var blockchainName string + blockchainNameList := strings.Split(blockchainNameLower, "_") + for _, w := range blockchainNameList { + blockchainName += strings.Title(w) + } + + // Read and parse the template file + tmpl, parseErr := template.ParseFiles("blockchain/blockchain.go.tmpl") + if parseErr != nil { + return parseErr + } + + // Create output file + mkdirErr := os.Mkdir(blockchainNameLower, 0775) + if mkdirErr != nil { + return mkdirErr + } + outputFile, createErr := os.Create(blockchainNameFilePath) + if createErr != nil { + return createErr + } + defer outputFile.Close() + + // Execute template and write to output file + data := BlockchainTemplateData{BlockchainName: blockchainName, BlockchainNameLower: blockchainNameLower} + execErr := tmpl.Execute(outputFile, data) + if execErr != nil { + return execErr + } + + log.Printf("Blockchain file generated successfully: %s", blockchainNameFilePath) + + return nil + }, + } + + blockchainGenerateCmd.Flags().StringVarP(&blockchainNameLower, "name", "n", "", "The name of the blockchain to generate lowercase (example: 'arbitrum_one')") + + return blockchainGenerateCmd +} + func CreateStarknetCommand() *cobra.Command { starknetCmd := &cobra.Command{ Use: "starknet", diff --git a/crawler/README.md b/crawler/README.md index 7208a27..e908fa3 100644 --- a/crawler/README.md +++ b/crawler/README.md @@ -43,6 +43,8 @@ Will generate the following files: ## Regenerate proto interface +Proto compiler docs: https://protobuf.dev/reference/go/go-generated/ + ```bash protoc --go_out=. --go_opt=paths=source_relative \ blocks_transactions_.proto diff --git a/crawler/crawler.go b/crawler/crawler.go index 3727a0d..656af6b 100644 --- a/crawler/crawler.go +++ b/crawler/crawler.go @@ -9,7 +9,7 @@ import ( "path/filepath" "time" - "github.com/moonstream-to/seer/blockchain/common" + "github.com/moonstream-to/seer/blockchain" "github.com/moonstream-to/seer/indexer" "github.com/moonstream-to/seer/storage" "google.golang.org/protobuf/proto" @@ -92,7 +92,7 @@ func (c *Crawler) Start() { panic(err) } - client, err := common.NewClient(chainType, BlockchainURLs[chainType]) + client, err := blockchain.NewClient(chainType, BlockchainURLs[chainType]) if err != nil { log.Fatal(err) } @@ -187,7 +187,7 @@ func (c *Crawler) Start() { // Retry the operation in case of failure with cumulative attempts err = retryOperation(retryAttempts, retryWaitTime, func() error { - blocks, transactions, blockIndex, transactionIndex, blocksCache, err := common.CrawlBlocks(client, big.NewInt(int64(c.startBlock)), big.NewInt(int64(endBlock))) + blocks, transactions, blockIndex, transactionIndex, blocksCache, err := blockchain.CrawlBlocks(client, big.NewInt(int64(c.startBlock)), big.NewInt(int64(endBlock))) if err != nil { return fmt.Errorf("failed to crawl blocks: %w", err) } @@ -247,7 +247,7 @@ func (c *Crawler) Start() { return fmt.Errorf("failed to write transaction index to database: %w", err) } - events, eventsIndex, err := common.CrawlEvents(client, big.NewInt(int64(c.startBlock)), big.NewInt(int64(endBlock)), blocksCache) + events, eventsIndex, err := blockchain.CrawlEvents(client, big.NewInt(int64(c.startBlock)), big.NewInt(int64(endBlock)), blocksCache) if err != nil { return fmt.Errorf("failed to crawl events: %w", err) } @@ -289,5 +289,5 @@ func (c *Crawler) Start() { } } -// You can add more methods here for additional functionalities +// TODO: methods here for additional functionalities // such as handling reconnection logic, managing crawler state, etc. diff --git a/go.mod b/go.mod index 6a08404..822ff77 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect @@ -76,14 +76,13 @@ require ( golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.15.0 // indirect google.golang.org/api v0.167.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240304161311-37d4d3c04a78 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641 // indirect google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gorm.io/driver/postgres v0.2.4 // indirect gorm.io/driver/sqlite v1.0.2 // indirect rsc.io/tmplfunc v0.0.3 // indirect diff --git a/go.sum b/go.sum index ba5d2ae..d257143 100644 --- a/go.sum +++ b/go.sum @@ -126,6 +126,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -539,6 +541,8 @@ google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+Rur google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/indexer/types.go b/indexer/types.go index 8b14c03..d168603 100644 --- a/indexer/types.go +++ b/indexer/types.go @@ -110,7 +110,7 @@ const ( LogIndexType IndexType = "logs" ) -type BlockCahche struct { +type BlockCache struct { BlockNumber uint64 BlockTimestamp uint64 BlockHash string diff --git a/blockchain/synchronizer/settings.go b/synchronizer/settings.go similarity index 100% rename from blockchain/synchronizer/settings.go rename to synchronizer/settings.go diff --git a/blockchain/synchronizer/synchronizer.go b/synchronizer/synchronizer.go similarity index 99% rename from blockchain/synchronizer/synchronizer.go rename to synchronizer/synchronizer.go index 65f05f5..1c5067d 100644 --- a/blockchain/synchronizer/synchronizer.go +++ b/synchronizer/synchronizer.go @@ -11,7 +11,7 @@ import ( "sync" "time" - "github.com/moonstream-to/seer/blockchain/common" + "github.com/moonstream-to/seer/blockchain" "github.com/moonstream-to/seer/indexer" "github.com/moonstream-to/seer/storage" ) @@ -154,7 +154,7 @@ func (d *Synchronizer) syncCycle() error { errChan := make(chan error, 1) // Buffered channel for error handling // Read client - client, err := common.NewClient(d.blockchain, "") + client, err := blockchain.NewClient(d.blockchain, "") if err != nil { log.Println("Error initializing blockchain client:", err) log.Fatal(err) From ba31818f6fbf422e9ddd595482163f63f6af4032 Mon Sep 17 00:00:00 2001 From: kompotkot Date: Thu, 30 May 2024 14:43:30 +0000 Subject: [PATCH 02/13] Functional generator, updated ethereum and polygon interfaces --- blockchain/blockchain.go.tmpl | 44 +-- blockchain/common/decoding.go | 7 +- blockchain/ethereum/ethereum.go | 112 +++---- .../ethereum/ethereum_index_types.pb.go | 302 +++++++++--------- .../ethereum/ethereum_index_types.proto | 10 +- blockchain/ethereum/types.go | 75 ----- blockchain/polygon/polygon.go | 150 ++++----- blockchain/polygon/polygon_index_types.pb.go | 300 ++++++++--------- blockchain/polygon/polygon_index_types.proto | 10 +- blockchain/polygon/types.go | 75 ----- cmd.go | 13 +- indexer/types.go | 4 +- 12 files changed, 462 insertions(+), 640 deletions(-) delete mode 100644 blockchain/ethereum/types.go delete mode 100644 blockchain/polygon/types.go diff --git a/blockchain/blockchain.go.tmpl b/blockchain/blockchain.go.tmpl index 6a0fd0c..a4278bb 100644 --- a/blockchain/blockchain.go.tmpl +++ b/blockchain/blockchain.go.tmpl @@ -19,11 +19,6 @@ import ( "google.golang.org/protobuf/proto" ) -// Client is a wrapper around the specified blockchain JSON-RPC client. -type Client struct { - rpcClient *rpc.Client -} - func NewClient(url string) (*Client, error) { rpcClient, err := rpc.DialContext(context.Background(), url) if err != nil { @@ -32,6 +27,12 @@ func NewClient(url string) (*Client, error) { return &Client{rpcClient: rpcClient}, nil } +// Client is a wrapper around the Ethereum JSON-RPC client. + +type Client struct { + rpcClient *rpc.Client +} + // Client common // ChainType returns the chain type. @@ -215,7 +216,7 @@ func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*{{.Blockchain txJson.BlockTimestamp = blockJson.Timestamp - parsedTransaction := ToProtoSingleTransaction(txJson) + parsedTransaction := ToProtoSingleTransaction(&txJson) parsedTransactions = append(parsedTransactions, parsedTransaction) } @@ -352,11 +353,11 @@ func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]i } func ToProtoSingleBlock(obj *seer_common.BlockJson) *{{.BlockchainName}}Block { return &{{.BlockchainName}}Block{ - BlockNumber: fromHex(obj.BlockNumber).Uint64(), - Difficulty: fromHex(obj.Difficulty).Uint64(), + BlockNumber: obj.BlockNumber, + Difficulty: obj.Difficulty, ExtraData: obj.ExtraData, - GasLimit: fromHex(obj.GasLimit).Uint64(), - GasUsed: fromHex(obj.GasUsed).Uint64(), + GasLimit: obj.GasLimit, + GasUsed: obj.GasUsed, BaseFeePerGas: obj.BaseFeePerGas, Hash: obj.Hash, LogsBloom: obj.LogsBloom, @@ -364,11 +365,10 @@ func ToProtoSingleBlock(obj *seer_common.BlockJson) *{{.BlockchainName}}Block { Nonce: obj.Nonce, ParentHash: obj.ParentHash, ReceiptRoot: obj.ReceiptRoot, - Uncles: strings.Join(obj.Uncles, ","), - // convert hex to int32 - Size: fromHex(obj.Size).Uint64(), + Sha3Uncles: obj.Sha3Uncles, + Size: obj.Size, StateRoot: obj.StateRoot, - Timestamp: fromHex(obj.Timestamp).Uint64(), + Timestamp: obj.Timestamp, TotalDifficulty: obj.TotalDifficulty, TransactionsRoot: obj.TransactionsRoot, IndexedAt: obj.IndexedAt, @@ -378,7 +378,7 @@ func ToProtoSingleBlock(obj *seer_common.BlockJson) *{{.BlockchainName}}Block { func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *{{.BlockchainName}}Transaction { return &{{.BlockchainName}}Transaction{ Hash: obj.Hash, - BlockNumber: fromHex(obj.BlockNumber).Uint64(), + BlockNumber: obj.BlockNumber, BlockHash: obj.BlockHash, FromAddress: obj.FromAddress, ToAddress: obj.ToAddress, @@ -388,11 +388,11 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *{{.BlockchainNa MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, Input: obj.Input, Nonce: obj.Nonce, - TransactionIndex: fromHex(obj.TransactionIndex).Uint64(), - TransactionType: uint32(fromHex(obj.TransactionType).Uint64()), + TransactionIndex: obj.TransactionIndex, + TransactionType: obj.TransactionType, Value: obj.Value, - IndexedAt: fromHex(obj.IndexedAt).Uint64(), - BlockTimestamp: fromHex(obj.BlockTimestamp).Uint64(), + IndexedAt: obj.IndexedAt, + BlockTimestamp: obj.BlockTimestamp, } } @@ -402,9 +402,9 @@ func ToProtoSingleEventLog(obj *seer_common.EventJson) *{{.BlockchainName}}Event Address: obj.Address, Topics: obj.Topics, Data: obj.Data, - BlockNumber: fromHex(obj.BlockNumber).Uint64(), + BlockNumber: obj.BlockNumber, TransactionHash: obj.TransactionHash, - LogIndex: fromHex(obj.LogIndex).Uint64(), + LogIndex: obj.LogIndex, BlockHash: obj.BlockHash, Removed: obj.Removed, } @@ -554,7 +554,7 @@ func (c *Client) DecodeProtoTransactionsToLabels(transactions []string, blocksCa return nil, err } - decodedArgs, err := seer_common.DecodeTransactionInputData(&contractAbi, inputData) + decodedArgs, err := seer_common.DecodeTransactionInputDataToInterface(&contractAbi, inputData) if err != nil { fmt.Println("Error decoding transaction input data: ", err) diff --git a/blockchain/common/decoding.go b/blockchain/common/decoding.go index e03209d..cf22aa0 100644 --- a/blockchain/common/decoding.go +++ b/blockchain/common/decoding.go @@ -6,8 +6,8 @@ import ( "fmt" "log" "math/big" - "strings" "os" + "strings" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" @@ -30,7 +30,7 @@ type BlockJson struct { Timestamp uint64 `json:"timestamp"` TotalDifficulty string `json:"totalDifficulty"` TransactionsRoot string `json:"transactionsRoot"` - Size uint32 `json:"size"` + Size uint64 `json:"size"` BaseFeePerGas string `json:"baseFeePerGas"` IndexedAt uint64 `json:"indexed_at"` @@ -60,7 +60,7 @@ type TransactionJson struct { S string `json:"s"` ToAddress string `json:"to"` TransactionIndex uint64 `json:"transactionIndex"` - TransactionType uint32 `json:"type"` + TransactionType uint64 `json:"type"` Value string `json:"value"` IndexedAt uint64 `json:"indexed_at"` BlockTimestamp uint64 `json:"block_timestamp"` @@ -156,7 +156,6 @@ func ReadJsonEventLogs() []*EventJson { return eventLogs } - func DecodeTransactionInputDataToInterface(contractABI *abi.ABI, data []byte) (map[string]interface{}, error) { methodSigData := data[:4] inputsSigData := data[4:] diff --git a/blockchain/ethereum/ethereum.go b/blockchain/ethereum/ethereum.go index 49fca69..9fbac92 100644 --- a/blockchain/ethereum/ethereum.go +++ b/blockchain/ethereum/ethereum.go @@ -14,7 +14,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc" - "github.com/moonstream-to/seer/blockchain" + seer_common "github.com/moonstream-to/seer/blockchain/common" "github.com/moonstream-to/seer/indexer" "google.golang.org/protobuf/proto" ) @@ -62,7 +62,7 @@ func (c *Client) GetLatestBlockNumber() (*big.Int, error) { } // BlockByNumber returns the block with the given number. -func (c *Client) GetBlockByNumber(ctx context.Context, number *big.Int) (*EthereumBlockJson, error) { +func (c *Client) GetBlockByNumber(ctx context.Context, number *big.Int) (*seer_common.BlockJson, error) { var rawResponse json.RawMessage // Use RawMessage to capture the entire JSON response err := c.rpcClient.CallContext(ctx, &rawResponse, "eth_getBlockByNumber", "0x"+number.Text(16), true) @@ -77,29 +77,27 @@ func (c *Client) GetBlockByNumber(ctx context.Context, number *big.Int) (*Ethere delete(response_json, "transactions") - var block *EthereumBlockJson + var block *seer_common.BlockJson err = c.rpcClient.CallContext(ctx, &block, "eth_getBlockByNumber", "0x"+number.Text(16), true) // true to include transactions return block, err } // BlockByHash returns the block with the given hash. - -func (c *Client) BlockByHash(ctx context.Context, hash common.Hash) (*EthereumBlockJson, error) { - var block *EthereumBlockJson +func (c *Client) BlockByHash(ctx context.Context, hash common.Hash) (*seer_common.BlockJson, error) { + var block *seer_common.BlockJson err := c.rpcClient.CallContext(ctx, &block, "eth_getBlockByHash", hash, true) // true to include transactions return block, err } // TransactionReceipt returns the receipt of a transaction by transaction hash. - func (c *Client) TransactionReceipt(ctx context.Context, hash common.Hash) (*types.Receipt, error) { var receipt *types.Receipt err := c.rpcClient.CallContext(ctx, &receipt, "eth_getTransactionReceipt", hash) return receipt, err } -func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]*EthereumSingleEventJson, error) { - var logs []*EthereumSingleEventJson +func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]*seer_common.EventJson, error) { + var logs []*seer_common.EventJson fromBlock := q.FromBlock toBlock := q.ToBlock batchStep := new(big.Int).Sub(toBlock, fromBlock) // Calculate initial batch step @@ -111,7 +109,7 @@ func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ( nextBlock = new(big.Int).Set(toBlock) } - var result []*EthereumSingleEventJson + var result []*seer_common.EventJson err := c.rpcClient.CallContext(ctx, &result, "eth_getLogs", struct { FromBlock string `json:"fromBlock"` ToBlock string `json:"toBlock"` @@ -130,14 +128,11 @@ func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ( batchStep.Div(batchStep, big.NewInt(2)) if batchStep.Cmp(big.NewInt(1)) < 0 { // If the batch step is too small we will skip that block - fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) if fromBlock.Cmp(toBlock) > 0 { break } continue - - //return nil, fmt.Errorf("unable to fetch logs: batch step too small") } continue } else { @@ -160,9 +155,8 @@ func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ( } // fetchBlocks returns the blocks for a given range. - -func (c *Client) fetchBlocks(ctx context.Context, from, to *big.Int) ([]*EthereumBlockJson, error) { - var blocks []*EthereumBlockJson +func (c *Client) fetchBlocks(ctx context.Context, from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson for i := from; i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { block, err := c.GetBlockByNumber(ctx, i) @@ -187,8 +181,8 @@ func fromHex(hex string) *big.Int { // FetchBlocksInRange fetches blocks within a specified range. // This could be useful for batch processing or analysis. -func (c *Client) FetchBlocksInRange(from, to *big.Int) ([]*EthereumBlockJson, error) { - var blocks []*EthereumBlockJson +func (c *Client) FetchBlocksInRange(from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson ctx := context.Background() // For simplicity, using a background context; consider timeouts for production. for i := new(big.Int).Set(from); i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { @@ -205,14 +199,14 @@ func (c *Client) FetchBlocksInRange(from, to *big.Int) ([]*EthereumBlockJson, er // ParseBlocksAndTransactions parses blocks and their transactions into custom data structures. // This method showcases how to handle and transform detailed block and transaction data. -func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*EthereumBlock, []*EthereumSingleTransaction, error) { +func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*EthereumBlock, []*EthereumTransaction, error) { blocksJson, err := c.FetchBlocksInRange(from, to) if err != nil { return nil, nil, err } var parsedBlocks []*EthereumBlock - var parsedTransactions []*EthereumSingleTransaction + var parsedTransactions []*EthereumTransaction for _, blockJson := range blocksJson { // Convert BlockJson to Block and Transactions as required. parsedBlock := ToProtoSingleBlock(blockJson) @@ -222,7 +216,7 @@ func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*EthereumBlock txJson.BlockTimestamp = blockJson.Timestamp - parsedTransaction := ToProtoSingleTransaction(txJson) + parsedTransaction := ToProtoSingleTransaction(&txJson) parsedTransactions = append(parsedTransactions, parsedTransaction) } @@ -232,7 +226,7 @@ func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*EthereumBlock return parsedBlocks, parsedTransactions, nil } -func (c *Client) ParseEvents(from, to *big.Int, blocksCache map[uint64]indexer.BlockCahche) ([]*EthereumEventLog, error) { +func (c *Client) ParseEvents(from, to *big.Int, blocksCache map[uint64]indexer.BlockCache) ([]*EthereumEventLog, error) { logs, err := c.ClientFilterLogs(context.Background(), ethereum.FilterQuery{ FromBlock: from, @@ -253,20 +247,20 @@ func (c *Client) ParseEvents(from, to *big.Int, blocksCache map[uint64]indexer.B return parsedEvents, nil } -func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCahche, error) { +func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCache, error) { parsedBlocks, parsedTransactions, err := c.ParseBlocksAndTransactions(from, to) if err != nil { return nil, nil, nil, nil, nil, err } - blocksCache := make(map[uint64]indexer.BlockCahche) + blocksCache := make(map[uint64]indexer.BlockCache) var blocksProto []proto.Message var blockIndex []indexer.BlockIndex for index, block := range parsedBlocks { blocksProto = append(blocksProto, block) // Assuming block is already a proto.Message - blocksCache[block.BlockNumber] = indexer.BlockCahche{ + blocksCache[block.BlockNumber] = indexer.BlockCache{ BlockNumber: block.BlockNumber, BlockHash: block.Hash, BlockTimestamp: block.Timestamp, @@ -310,7 +304,7 @@ func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto return blocksProto, transactionsProto, blockIndex, transactionIndex, blocksCache, nil } -func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]indexer.BlockCahche) ([]proto.Message, []indexer.LogIndex, error) { +func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]indexer.BlockCache) ([]proto.Message, []indexer.LogIndex, error) { parsedEvents, err := c.ParseEvents(from, to, blocksCahche) @@ -357,35 +351,34 @@ func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]i return eventsProto, eventsIndex, nil } -func ToProtoSingleBlock(obj *EthereumBlockJson) *EthereumBlock { +func ToProtoSingleBlock(obj *seer_common.BlockJson) *EthereumBlock { return &EthereumBlock{ - BlockNumber: fromHex(obj.BlockNumber).Uint64(), - Difficulty: fromHex(obj.Difficulty).Uint64(), - ExtraData: obj.ExtraData, - GasLimit: fromHex(obj.GasLimit).Uint64(), - GasUsed: fromHex(obj.GasUsed).Uint64(), - BaseFeePerGas: obj.BaseFeePerGas, - Hash: obj.Hash, - LogsBloom: obj.LogsBloom, - Miner: obj.Miner, - Nonce: obj.Nonce, - ParentHash: obj.ParentHash, - ReceiptRoot: obj.ReceiptRoot, - Uncles: strings.Join(obj.Uncles, ","), - // convert hex to int32 - Size: fromHex(obj.Size).Uint64(), + BlockNumber: obj.BlockNumber, + Difficulty: obj.Difficulty, + ExtraData: obj.ExtraData, + GasLimit: obj.GasLimit, + GasUsed: obj.GasUsed, + BaseFeePerGas: obj.BaseFeePerGas, + Hash: obj.Hash, + LogsBloom: obj.LogsBloom, + Miner: obj.Miner, + Nonce: obj.Nonce, + ParentHash: obj.ParentHash, + ReceiptRoot: obj.ReceiptRoot, + Sha3Uncles: obj.Sha3Uncles, + Size: obj.Size, StateRoot: obj.StateRoot, - Timestamp: fromHex(obj.Timestamp).Uint64(), + Timestamp: obj.Timestamp, TotalDifficulty: obj.TotalDifficulty, TransactionsRoot: obj.TransactionsRoot, IndexedAt: obj.IndexedAt, } } -func ToProtoSingleTransaction(obj *EthereumSingleTransactionJson) *EthereumSingleTransaction { - return &EthereumSingleTransaction{ +func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *EthereumTransaction { + return &EthereumTransaction{ Hash: obj.Hash, - BlockNumber: fromHex(obj.BlockNumber).Uint64(), + BlockNumber: obj.BlockNumber, BlockHash: obj.BlockHash, FromAddress: obj.FromAddress, ToAddress: obj.ToAddress, @@ -395,23 +388,23 @@ func ToProtoSingleTransaction(obj *EthereumSingleTransactionJson) *EthereumSingl MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, Input: obj.Input, Nonce: obj.Nonce, - TransactionIndex: fromHex(obj.TransactionIndex).Uint64(), - TransactionType: uint32(fromHex(obj.TransactionType).Uint64()), + TransactionIndex: obj.TransactionIndex, + TransactionType: obj.TransactionType, Value: obj.Value, - IndexedAt: fromHex(obj.IndexedAt).Uint64(), - BlockTimestamp: fromHex(obj.BlockTimestamp).Uint64(), + IndexedAt: obj.IndexedAt, + BlockTimestamp: obj.BlockTimestamp, } } -func ToProtoSingleEventLog(obj *EthereumSingleEventJson) *EthereumEventLog { +func ToProtoSingleEventLog(obj *seer_common.EventJson) *EthereumEventLog { return &EthereumEventLog{ Address: obj.Address, Topics: obj.Topics, Data: obj.Data, - BlockNumber: fromHex(obj.BlockNumber).Uint64(), + BlockNumber: obj.BlockNumber, TransactionHash: obj.TransactionHash, - LogIndex: fromHex(obj.LogIndex).Uint64(), + LogIndex: obj.LogIndex, BlockHash: obj.BlockHash, Removed: obj.Removed, } @@ -433,10 +426,10 @@ func (c *Client) DecodeProtoEventLogs(data []string) ([]*EthereumEventLog, error return events, nil } -func (c *Client) DecodeProtoTransactions(data []string) ([]*EthereumSingleTransaction, error) { - var transactions []*EthereumSingleTransaction +func (c *Client) DecodeProtoTransactions(data []string) ([]*EthereumTransaction, error) { + var transactions []*EthereumTransaction for _, d := range data { - var transaction EthereumSingleTransaction + var transaction EthereumTransaction base64Decoded, err := base64.StdEncoding.DecodeString(d) if err != nil { return nil, err @@ -465,8 +458,6 @@ func (c *Client) DecodeProtoBlocks(data []string) ([]*EthereumBlock, error) { return blocks, nil } -// return label -// return label func (c *Client) DecodeProtoEventsToLabels(events []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.EventLabel, error) { decodedEvents, err := c.DecodeProtoEventLogs(events) @@ -497,7 +488,7 @@ func (c *Client) DecodeProtoEventsToLabels(events []string, blocksCache map[uint } // Decode the event data - decodedArgs, err := blockchain.DecodeLogArgsToLabelData(&contractAbi, event.Topics, event.Data) + decodedArgs, err := seer_common.DecodeLogArgsToLabelData(&contractAbi, event.Topics, event.Data) if err != nil { fmt.Println("Error decoding event data: ", err) @@ -533,6 +524,7 @@ func (c *Client) DecodeProtoEventsToLabels(events []string, blocksCache map[uint return labels, nil } + func (c *Client) DecodeProtoTransactionsToLabels(transactions []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.TransactionLabel, error) { decodedTransactions, err := c.DecodeProtoTransactions(transactions) @@ -562,7 +554,7 @@ func (c *Client) DecodeProtoTransactionsToLabels(transactions []string, blocksCa return nil, err } - decodedArgs, err := blockchain.DecodeTransactionInputData(&contractAbi, inputData) + decodedArgs, err := seer_common.DecodeTransactionInputDataToInterface(&contractAbi, inputData) if err != nil { fmt.Println("Error decoding transaction input data: ", err) diff --git a/blockchain/ethereum/ethereum_index_types.pb.go b/blockchain/ethereum/ethereum_index_types.pb.go index df75ec1..7e07f63 100644 --- a/blockchain/ethereum/ethereum_index_types.pb.go +++ b/blockchain/ethereum/ethereum_index_types.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.34.1 // protoc v3.6.1 // source: ethereum_index_types.proto @@ -21,7 +21,7 @@ const ( ) // Represents a single transaction within a block -type EthereumSingleTransaction struct { +type EthereumTransaction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -37,15 +37,15 @@ type EthereumSingleTransaction struct { Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // could be a long text Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` - TransactionType uint32 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // using string to handle big numeric values IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // using uint64 to represent timestamp BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // using uint64 to represent timestam BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Added field for block hash } -func (x *EthereumSingleTransaction) Reset() { - *x = EthereumSingleTransaction{} +func (x *EthereumTransaction) Reset() { + *x = EthereumTransaction{} if protoimpl.UnsafeEnabled { mi := &file_ethereum_index_types_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -53,13 +53,13 @@ func (x *EthereumSingleTransaction) Reset() { } } -func (x *EthereumSingleTransaction) String() string { +func (x *EthereumTransaction) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EthereumSingleTransaction) ProtoMessage() {} +func (*EthereumTransaction) ProtoMessage() {} -func (x *EthereumSingleTransaction) ProtoReflect() protoreflect.Message { +func (x *EthereumTransaction) ProtoReflect() protoreflect.Message { mi := &file_ethereum_index_types_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -71,117 +71,117 @@ func (x *EthereumSingleTransaction) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EthereumSingleTransaction.ProtoReflect.Descriptor instead. -func (*EthereumSingleTransaction) Descriptor() ([]byte, []int) { +// Deprecated: Use EthereumTransaction.ProtoReflect.Descriptor instead. +func (*EthereumTransaction) Descriptor() ([]byte, []int) { return file_ethereum_index_types_proto_rawDescGZIP(), []int{0} } -func (x *EthereumSingleTransaction) GetHash() string { +func (x *EthereumTransaction) GetHash() string { if x != nil { return x.Hash } return "" } -func (x *EthereumSingleTransaction) GetBlockNumber() uint64 { +func (x *EthereumTransaction) GetBlockNumber() uint64 { if x != nil { return x.BlockNumber } return 0 } -func (x *EthereumSingleTransaction) GetFromAddress() string { +func (x *EthereumTransaction) GetFromAddress() string { if x != nil { return x.FromAddress } return "" } -func (x *EthereumSingleTransaction) GetToAddress() string { +func (x *EthereumTransaction) GetToAddress() string { if x != nil { return x.ToAddress } return "" } -func (x *EthereumSingleTransaction) GetGas() string { +func (x *EthereumTransaction) GetGas() string { if x != nil { return x.Gas } return "" } -func (x *EthereumSingleTransaction) GetGasPrice() string { +func (x *EthereumTransaction) GetGasPrice() string { if x != nil { return x.GasPrice } return "" } -func (x *EthereumSingleTransaction) GetMaxFeePerGas() string { +func (x *EthereumTransaction) GetMaxFeePerGas() string { if x != nil { return x.MaxFeePerGas } return "" } -func (x *EthereumSingleTransaction) GetMaxPriorityFeePerGas() string { +func (x *EthereumTransaction) GetMaxPriorityFeePerGas() string { if x != nil { return x.MaxPriorityFeePerGas } return "" } -func (x *EthereumSingleTransaction) GetInput() string { +func (x *EthereumTransaction) GetInput() string { if x != nil { return x.Input } return "" } -func (x *EthereumSingleTransaction) GetNonce() string { +func (x *EthereumTransaction) GetNonce() string { if x != nil { return x.Nonce } return "" } -func (x *EthereumSingleTransaction) GetTransactionIndex() uint64 { +func (x *EthereumTransaction) GetTransactionIndex() uint64 { if x != nil { return x.TransactionIndex } return 0 } -func (x *EthereumSingleTransaction) GetTransactionType() uint32 { +func (x *EthereumTransaction) GetTransactionType() uint64 { if x != nil { return x.TransactionType } return 0 } -func (x *EthereumSingleTransaction) GetValue() string { +func (x *EthereumTransaction) GetValue() string { if x != nil { return x.Value } return "" } -func (x *EthereumSingleTransaction) GetIndexedAt() uint64 { +func (x *EthereumTransaction) GetIndexedAt() uint64 { if x != nil { return x.IndexedAt } return 0 } -func (x *EthereumSingleTransaction) GetBlockTimestamp() uint64 { +func (x *EthereumTransaction) GetBlockTimestamp() uint64 { if x != nil { return x.BlockTimestamp } return 0 } -func (x *EthereumSingleTransaction) GetBlockHash() string { +func (x *EthereumTransaction) GetBlockHash() string { if x != nil { return x.BlockHash } @@ -194,26 +194,26 @@ type EthereumBlock struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - Difficulty uint64 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty,omitempty"` - ExtraData string `protobuf:"bytes,3,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"` - GasLimit uint64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` - GasUsed uint64 `protobuf:"varint,5,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` - BaseFeePerGas string `protobuf:"bytes,6,opt,name=base_fee_per_gas,json=baseFeePerGas,proto3" json:"base_fee_per_gas,omitempty"` // using string to handle big numeric values - Hash string `protobuf:"bytes,7,opt,name=hash,proto3" json:"hash,omitempty"` - LogsBloom string `protobuf:"bytes,8,opt,name=logs_bloom,json=logsBloom,proto3" json:"logs_bloom,omitempty"` - Miner string `protobuf:"bytes,9,opt,name=miner,proto3" json:"miner,omitempty"` - Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` - ParentHash string `protobuf:"bytes,11,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` - ReceiptRoot string `protobuf:"bytes,12,opt,name=receipt_root,json=receiptRoot,proto3" json:"receipt_root,omitempty"` - Uncles string `protobuf:"bytes,13,opt,name=uncles,proto3" json:"uncles,omitempty"` - Size uint64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"` - StateRoot string `protobuf:"bytes,15,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` - Timestamp uint64 `protobuf:"varint,16,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - TotalDifficulty string `protobuf:"bytes,17,opt,name=total_difficulty,json=totalDifficulty,proto3" json:"total_difficulty,omitempty"` - TransactionsRoot string `protobuf:"bytes,18,opt,name=transactions_root,json=transactionsRoot,proto3" json:"transactions_root,omitempty"` - IndexedAt uint64 `protobuf:"varint,19,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // using uint64 to represent timestamp - Transactions []*EthereumSingleTransaction `protobuf:"bytes,20,rep,name=transactions,proto3" json:"transactions,omitempty"` + BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + Difficulty uint64 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty,omitempty"` + ExtraData string `protobuf:"bytes,3,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"` + GasLimit uint64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + GasUsed uint64 `protobuf:"varint,5,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` + BaseFeePerGas string `protobuf:"bytes,6,opt,name=base_fee_per_gas,json=baseFeePerGas,proto3" json:"base_fee_per_gas,omitempty"` // using string to handle big numeric values + Hash string `protobuf:"bytes,7,opt,name=hash,proto3" json:"hash,omitempty"` + LogsBloom string `protobuf:"bytes,8,opt,name=logs_bloom,json=logsBloom,proto3" json:"logs_bloom,omitempty"` + Miner string `protobuf:"bytes,9,opt,name=miner,proto3" json:"miner,omitempty"` + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` + ParentHash string `protobuf:"bytes,11,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` + ReceiptRoot string `protobuf:"bytes,12,opt,name=receipt_root,json=receiptRoot,proto3" json:"receipt_root,omitempty"` + Sha3Uncles string `protobuf:"bytes,13,opt,name=sha3_uncles,json=sha3Uncles,proto3" json:"sha3_uncles,omitempty"` + Size uint64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"` + StateRoot string `protobuf:"bytes,15,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` + Timestamp uint64 `protobuf:"varint,16,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + TotalDifficulty string `protobuf:"bytes,17,opt,name=total_difficulty,json=totalDifficulty,proto3" json:"total_difficulty,omitempty"` + TransactionsRoot string `protobuf:"bytes,18,opt,name=transactions_root,json=transactionsRoot,proto3" json:"transactions_root,omitempty"` + IndexedAt uint64 `protobuf:"varint,19,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // using uint64 to represent timestamp + Transactions []*EthereumTransaction `protobuf:"bytes,20,rep,name=transactions,proto3" json:"transactions,omitempty"` } func (x *EthereumBlock) Reset() { @@ -332,9 +332,9 @@ func (x *EthereumBlock) GetReceiptRoot() string { return "" } -func (x *EthereumBlock) GetUncles() string { +func (x *EthereumBlock) GetSha3Uncles() string { if x != nil { - return x.Uncles + return x.Sha3Uncles } return "" } @@ -381,7 +381,7 @@ func (x *EthereumBlock) GetIndexedAt() uint64 { return 0 } -func (x *EthereumBlock) GetTransactions() []*EthereumSingleTransaction { +func (x *EthereumBlock) GetTransactions() []*EthereumTransaction { if x != nil { return x.Transactions } @@ -503,104 +503,104 @@ var File_ethereum_index_types_proto protoreflect.FileDescriptor var file_ethereum_index_types_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x04, 0x0a, - 0x19, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, - 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x04, 0x0a, + 0x13, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, + 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, + 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, + 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, + 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, + 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, + 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, + 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0x98, 0x05, 0x0a, + 0x0d, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, + 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, - 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, - 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, - 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, - 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, - 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, - 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, - 0x73, 0x68, 0x22, 0x95, 0x05, 0x0a, 0x0d, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, - 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, - 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, - 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, - 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, - 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, - 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, - 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, - 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, - 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x70, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e, - 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x6e, 0x63, 0x6c, - 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, - 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, - 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, - 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, - 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3e, 0x0a, 0x0c, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x53, 0x69, 0x6e, 0x67, 0x6c, - 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa9, 0x02, 0x0a, 0x10, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, - 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, - 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, - 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x1a, 0x5a, 0x18, 0x73, 0x65, 0x65, 0x72, 0x2e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, + 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, + 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, + 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, + 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, + 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, + 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x5f, 0x72, 0x6f, 0x6f, + 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, + 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, + 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, + 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, + 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, + 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa9, 0x02, 0x0a, 0x10, 0x45, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, + 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x42, 0x1a, 0x5a, 0x18, 0x73, 0x65, 0x65, 0x72, 0x2e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -617,12 +617,12 @@ func file_ethereum_index_types_proto_rawDescGZIP() []byte { var file_ethereum_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_ethereum_index_types_proto_goTypes = []interface{}{ - (*EthereumSingleTransaction)(nil), // 0: EthereumSingleTransaction - (*EthereumBlock)(nil), // 1: EthereumBlock - (*EthereumEventLog)(nil), // 2: EthereumEventLog + (*EthereumTransaction)(nil), // 0: EthereumTransaction + (*EthereumBlock)(nil), // 1: EthereumBlock + (*EthereumEventLog)(nil), // 2: EthereumEventLog } var file_ethereum_index_types_proto_depIdxs = []int32{ - 0, // 0: EthereumBlock.transactions:type_name -> EthereumSingleTransaction + 0, // 0: EthereumBlock.transactions:type_name -> EthereumTransaction 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -637,7 +637,7 @@ func file_ethereum_index_types_proto_init() { } if !protoimpl.UnsafeEnabled { file_ethereum_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthereumSingleTransaction); i { + switch v := v.(*EthereumTransaction); i { case 0: return &v.state case 1: diff --git a/blockchain/ethereum/ethereum_index_types.proto b/blockchain/ethereum/ethereum_index_types.proto index 0590bac..f422eac 100644 --- a/blockchain/ethereum/ethereum_index_types.proto +++ b/blockchain/ethereum/ethereum_index_types.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -option go_package = "seer.blockchain.ethereum"; +option go_package = "ethereum"; // Represents a single transaction within a block -message EthereumSingleTransaction { +message EthereumTransaction { string hash = 1; uint64 block_number = 2; string from_address = 3; @@ -16,7 +16,7 @@ message EthereumSingleTransaction { string input = 9; // could be a long text string nonce = 10; uint64 transaction_index = 11; - uint32 transaction_type = 12; + uint64 transaction_type = 12; string value = 13; // using string to handle big numeric values uint64 indexed_at = 14; // using uint64 to represent timestamp uint64 block_timestamp = 15; // using uint64 to represent timestam @@ -37,14 +37,14 @@ message EthereumBlock { string nonce = 10; string parent_hash = 11; string receipt_root = 12; - string uncles = 13; + string sha3_uncles = 13; uint64 size = 14; string state_root = 15; uint64 timestamp = 16; string total_difficulty = 17; string transactions_root = 18; uint64 indexed_at = 19; // using uint64 to represent timestamp - repeated EthereumSingleTransaction transactions = 20; + repeated EthereumTransaction transactions = 20; } diff --git a/blockchain/ethereum/types.go b/blockchain/ethereum/types.go deleted file mode 100644 index 1982fd8..0000000 --- a/blockchain/ethereum/types.go +++ /dev/null @@ -1,75 +0,0 @@ -package ethereum - -type EthereumBlockJson 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"` - MixHash string `json:"mixHash"` - Nonce string `json:"nonce"` - BlockNumber string `json:"number"` - ParentHash string `json:"parentHash"` - ReceiptRoot string `json:"receiptRoot"` - Sha3Uncles string `json:"sha3Uncles"` - StateRoot string `json:"stateRoot"` - Timestamp string `json:"timestamp"` - TotalDifficulty string `json:"totalDifficulty"` - TransactionsRoot string `json:"transactionsRoot"` - Uncles []string `json:"uncles"` - Size string `json:"size"` - BaseFeePerGas string `json:"baseFeePerGas"` - IndexedAt uint64 `json:"indexed_at"` - Transactions []*EthereumSingleTransactionJson `json:"transactions"` -} - -type EthereumSingleTransactionJson struct { - AccessList []AccessList `json:"accessList"` - 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"` - R string `json:"r"` - S string `json:"s"` - ToAddress string `json:"to"` - TransactionIndex string `json:"transactionIndex"` - TransactionType string `json:"type"` - Value string `json:"value"` - YParity string `json:"yParity"` - IndexedAt string `json:"indexed_at"` - BlockTimestamp string `json:"block_timestamp"` -} - -type AccessList struct { - Address string `json:"address"` - StorageKeys []string `json:"storageKeys"` -} - -type EthereumSingleEventJson struct { - Address string `json:"address"` - Topics []string `json:"topics"` - Data string `json:"data"` - TransactionHash string `json:"transactionHash"` - BlockNumber string `json:"blockNumber"` - BlockHash string `json:"blockHash"` - Removed bool `json:"removed"` - LogIndex string `json:"logIndex"` - TransactionIndex string `json:"transactionIndex"` -} - -type QueryFilter struct { - BlockHash string `json:"blockHash"` - FromBlock string `json:"fromBlock"` - ToBlock string `json:"toBlock"` - Address []string `json:"address"` - Topics [][]string `json:"topics"` -} diff --git a/blockchain/polygon/polygon.go b/blockchain/polygon/polygon.go index be927a6..3df51be 100644 --- a/blockchain/polygon/polygon.go +++ b/blockchain/polygon/polygon.go @@ -14,7 +14,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc" - "github.com/moonstream-to/seer/blockchain" + seer_common "github.com/moonstream-to/seer/blockchain/common" "github.com/moonstream-to/seer/indexer" "google.golang.org/protobuf/proto" ) @@ -62,7 +62,7 @@ func (c *Client) GetLatestBlockNumber() (*big.Int, error) { } // BlockByNumber returns the block with the given number. -func (c *Client) GetBlockByNumber(ctx context.Context, number *big.Int) (*PolygonBlockJson, error) { +func (c *Client) GetBlockByNumber(ctx context.Context, number *big.Int) (*seer_common.BlockJson, error) { var rawResponse json.RawMessage // Use RawMessage to capture the entire JSON response err := c.rpcClient.CallContext(ctx, &rawResponse, "eth_getBlockByNumber", "0x"+number.Text(16), true) @@ -75,36 +75,29 @@ func (c *Client) GetBlockByNumber(ctx context.Context, number *big.Int) (*Polygo err = json.Unmarshal(rawResponse, &response_json) - if err != nil { - fmt.Println("Error unmarshalling response: ", err) - return nil, err - } - delete(response_json, "transactions") - var block *PolygonBlockJson + var block *seer_common.BlockJson err = c.rpcClient.CallContext(ctx, &block, "eth_getBlockByNumber", "0x"+number.Text(16), true) // true to include transactions return block, err } // BlockByHash returns the block with the given hash. - -func (c *Client) BlockByHash(ctx context.Context, hash common.Hash) (*PolygonBlockJson, error) { - var block *PolygonBlockJson +func (c *Client) BlockByHash(ctx context.Context, hash common.Hash) (*seer_common.BlockJson, error) { + var block *seer_common.BlockJson err := c.rpcClient.CallContext(ctx, &block, "eth_getBlockByHash", hash, true) // true to include transactions return block, err } // TransactionReceipt returns the receipt of a transaction by transaction hash. - func (c *Client) TransactionReceipt(ctx context.Context, hash common.Hash) (*types.Receipt, error) { var receipt *types.Receipt err := c.rpcClient.CallContext(ctx, &receipt, "eth_getTransactionReceipt", hash) return receipt, err } -func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]*PolygonSingleEventJson, error) { - var logs []*PolygonSingleEventJson +func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]*seer_common.EventJson, error) { + var logs []*seer_common.EventJson fromBlock := q.FromBlock toBlock := q.ToBlock batchStep := new(big.Int).Sub(toBlock, fromBlock) // Calculate initial batch step @@ -116,7 +109,7 @@ func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ( nextBlock = new(big.Int).Set(toBlock) } - var result []*PolygonSingleEventJson + var result []*seer_common.EventJson err := c.rpcClient.CallContext(ctx, &result, "eth_getLogs", struct { FromBlock string `json:"fromBlock"` ToBlock string `json:"toBlock"` @@ -135,14 +128,11 @@ func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ( batchStep.Div(batchStep, big.NewInt(2)) if batchStep.Cmp(big.NewInt(1)) < 0 { // If the batch step is too small we will skip that block - fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) if fromBlock.Cmp(toBlock) > 0 { break } continue - - //return nil, fmt.Errorf("unable to fetch logs: batch step too small") } continue } else { @@ -165,9 +155,8 @@ func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ( } // fetchBlocks returns the blocks for a given range. - -func (c *Client) fetchBlocks(ctx context.Context, from, to *big.Int) ([]*PolygonBlockJson, error) { - var blocks []*PolygonBlockJson +func (c *Client) fetchBlocks(ctx context.Context, from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson for i := from; i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { block, err := c.GetBlockByNumber(ctx, i) @@ -192,8 +181,8 @@ func fromHex(hex string) *big.Int { // FetchBlocksInRange fetches blocks within a specified range. // This could be useful for batch processing or analysis. -func (c *Client) FetchBlocksInRange(from, to *big.Int) ([]*PolygonBlockJson, error) { - var blocks []*PolygonBlockJson +func (c *Client) FetchBlocksInRange(from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson ctx := context.Background() // For simplicity, using a background context; consider timeouts for production. for i := new(big.Int).Set(from); i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { @@ -210,14 +199,14 @@ func (c *Client) FetchBlocksInRange(from, to *big.Int) ([]*PolygonBlockJson, err // ParseBlocksAndTransactions parses blocks and their transactions into custom data structures. // This method showcases how to handle and transform detailed block and transaction data. -func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*PolygonBlock, []*PolygonSingleTransaction, error) { +func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*PolygonBlock, []*PolygonTransaction, error) { blocksJson, err := c.FetchBlocksInRange(from, to) if err != nil { return nil, nil, err } var parsedBlocks []*PolygonBlock - var parsedTransactions []*PolygonSingleTransaction + var parsedTransactions []*PolygonTransaction for _, blockJson := range blocksJson { // Convert BlockJson to Block and Transactions as required. parsedBlock := ToProtoSingleBlock(blockJson) @@ -227,7 +216,7 @@ func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*PolygonBlock, txJson.BlockTimestamp = blockJson.Timestamp - parsedTransaction := ToProtoSingleTransaction(txJson) + parsedTransaction := ToProtoSingleTransaction(&txJson) parsedTransactions = append(parsedTransactions, parsedTransaction) } @@ -237,7 +226,7 @@ func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*PolygonBlock, return parsedBlocks, parsedTransactions, nil } -func (c *Client) ParseEvents(from, to *big.Int, blocksCache map[uint64]indexer.BlockCahche) ([]*PolygonEventLog, error) { +func (c *Client) ParseEvents(from, to *big.Int, blocksCache map[uint64]indexer.BlockCache) ([]*PolygonEventLog, error) { logs, err := c.ClientFilterLogs(context.Background(), ethereum.FilterQuery{ FromBlock: from, @@ -258,38 +247,38 @@ func (c *Client) ParseEvents(from, to *big.Int, blocksCache map[uint64]indexer.B return parsedEvents, nil } -func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCahche, error) { +func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCache, error) { parsedBlocks, parsedTransactions, err := c.ParseBlocksAndTransactions(from, to) if err != nil { return nil, nil, nil, nil, nil, err } - blocksCache := make(map[uint64]indexer.BlockCahche) + blocksCache := make(map[uint64]indexer.BlockCache) var blocksProto []proto.Message var blockIndex []indexer.BlockIndex for index, block := range parsedBlocks { blocksProto = append(blocksProto, block) // Assuming block is already a proto.Message - blocksCache[block.BlockNumber] = indexer.BlockCahche{ - BlockNumber: block.BlockNumber, - BlockHash: block.Hash, - BlockTimestamp: block.Timestamp, - } - blockIndex = append(blockIndex, indexer.BlockIndex{ + blocksCache[block.BlockNumber] = indexer.BlockCache{ BlockNumber: block.BlockNumber, BlockHash: block.Hash, BlockTimestamp: block.Timestamp, - ParentHash: block.ParentHash, - RowID: uint64(index), - Path: "", - }) + } // Assuming block.BlockNumber is int64 and block.Hash is string + blockIndex = append(blockIndex, indexer.NewBlockIndex("polygon", + block.BlockNumber, + block.Hash, + block.Timestamp, + block.ParentHash, + uint64(index), + "", + )) } var transactionsProto []proto.Message var transactionIndex []indexer.TransactionIndex for index, transaction := range parsedTransactions { - transactionsProto = append(transactionsProto, transaction) // Assuming transaction is already a proto.Message + transactionsProto = append(transactionsProto, transaction) // Assuming transaction is also a proto.Message selector := "0x" @@ -315,7 +304,7 @@ func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto return blocksProto, transactionsProto, blockIndex, transactionIndex, blocksCache, nil } -func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]indexer.BlockCahche) ([]proto.Message, []indexer.LogIndex, error) { +func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]indexer.BlockCache) ([]proto.Message, []indexer.LogIndex, error) { parsedEvents, err := c.ParseEvents(from, to, blocksCahche) @@ -333,8 +322,9 @@ func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]i if len(event.Topics) == 0 { fmt.Println("No topics found for event: ", event) } else { - topic0 = &event.Topics[0] + topic0 = &event.Topics[0] // First topic } + // Assign topics based on availability if len(event.Topics) > 1 { topic1 = &event.Topics[1] // Second topic, if present @@ -361,36 +351,34 @@ func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]i return eventsProto, eventsIndex, nil } - -func ToProtoSingleBlock(obj *PolygonBlockJson) *PolygonBlock { +func ToProtoSingleBlock(obj *seer_common.BlockJson) *PolygonBlock { return &PolygonBlock{ - BlockNumber: fromHex(obj.BlockNumber).Uint64(), - Difficulty: fromHex(obj.Difficulty).Uint64(), - ExtraData: obj.ExtraData, - GasLimit: fromHex(obj.GasLimit).Uint64(), - GasUsed: fromHex(obj.GasUsed).Uint64(), - BaseFeePerGas: obj.BaseFeePerGas, - Hash: obj.Hash, - LogsBloom: obj.LogsBloom, - Miner: obj.Miner, - Nonce: obj.Nonce, - ParentHash: obj.ParentHash, - ReceiptRoot: obj.ReceiptRoot, - Uncles: strings.Join(obj.Uncles, ","), - // convert hex to uint32 - Size: fromHex(obj.Size).Uint64(), + BlockNumber: obj.BlockNumber, + Difficulty: obj.Difficulty, + ExtraData: obj.ExtraData, + GasLimit: obj.GasLimit, + GasUsed: obj.GasUsed, + BaseFeePerGas: obj.BaseFeePerGas, + Hash: obj.Hash, + LogsBloom: obj.LogsBloom, + Miner: obj.Miner, + Nonce: obj.Nonce, + ParentHash: obj.ParentHash, + ReceiptRoot: obj.ReceiptRoot, + Sha3Uncles: obj.Sha3Uncles, + Size: obj.Size, StateRoot: obj.StateRoot, - Timestamp: fromHex(obj.Timestamp).Uint64(), + Timestamp: obj.Timestamp, TotalDifficulty: obj.TotalDifficulty, TransactionsRoot: obj.TransactionsRoot, IndexedAt: obj.IndexedAt, } } -func ToProtoSingleTransaction(obj *PolygonSingleTransactionJson) *PolygonSingleTransaction { - return &PolygonSingleTransaction{ +func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *PolygonTransaction { + return &PolygonTransaction{ Hash: obj.Hash, - BlockNumber: fromHex(obj.BlockNumber).Uint64(), + BlockNumber: obj.BlockNumber, BlockHash: obj.BlockHash, FromAddress: obj.FromAddress, ToAddress: obj.ToAddress, @@ -400,39 +388,28 @@ func ToProtoSingleTransaction(obj *PolygonSingleTransactionJson) *PolygonSingleT MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, Input: obj.Input, Nonce: obj.Nonce, - TransactionIndex: fromHex(obj.TransactionIndex).Uint64(), - TransactionType: uint32(fromHex(obj.TransactionType).Uint64()), + TransactionIndex: obj.TransactionIndex, + TransactionType: obj.TransactionType, Value: obj.Value, - IndexedAt: fromHex(obj.IndexedAt).Uint64(), - BlockTimestamp: fromHex(obj.BlockTimestamp).Uint64(), + IndexedAt: obj.IndexedAt, + BlockTimestamp: obj.BlockTimestamp, } } -func ToProtoSingleEventLog(obj *PolygonSingleEventJson) *PolygonEventLog { +func ToProtoSingleEventLog(obj *seer_common.EventJson) *PolygonEventLog { return &PolygonEventLog{ Address: obj.Address, Topics: obj.Topics, Data: obj.Data, - BlockNumber: fromHex(obj.BlockNumber).Uint64(), + BlockNumber: obj.BlockNumber, TransactionHash: obj.TransactionHash, - LogIndex: fromHex(obj.LogIndex).Uint64(), + LogIndex: obj.LogIndex, BlockHash: obj.BlockHash, Removed: obj.Removed, } } -// Clean the input part to remove non-hexadecimal characters -func cleanHexPart(part string) string { - cleaned := strings.Builder{} - for _, r := range part { - if (r >= '0' && r <= '9') || (r >= 'a' && r <= 'f') || (r >= 'A' && r <= 'F') { - cleaned.WriteRune(r) - } - } - return cleaned.String() -} - func (c *Client) DecodeProtoEventLogs(data []string) ([]*PolygonEventLog, error) { var events []*PolygonEventLog for _, d := range data { @@ -449,10 +426,10 @@ func (c *Client) DecodeProtoEventLogs(data []string) ([]*PolygonEventLog, error) return events, nil } -func (c *Client) DecodeProtoTransactions(data []string) ([]*PolygonSingleTransaction, error) { - var transactions []*PolygonSingleTransaction +func (c *Client) DecodeProtoTransactions(data []string) ([]*PolygonTransaction, error) { + var transactions []*PolygonTransaction for _, d := range data { - var transaction PolygonSingleTransaction + var transaction PolygonTransaction base64Decoded, err := base64.StdEncoding.DecodeString(d) if err != nil { return nil, err @@ -481,7 +458,6 @@ func (c *Client) DecodeProtoBlocks(data []string) ([]*PolygonBlock, error) { return blocks, nil } -// return label func (c *Client) DecodeProtoEventsToLabels(events []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.EventLabel, error) { decodedEvents, err := c.DecodeProtoEventLogs(events) @@ -512,7 +488,7 @@ func (c *Client) DecodeProtoEventsToLabels(events []string, blocksCache map[uint } // Decode the event data - decodedArgs, err := blockchain.DecodeLogArgsToLabelData(&contractAbi, event.Topics, event.Data) + decodedArgs, err := seer_common.DecodeLogArgsToLabelData(&contractAbi, event.Topics, event.Data) if err != nil { fmt.Println("Error decoding event data: ", err) @@ -578,7 +554,7 @@ func (c *Client) DecodeProtoTransactionsToLabels(transactions []string, blocksCa return nil, err } - decodedArgs, err := blockchain.DecodeTransactionInputData(&contractAbi, inputData) + decodedArgs, err := seer_common.DecodeTransactionInputDataToInterface(&contractAbi, inputData) if err != nil { fmt.Println("Error decoding transaction input data: ", err) diff --git a/blockchain/polygon/polygon_index_types.pb.go b/blockchain/polygon/polygon_index_types.pb.go index ee39652..853d163 100644 --- a/blockchain/polygon/polygon_index_types.pb.go +++ b/blockchain/polygon/polygon_index_types.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.34.1 // protoc v3.6.1 // source: polygon_index_types.proto @@ -21,7 +21,7 @@ const ( ) // Represents a single transaction within a block -type PolygonSingleTransaction struct { +type PolygonTransaction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -37,15 +37,15 @@ type PolygonSingleTransaction struct { Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // could be a long text Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` - TransactionType uint32 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // using string to handle big numeric values IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // using uint64 to represent timestamp BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // using uint64 to represent timestam BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Added field for block hash } -func (x *PolygonSingleTransaction) Reset() { - *x = PolygonSingleTransaction{} +func (x *PolygonTransaction) Reset() { + *x = PolygonTransaction{} if protoimpl.UnsafeEnabled { mi := &file_polygon_index_types_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -53,13 +53,13 @@ func (x *PolygonSingleTransaction) Reset() { } } -func (x *PolygonSingleTransaction) String() string { +func (x *PolygonTransaction) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PolygonSingleTransaction) ProtoMessage() {} +func (*PolygonTransaction) ProtoMessage() {} -func (x *PolygonSingleTransaction) ProtoReflect() protoreflect.Message { +func (x *PolygonTransaction) ProtoReflect() protoreflect.Message { mi := &file_polygon_index_types_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -71,117 +71,117 @@ func (x *PolygonSingleTransaction) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PolygonSingleTransaction.ProtoReflect.Descriptor instead. -func (*PolygonSingleTransaction) Descriptor() ([]byte, []int) { +// Deprecated: Use PolygonTransaction.ProtoReflect.Descriptor instead. +func (*PolygonTransaction) Descriptor() ([]byte, []int) { return file_polygon_index_types_proto_rawDescGZIP(), []int{0} } -func (x *PolygonSingleTransaction) GetHash() string { +func (x *PolygonTransaction) GetHash() string { if x != nil { return x.Hash } return "" } -func (x *PolygonSingleTransaction) GetBlockNumber() uint64 { +func (x *PolygonTransaction) GetBlockNumber() uint64 { if x != nil { return x.BlockNumber } return 0 } -func (x *PolygonSingleTransaction) GetFromAddress() string { +func (x *PolygonTransaction) GetFromAddress() string { if x != nil { return x.FromAddress } return "" } -func (x *PolygonSingleTransaction) GetToAddress() string { +func (x *PolygonTransaction) GetToAddress() string { if x != nil { return x.ToAddress } return "" } -func (x *PolygonSingleTransaction) GetGas() string { +func (x *PolygonTransaction) GetGas() string { if x != nil { return x.Gas } return "" } -func (x *PolygonSingleTransaction) GetGasPrice() string { +func (x *PolygonTransaction) GetGasPrice() string { if x != nil { return x.GasPrice } return "" } -func (x *PolygonSingleTransaction) GetMaxFeePerGas() string { +func (x *PolygonTransaction) GetMaxFeePerGas() string { if x != nil { return x.MaxFeePerGas } return "" } -func (x *PolygonSingleTransaction) GetMaxPriorityFeePerGas() string { +func (x *PolygonTransaction) GetMaxPriorityFeePerGas() string { if x != nil { return x.MaxPriorityFeePerGas } return "" } -func (x *PolygonSingleTransaction) GetInput() string { +func (x *PolygonTransaction) GetInput() string { if x != nil { return x.Input } return "" } -func (x *PolygonSingleTransaction) GetNonce() string { +func (x *PolygonTransaction) GetNonce() string { if x != nil { return x.Nonce } return "" } -func (x *PolygonSingleTransaction) GetTransactionIndex() uint64 { +func (x *PolygonTransaction) GetTransactionIndex() uint64 { if x != nil { return x.TransactionIndex } return 0 } -func (x *PolygonSingleTransaction) GetTransactionType() uint32 { +func (x *PolygonTransaction) GetTransactionType() uint64 { if x != nil { return x.TransactionType } return 0 } -func (x *PolygonSingleTransaction) GetValue() string { +func (x *PolygonTransaction) GetValue() string { if x != nil { return x.Value } return "" } -func (x *PolygonSingleTransaction) GetIndexedAt() uint64 { +func (x *PolygonTransaction) GetIndexedAt() uint64 { if x != nil { return x.IndexedAt } return 0 } -func (x *PolygonSingleTransaction) GetBlockTimestamp() uint64 { +func (x *PolygonTransaction) GetBlockTimestamp() uint64 { if x != nil { return x.BlockTimestamp } return 0 } -func (x *PolygonSingleTransaction) GetBlockHash() string { +func (x *PolygonTransaction) GetBlockHash() string { if x != nil { return x.BlockHash } @@ -194,26 +194,26 @@ type PolygonBlock struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - Difficulty uint64 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty,omitempty"` - ExtraData string `protobuf:"bytes,3,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"` - GasLimit uint64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` - GasUsed uint64 `protobuf:"varint,5,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` - BaseFeePerGas string `protobuf:"bytes,6,opt,name=base_fee_per_gas,json=baseFeePerGas,proto3" json:"base_fee_per_gas,omitempty"` // using string to handle big numeric values - Hash string `protobuf:"bytes,7,opt,name=hash,proto3" json:"hash,omitempty"` - LogsBloom string `protobuf:"bytes,8,opt,name=logs_bloom,json=logsBloom,proto3" json:"logs_bloom,omitempty"` - Miner string `protobuf:"bytes,9,opt,name=miner,proto3" json:"miner,omitempty"` - Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` - ParentHash string `protobuf:"bytes,11,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` - ReceiptRoot string `protobuf:"bytes,12,opt,name=receipt_root,json=receiptRoot,proto3" json:"receipt_root,omitempty"` - Uncles string `protobuf:"bytes,13,opt,name=uncles,proto3" json:"uncles,omitempty"` - Size uint64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"` - StateRoot string `protobuf:"bytes,15,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` - Timestamp uint64 `protobuf:"varint,16,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - TotalDifficulty string `protobuf:"bytes,17,opt,name=total_difficulty,json=totalDifficulty,proto3" json:"total_difficulty,omitempty"` - TransactionsRoot string `protobuf:"bytes,18,opt,name=transactions_root,json=transactionsRoot,proto3" json:"transactions_root,omitempty"` - IndexedAt uint64 `protobuf:"varint,19,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // using uint64 to represent timestamp - Transactions []*PolygonSingleTransaction `protobuf:"bytes,20,rep,name=transactions,proto3" json:"transactions,omitempty"` + BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + Difficulty uint64 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty,omitempty"` + ExtraData string `protobuf:"bytes,3,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"` + GasLimit uint64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + GasUsed uint64 `protobuf:"varint,5,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` + BaseFeePerGas string `protobuf:"bytes,6,opt,name=base_fee_per_gas,json=baseFeePerGas,proto3" json:"base_fee_per_gas,omitempty"` // using string to handle big numeric values + Hash string `protobuf:"bytes,7,opt,name=hash,proto3" json:"hash,omitempty"` + LogsBloom string `protobuf:"bytes,8,opt,name=logs_bloom,json=logsBloom,proto3" json:"logs_bloom,omitempty"` + Miner string `protobuf:"bytes,9,opt,name=miner,proto3" json:"miner,omitempty"` + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` + ParentHash string `protobuf:"bytes,11,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` + ReceiptRoot string `protobuf:"bytes,12,opt,name=receipt_root,json=receiptRoot,proto3" json:"receipt_root,omitempty"` + Sha3Uncles string `protobuf:"bytes,13,opt,name=sha3_uncles,json=sha3Uncles,proto3" json:"sha3_uncles,omitempty"` + Size uint64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"` + StateRoot string `protobuf:"bytes,15,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` + Timestamp uint64 `protobuf:"varint,16,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + TotalDifficulty string `protobuf:"bytes,17,opt,name=total_difficulty,json=totalDifficulty,proto3" json:"total_difficulty,omitempty"` + TransactionsRoot string `protobuf:"bytes,18,opt,name=transactions_root,json=transactionsRoot,proto3" json:"transactions_root,omitempty"` + IndexedAt uint64 `protobuf:"varint,19,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // using uint64 to represent timestamp + Transactions []*PolygonTransaction `protobuf:"bytes,20,rep,name=transactions,proto3" json:"transactions,omitempty"` } func (x *PolygonBlock) Reset() { @@ -332,9 +332,9 @@ func (x *PolygonBlock) GetReceiptRoot() string { return "" } -func (x *PolygonBlock) GetUncles() string { +func (x *PolygonBlock) GetSha3Uncles() string { if x != nil { - return x.Uncles + return x.Sha3Uncles } return "" } @@ -381,7 +381,7 @@ func (x *PolygonBlock) GetIndexedAt() uint64 { return 0 } -func (x *PolygonBlock) GetTransactions() []*PolygonSingleTransaction { +func (x *PolygonBlock) GetTransactions() []*PolygonTransaction { if x != nil { return x.Transactions } @@ -503,102 +503,102 @@ var File_polygon_index_types_proto protoreflect.FileDescriptor var file_polygon_index_types_proto_rawDesc = []byte{ 0x0a, 0x19, 0x70, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x04, 0x0a, 0x18, - 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, - 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, - 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, - 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, - 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, - 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, - 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, - 0x22, 0x93, 0x05, 0x0a, 0x0c, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, - 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, - 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, - 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, - 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, - 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, - 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x48, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x5f, - 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x70, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e, 0x63, 0x6c, 0x65, - 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, - 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, - 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, - 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, - 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, - 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa8, 0x02, 0x0a, 0x0f, 0x50, 0x6f, 0x6c, 0x79, 0x67, - 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, - 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, - 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x42, 0x04, 0x5a, 0x02, 0x2e, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x04, 0x0a, 0x12, + 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, + 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, + 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, + 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, + 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, + 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, + 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0x96, 0x05, 0x0a, 0x0c, 0x50, + 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, + 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, + 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, + 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, + 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, + 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, + 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, + 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, + 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x21, + 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, + 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, + 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, + 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, + 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0xa8, 0x02, 0x0a, 0x0f, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, + 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x04, + 0x5a, 0x02, 0x2e, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -615,12 +615,12 @@ func file_polygon_index_types_proto_rawDescGZIP() []byte { var file_polygon_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_polygon_index_types_proto_goTypes = []interface{}{ - (*PolygonSingleTransaction)(nil), // 0: PolygonSingleTransaction - (*PolygonBlock)(nil), // 1: PolygonBlock - (*PolygonEventLog)(nil), // 2: PolygonEventLog + (*PolygonTransaction)(nil), // 0: PolygonTransaction + (*PolygonBlock)(nil), // 1: PolygonBlock + (*PolygonEventLog)(nil), // 2: PolygonEventLog } var file_polygon_index_types_proto_depIdxs = []int32{ - 0, // 0: PolygonBlock.transactions:type_name -> PolygonSingleTransaction + 0, // 0: PolygonBlock.transactions:type_name -> PolygonTransaction 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -635,7 +635,7 @@ func file_polygon_index_types_proto_init() { } if !protoimpl.UnsafeEnabled { file_polygon_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PolygonSingleTransaction); i { + switch v := v.(*PolygonTransaction); i { case 0: return &v.state case 1: diff --git a/blockchain/polygon/polygon_index_types.proto b/blockchain/polygon/polygon_index_types.proto index e8f6942..f12494e 100644 --- a/blockchain/polygon/polygon_index_types.proto +++ b/blockchain/polygon/polygon_index_types.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -option go_package = "./"; +option go_package = "polygon"; // Represents a single transaction within a block -message PolygonSingleTransaction { +message PolygonTransaction { string hash = 1; uint64 block_number = 2; string from_address = 3; @@ -16,7 +16,7 @@ message PolygonSingleTransaction { string input = 9; // could be a long text string nonce = 10; uint64 transaction_index = 11; - uint32 transaction_type = 12; + uint64 transaction_type = 12; string value = 13; // using string to handle big numeric values uint64 indexed_at = 14; // using uint64 to represent timestamp uint64 block_timestamp = 15; // using uint64 to represent timestam @@ -37,14 +37,14 @@ message PolygonBlock { string nonce = 10; string parent_hash = 11; string receipt_root = 12; - string uncles = 13; + string sha3_uncles = 13; uint64 size = 14; string state_root = 15; uint64 timestamp = 16; string total_difficulty = 17; string transactions_root = 18; uint64 indexed_at = 19; // using uint64 to represent timestamp - repeated PolygonSingleTransaction transactions = 20; + repeated PolygonTransaction transactions = 20; } diff --git a/blockchain/polygon/types.go b/blockchain/polygon/types.go deleted file mode 100644 index a8b4cb4..0000000 --- a/blockchain/polygon/types.go +++ /dev/null @@ -1,75 +0,0 @@ -package polygon - -type PolygonBlockJson 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"` - MixHash string `json:"mixHash"` - Nonce string `json:"nonce"` - BlockNumber string `json:"number"` - ParentHash string `json:"parentHash"` - ReceiptRoot string `json:"receiptRoot"` - Sha3Uncles string `json:"sha3Uncles"` - StateRoot string `json:"stateRoot"` - Timestamp string `json:"timestamp"` - TotalDifficulty string `json:"totalDifficulty"` - TransactionsRoot string `json:"transactionsRoot"` - Uncles []string `json:"uncles"` - Size string `json:"size"` - BaseFeePerGas string `json:"baseFeePerGas"` - IndexedAt uint64 `json:"indexed_at"` - Transactions []*PolygonSingleTransactionJson `json:"transactions"` -} - -type PolygonSingleTransactionJson struct { - AccessList []AccessList `json:"accessList"` - 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"` - R string `json:"r"` - S string `json:"s"` - ToAddress string `json:"to"` - TransactionIndex string `json:"transactionIndex"` - TransactionType string `json:"type"` - Value string `json:"value"` - YParity string `json:"yParity"` - IndexedAt string `json:"indexed_at"` - BlockTimestamp string `json:"block_timestamp"` -} - -type AccessList struct { - Address string `json:"address"` - StorageKeys []string `json:"storageKeys"` -} - -type PolygonSingleEventJson struct { - Address string `json:"address"` - Topics []string `json:"topics"` - Data string `json:"data"` - TransactionHash string `json:"transactionHash"` - BlockNumber string `json:"blockNumber"` - BlockHash string `json:"blockHash"` - Removed bool `json:"removed"` - LogIndex string `json:"logIndex"` - TransactionIndex string `json:"transactionIndex"` -} - -type QueryFilter struct { - BlockHash string `json:"blockHash"` - FromBlock string `json:"fromBlock"` - ToBlock string `json:"toBlock"` - Address []string `json:"address"` - Topics [][]string `json:"topics"` -} diff --git a/cmd.go b/cmd.go index a0e4985..30fdd9e 100644 --- a/cmd.go +++ b/cmd.go @@ -8,6 +8,7 @@ import ( "io" "log" "os" + "path/filepath" "strings" "text/template" @@ -142,7 +143,8 @@ func CreateBlockchainGenerateCommand() *cobra.Command { Use: "generate", Short: "Generate methods and types for different blockchains from template", RunE: func(cmd *cobra.Command, args []string) error { - blockchainNameFilePath := fmt.Sprintf("blockchain/%s/%s.go", blockchainNameLower, blockchainNameLower) + dirPath := filepath.Join(".", "blockchain", blockchainNameLower) + blockchainNameFilePath := filepath.Join(dirPath, fmt.Sprintf("%s.go", blockchainNameLower)) var blockchainName string blockchainNameList := strings.Split(blockchainNameLower, "_") @@ -157,10 +159,13 @@ func CreateBlockchainGenerateCommand() *cobra.Command { } // Create output file - mkdirErr := os.Mkdir(blockchainNameLower, 0775) - if mkdirErr != nil { - return mkdirErr + if _, statErr := os.Stat(dirPath); os.IsNotExist(statErr) { + mkdirErr := os.Mkdir(dirPath, 0775) + if mkdirErr != nil { + return mkdirErr + } } + outputFile, createErr := os.Create(blockchainNameFilePath) if createErr != nil { return createErr diff --git a/indexer/types.go b/indexer/types.go index d168603..d807755 100644 --- a/indexer/types.go +++ b/indexer/types.go @@ -44,7 +44,7 @@ type TransactionIndex struct { Selector string TransactionHash string // TODO: Rename this to Hash TransactionIndex uint64 // TODO: Rename this to Index - Type uint32 + Type uint64 Path string } @@ -53,7 +53,7 @@ func (t TransactionIndex) TableName() string { return t.chain + "_transaction_index" } -func NewTransactionIndex(chain string, blockNumber uint64, blockHash string, blockTimestamp uint64, fromAddress string, toAddress string, selector string, row_id uint64, transactionHash string, transactionIndex uint64, tx_type uint32, path string) TransactionIndex { +func NewTransactionIndex(chain string, blockNumber uint64, blockHash string, blockTimestamp uint64, fromAddress string, toAddress string, selector string, row_id uint64, transactionHash string, transactionIndex uint64, tx_type uint64, path string) TransactionIndex { return TransactionIndex{ chain: chain, BlockNumber: blockNumber, From 785e39c489e0ebb8fe0bbdcfddfd8569099763eb Mon Sep 17 00:00:00 2001 From: kompotkot Date: Mon, 3 Jun 2024 11:41:38 +0000 Subject: [PATCH 03/13] Generator, side-chain fields, arbitrum one and sepolia support --- blockchain/arbitrum_one/arbitrum_one.go | 604 +++++++++++++ .../arbitrum_one_index_types.pb.go | 790 +++++++++++++++++ .../arbitrum_one_index_types.proto | 72 ++ .../arbitrum_sepolia/arbitrum_sepolia.go | 604 +++++++++++++ .../arbitrum_sepolia_index_types.pb.go | 792 ++++++++++++++++++ .../arbitrum_sepolia_index_types.proto | 72 ++ blockchain/blockchain.go.tmpl | 36 +- blockchain/common/decoding.go | 2 +- blockchain/ethereum/ethereum.go | 7 +- .../ethereum/ethereum_index_types.pb.go | 213 +++-- .../ethereum/ethereum_index_types.proto | 9 +- blockchain/handlers.go | 8 + blockchain/polygon/polygon.go | 7 +- blockchain/polygon/polygon_index_types.pb.go | 211 +++-- blockchain/polygon/polygon_index_types.proto | 9 +- cmd.go | 9 +- crawler/README.md | 18 +- 17 files changed, 3275 insertions(+), 188 deletions(-) create mode 100644 blockchain/arbitrum_one/arbitrum_one.go create mode 100644 blockchain/arbitrum_one/arbitrum_one_index_types.pb.go create mode 100644 blockchain/arbitrum_one/arbitrum_one_index_types.proto create mode 100644 blockchain/arbitrum_sepolia/arbitrum_sepolia.go create mode 100644 blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.pb.go create mode 100644 blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.proto diff --git a/blockchain/arbitrum_one/arbitrum_one.go b/blockchain/arbitrum_one/arbitrum_one.go new file mode 100644 index 0000000..edbaa9d --- /dev/null +++ b/blockchain/arbitrum_one/arbitrum_one.go @@ -0,0 +1,604 @@ +package arbitrum_one + +import ( + "context" + "encoding/base64" + "encoding/hex" + "encoding/json" + "fmt" + "math/big" + "strings" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rpc" + seer_common "github.com/moonstream-to/seer/blockchain/common" + "github.com/moonstream-to/seer/indexer" + "google.golang.org/protobuf/proto" +) + +func NewClient(url string) (*Client, error) { + rpcClient, err := rpc.DialContext(context.Background(), url) + if err != nil { + return nil, err + } + return &Client{rpcClient: rpcClient}, nil +} + +// Client is a wrapper around the Ethereum JSON-RPC client. + +type Client struct { + rpcClient *rpc.Client +} + +// Client common + +// ChainType returns the chain type. +func (c *Client) ChainType() string { + return "arbitrum_one" +} + +// Close closes the underlying RPC client. +func (c *Client) Close() { + c.rpcClient.Close() +} + +// GetLatestBlockNumber returns the latest block number. +func (c *Client) GetLatestBlockNumber() (*big.Int, error) { + var result string + if err := c.rpcClient.CallContext(context.Background(), &result, "eth_blockNumber"); err != nil { + return nil, err + } + + // Convert the hex string to a big.Int + blockNumber, ok := new(big.Int).SetString(result, 0) // The 0 base lets the function infer the base from the string prefix. + if !ok { + return nil, fmt.Errorf("invalid block number format: %s", result) + } + + return blockNumber, nil +} + +// BlockByNumber returns the block with the given number. +func (c *Client) GetBlockByNumber(ctx context.Context, number *big.Int) (*seer_common.BlockJson, error) { + + var rawResponse json.RawMessage // Use RawMessage to capture the entire JSON response + err := c.rpcClient.CallContext(ctx, &rawResponse, "eth_getBlockByNumber", "0x"+number.Text(16), true) + if err != nil { + fmt.Println("Error calling eth_getBlockByNumber: ", err) + return nil, err + } + + var response_json map[string]interface{} + + err = json.Unmarshal(rawResponse, &response_json) + + delete(response_json, "transactions") + + var block *seer_common.BlockJson + err = c.rpcClient.CallContext(ctx, &block, "eth_getBlockByNumber", "0x"+number.Text(16), true) // true to include transactions + return block, err +} + +// BlockByHash returns the block with the given hash. +func (c *Client) BlockByHash(ctx context.Context, hash common.Hash) (*seer_common.BlockJson, error) { + var block *seer_common.BlockJson + err := c.rpcClient.CallContext(ctx, &block, "eth_getBlockByHash", hash, true) // true to include transactions + return block, err +} + +// TransactionReceipt returns the receipt of a transaction by transaction hash. +func (c *Client) TransactionReceipt(ctx context.Context, hash common.Hash) (*types.Receipt, error) { + var receipt *types.Receipt + err := c.rpcClient.CallContext(ctx, &receipt, "eth_getTransactionReceipt", hash) + return receipt, err +} + +func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]*seer_common.EventJson, error) { + var logs []*seer_common.EventJson + fromBlock := q.FromBlock + toBlock := q.ToBlock + batchStep := new(big.Int).Sub(toBlock, fromBlock) // Calculate initial batch step + + for { + // Calculate the next "lastBlock" within the batch step or adjust to "toBlock" if exceeding + nextBlock := new(big.Int).Add(fromBlock, batchStep) + if nextBlock.Cmp(toBlock) > 0 { + nextBlock = new(big.Int).Set(toBlock) + } + + var result []*seer_common.EventJson + err := c.rpcClient.CallContext(ctx, &result, "eth_getLogs", struct { + FromBlock string `json:"fromBlock"` + ToBlock string `json:"toBlock"` + Addresses []common.Address `json:"addresses"` + Topics [][]common.Hash `json:"topics"` + }{ + FromBlock: toHex(fromBlock), + ToBlock: toHex(nextBlock), + Addresses: q.Addresses, + Topics: q.Topics, + }) + + if err != nil { + if strings.Contains(err.Error(), "query returned more than 10000 results") { + // Halve the batch step if too many results and retry + batchStep.Div(batchStep, big.NewInt(2)) + if batchStep.Cmp(big.NewInt(1)) < 0 { + // If the batch step is too small we will skip that block + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + if fromBlock.Cmp(toBlock) > 0 { + break + } + continue + } + continue + } else { + // For any other error, return immediately + return nil, err + } + } + + // Append the results and adjust "fromBlock" for the next batch + logs = append(logs, result...) + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + + // Break the loop if we've reached or exceeded "toBlock" + if fromBlock.Cmp(toBlock) > 0 { + break + } + } + + return logs, nil +} + +// fetchBlocks returns the blocks for a given range. +func (c *Client) fetchBlocks(ctx context.Context, from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + + for i := from; i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + return blocks, nil +} + +// Utility function to convert big.Int to its hexadecimal representation. +func toHex(number *big.Int) string { + return fmt.Sprintf("0x%x", number) +} + +func fromHex(hex string) *big.Int { + number := new(big.Int) + number.SetString(hex, 0) + return number +} + +// FetchBlocksInRange fetches blocks within a specified range. +// This could be useful for batch processing or analysis. +func (c *Client) FetchBlocksInRange(from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + ctx := context.Background() // For simplicity, using a background context; consider timeouts for production. + + for i := new(big.Int).Set(from); i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + fmt.Println("Block number: ", i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + + return blocks, nil +} + +// ParseBlocksAndTransactions parses blocks and their transactions into custom data structures. +// This method showcases how to handle and transform detailed block and transaction data. +func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*ArbitrumOneBlock, []*ArbitrumOneTransaction, error) { + blocksJson, err := c.FetchBlocksInRange(from, to) + if err != nil { + return nil, nil, err + } + + var parsedBlocks []*ArbitrumOneBlock + var parsedTransactions []*ArbitrumOneTransaction + for _, blockJson := range blocksJson { + // Convert BlockJson to Block and Transactions as required. + parsedBlock := ToProtoSingleBlock(blockJson) + + // Example: Parsing transactions within the block + for _, txJson := range blockJson.Transactions { + + txJson.BlockTimestamp = blockJson.Timestamp + + parsedTransaction := ToProtoSingleTransaction(&txJson) + parsedTransactions = append(parsedTransactions, parsedTransaction) + } + + parsedBlocks = append(parsedBlocks, parsedBlock) + } + + return parsedBlocks, parsedTransactions, nil +} + +func (c *Client) ParseEvents(from, to *big.Int, blocksCache map[uint64]indexer.BlockCache) ([]*ArbitrumOneEventLog, error) { + + logs, err := c.ClientFilterLogs(context.Background(), ethereum.FilterQuery{ + FromBlock: from, + ToBlock: to, + }) + + if err != nil { + fmt.Println("Error fetching logs: ", err) + return nil, err + } + + var parsedEvents []*ArbitrumOneEventLog + for _, log := range logs { + parsedEvent := ToProtoSingleEventLog(log) + parsedEvents = append(parsedEvents, parsedEvent) + } + + return parsedEvents, nil +} + +func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCache, error) { + parsedBlocks, parsedTransactions, err := c.ParseBlocksAndTransactions(from, to) + + if err != nil { + return nil, nil, nil, nil, nil, err + } + + blocksCache := make(map[uint64]indexer.BlockCache) + + var blocksProto []proto.Message + var blockIndex []indexer.BlockIndex + for index, block := range parsedBlocks { + blocksProto = append(blocksProto, block) // Assuming block is already a proto.Message + blocksCache[block.BlockNumber] = indexer.BlockCache{ + BlockNumber: block.BlockNumber, + BlockHash: block.Hash, + BlockTimestamp: block.Timestamp, + } // Assuming block.BlockNumber is int64 and block.Hash is string + blockIndex = append(blockIndex, indexer.NewBlockIndex("arbitrum_one", + block.BlockNumber, + block.Hash, + block.Timestamp, + block.ParentHash, + uint64(index), + "", + )) + } + + var transactionsProto []proto.Message + var transactionIndex []indexer.TransactionIndex + for index, transaction := range parsedTransactions { + transactionsProto = append(transactionsProto, transaction) // Assuming transaction is also a proto.Message + + selector := "0x" + + if len(transaction.Input) > 10 { + selector = transaction.Input[:10] + } + + transactionIndex = append(transactionIndex, indexer.TransactionIndex{ + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + BlockTimestamp: transaction.BlockTimestamp, + FromAddress: transaction.FromAddress, + ToAddress: transaction.ToAddress, + RowID: uint64(index), + Selector: selector, // First 10 characters of the input data 0x + 4 bytes of the function signature + TransactionHash: transaction.Hash, + TransactionIndex: transaction.TransactionIndex, + Type: transaction.TransactionType, + Path: "", + }) + } + + return blocksProto, transactionsProto, blockIndex, transactionIndex, blocksCache, nil +} + +func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]indexer.BlockCache) ([]proto.Message, []indexer.LogIndex, error) { + + parsedEvents, err := c.ParseEvents(from, to, blocksCahche) + + if err != nil { + return nil, nil, err + } + + var eventsProto []proto.Message + var eventsIndex []indexer.LogIndex + for index, event := range parsedEvents { + eventsProto = append(eventsProto, event) // Assuming event is already a proto.Message + + var topic0, topic1, topic2 *string + + if len(event.Topics) == 0 { + fmt.Println("No topics found for event: ", event) + } else { + topic0 = &event.Topics[0] // First topic + } + + // Assign topics based on availability + if len(event.Topics) > 1 { + topic1 = &event.Topics[1] // Second topic, if present + } + if len(event.Topics) > 2 { + topic2 = &event.Topics[2] // Third topic, if present + } + + eventsIndex = append(eventsIndex, indexer.LogIndex{ + Address: event.Address, + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + BlockTimestamp: blocksCahche[event.BlockNumber].BlockTimestamp, + TransactionHash: event.TransactionHash, + Selector: topic0, // First topic + Topic1: topic1, + Topic2: topic2, + RowID: uint64(index), + LogIndex: event.LogIndex, + Path: "", + }) + } + + return eventsProto, eventsIndex, nil + +} +func ToProtoSingleBlock(obj *seer_common.BlockJson) *ArbitrumOneBlock { + return &ArbitrumOneBlock{ + BlockNumber: obj.BlockNumber, + Difficulty: obj.Difficulty, + ExtraData: obj.ExtraData, + GasLimit: obj.GasLimit, + GasUsed: obj.GasUsed, + BaseFeePerGas: obj.BaseFeePerGas, + Hash: obj.Hash, + LogsBloom: obj.LogsBloom, + Miner: obj.Miner, + Nonce: obj.Nonce, + ParentHash: obj.ParentHash, + ReceiptsRoot: obj.ReceiptsRoot, + Sha3Uncles: obj.Sha3Uncles, + Size: obj.Size, + StateRoot: obj.StateRoot, + Timestamp: obj.Timestamp, + TotalDifficulty: obj.TotalDifficulty, + TransactionsRoot: obj.TransactionsRoot, + IndexedAt: obj.IndexedAt, + + MixHash: obj.MixHash, + SendCount: obj.SendCount, + SendRoot: obj.SendRoot, + L1BlockNumber: obj.L1BlockNumber, + } +} + +func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *ArbitrumOneTransaction { + return &ArbitrumOneTransaction{ + Hash: obj.Hash, + BlockNumber: obj.BlockNumber, + BlockHash: obj.BlockHash, + FromAddress: obj.FromAddress, + ToAddress: obj.ToAddress, + Gas: obj.Gas, + GasPrice: obj.GasPrice, + MaxFeePerGas: obj.MaxFeePerGas, + MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, + Input: obj.Input, + Nonce: obj.Nonce, + TransactionIndex: obj.TransactionIndex, + TransactionType: obj.TransactionType, + Value: obj.Value, + IndexedAt: obj.IndexedAt, + BlockTimestamp: obj.BlockTimestamp, + + ChainId: obj.ChainId, + V: obj.V, + R: obj.R, + S: obj.S, + + YParity: obj.YParity, + } +} + +func ToProtoSingleEventLog(obj *seer_common.EventJson) *ArbitrumOneEventLog { + + return &ArbitrumOneEventLog{ + Address: obj.Address, + Topics: obj.Topics, + Data: obj.Data, + BlockNumber: obj.BlockNumber, + TransactionHash: obj.TransactionHash, + LogIndex: obj.LogIndex, + BlockHash: obj.BlockHash, + Removed: obj.Removed, + } +} + +func (c *Client) DecodeProtoEventLogs(data []string) ([]*ArbitrumOneEventLog, error) { + var events []*ArbitrumOneEventLog + for _, d := range data { + var event ArbitrumOneEventLog + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &event); err != nil { + return nil, err + } + events = append(events, &event) + } + return events, nil +} + +func (c *Client) DecodeProtoTransactions(data []string) ([]*ArbitrumOneTransaction, error) { + var transactions []*ArbitrumOneTransaction + for _, d := range data { + var transaction ArbitrumOneTransaction + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &transaction); err != nil { + return nil, err + } + transactions = append(transactions, &transaction) + } + return transactions, nil +} + +func (c *Client) DecodeProtoBlocks(data []string) ([]*ArbitrumOneBlock, error) { + var blocks []*ArbitrumOneBlock + for _, d := range data { + var block ArbitrumOneBlock + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &block); err != nil { + return nil, err + } + blocks = append(blocks, &block) + } + return blocks, nil +} + +func (c *Client) DecodeProtoEventsToLabels(events []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.EventLabel, error) { + + decodedEvents, err := c.DecodeProtoEventLogs(events) + + if err != nil { + return nil, err + } + + var labels []indexer.EventLabel + + for _, event := range decodedEvents { + + var topicSelector string + + if len(event.Topics) > 0 { + topicSelector = event.Topics[0][:10] + } else { + continue + } + + checksumAddress := common.HexToAddress(event.Address).Hex() + + // Get the ABI string + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][topicSelector]["abi"])) + if err != nil { + fmt.Println("Error initializing contract ABI: ", err) + return nil, err + } + + // Decode the event data + decodedArgs, err := seer_common.DecodeLogArgsToLabelData(&contractAbi, event.Topics, event.Data) + + if err != nil { + fmt.Println("Error decoding event data: ", err) + return nil, err + } + + // Convert decodedArgs map to JSON + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert event to label + eventLabel := indexer.EventLabel{ + Label: indexer.SeerCrawlerLabel, + LabelName: abiMap[checksumAddress][topicSelector]["abi_name"], + LabelType: "event", + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + Address: event.Address, + TransactionHash: event.TransactionHash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[event.BlockNumber], + LogIndex: event.LogIndex, + } + + labels = append(labels, eventLabel) + + } + + return labels, nil +} + +func (c *Client) DecodeProtoTransactionsToLabels(transactions []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.TransactionLabel, error) { + + decodedTransactions, err := c.DecodeProtoTransactions(transactions) + + if err != nil { + return nil, err + } + + var labels []indexer.TransactionLabel + + for _, transaction := range decodedTransactions { + + selector := transaction.Input[:10] + + // To checksum address + checksumAddress := common.HexToAddress(transaction.ToAddress).Hex() + + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][selector]["abi"])) + + if err != nil { + return nil, err + } + + inputData, err := hex.DecodeString(transaction.Input[2:]) + if err != nil { + fmt.Println("Error decoding input data: ", err) + return nil, err + } + + decodedArgs, err := seer_common.DecodeTransactionInputDataToInterface(&contractAbi, inputData) + + if err != nil { + fmt.Println("Error decoding transaction input data: ", err) + return nil, err + } + + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert transaction to label + transactionLabel := indexer.TransactionLabel{ + Address: transaction.ToAddress, + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + CallerAddress: transaction.FromAddress, + LabelName: abiMap[checksumAddress][selector]["abi_name"], + LabelType: "tx_call", + OriginAddress: transaction.FromAddress, + Label: indexer.SeerCrawlerLabel, + TransactionHash: transaction.Hash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[transaction.BlockNumber], + } + + labels = append(labels, transactionLabel) + + } + + return labels, nil +} diff --git a/blockchain/arbitrum_one/arbitrum_one_index_types.pb.go b/blockchain/arbitrum_one/arbitrum_one_index_types.pb.go new file mode 100644 index 0000000..ebd0810 --- /dev/null +++ b/blockchain/arbitrum_one/arbitrum_one_index_types.pb.go @@ -0,0 +1,790 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.1 +// protoc v3.6.1 +// source: arbitrum_one_index_types.proto + +package arbitrum_one + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents a single transaction within a block +type ArbitrumOneTransaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types +} + +func (x *ArbitrumOneTransaction) Reset() { + *x = ArbitrumOneTransaction{} + if protoimpl.UnsafeEnabled { + mi := &file_arbitrum_one_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArbitrumOneTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArbitrumOneTransaction) ProtoMessage() {} + +func (x *ArbitrumOneTransaction) ProtoReflect() protoreflect.Message { + mi := &file_arbitrum_one_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArbitrumOneTransaction.ProtoReflect.Descriptor instead. +func (*ArbitrumOneTransaction) Descriptor() ([]byte, []int) { + return file_arbitrum_one_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *ArbitrumOneTransaction) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *ArbitrumOneTransaction) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *ArbitrumOneTransaction) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *ArbitrumOneTransaction) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *ArbitrumOneTransaction) GetGas() string { + if x != nil { + return x.Gas + } + return "" +} + +func (x *ArbitrumOneTransaction) GetGasPrice() string { + if x != nil { + return x.GasPrice + } + return "" +} + +func (x *ArbitrumOneTransaction) GetMaxFeePerGas() string { + if x != nil { + return x.MaxFeePerGas + } + return "" +} + +func (x *ArbitrumOneTransaction) GetMaxPriorityFeePerGas() string { + if x != nil { + return x.MaxPriorityFeePerGas + } + return "" +} + +func (x *ArbitrumOneTransaction) GetInput() string { + if x != nil { + return x.Input + } + return "" +} + +func (x *ArbitrumOneTransaction) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *ArbitrumOneTransaction) GetTransactionIndex() uint64 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +func (x *ArbitrumOneTransaction) GetTransactionType() uint64 { + if x != nil { + return x.TransactionType + } + return 0 +} + +func (x *ArbitrumOneTransaction) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *ArbitrumOneTransaction) GetIndexedAt() uint64 { + if x != nil { + return x.IndexedAt + } + return 0 +} + +func (x *ArbitrumOneTransaction) GetBlockTimestamp() uint64 { + if x != nil { + return x.BlockTimestamp + } + return 0 +} + +func (x *ArbitrumOneTransaction) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *ArbitrumOneTransaction) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *ArbitrumOneTransaction) GetV() string { + if x != nil { + return x.V + } + return "" +} + +func (x *ArbitrumOneTransaction) GetR() string { + if x != nil { + return x.R + } + return "" +} + +func (x *ArbitrumOneTransaction) GetS() string { + if x != nil { + return x.S + } + return "" +} + +func (x *ArbitrumOneTransaction) GetAccessList() []string { + if x != nil { + return x.AccessList + } + return nil +} + +func (x *ArbitrumOneTransaction) GetYParity() string { + if x != nil { + return x.YParity + } + return "" +} + +// Represents a block in the Arbitrum blockchain +type ArbitrumOneBlock struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number + Difficulty uint64 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty,omitempty"` // The difficulty of this block + ExtraData string `protobuf:"bytes,3,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"` // Extra data included in the block + GasLimit uint64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // The gas limit for this block + GasUsed uint64 `protobuf:"varint,5,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` // The total gas used by all transactions in this block + BaseFeePerGas string `protobuf:"bytes,6,opt,name=base_fee_per_gas,json=baseFeePerGas,proto3" json:"base_fee_per_gas,omitempty"` // The base fee per gas for this block + Hash string `protobuf:"bytes,7,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of this block + LogsBloom string `protobuf:"bytes,8,opt,name=logs_bloom,json=logsBloom,proto3" json:"logs_bloom,omitempty"` // The logs bloom filter for this block + Miner string `protobuf:"bytes,9,opt,name=miner,proto3" json:"miner,omitempty"` // The address of the miner who mined this block + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of this block + ParentHash string `protobuf:"bytes,11,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` // The hash of the parent block + ReceiptsRoot string `protobuf:"bytes,12,opt,name=receipts_root,json=receiptsRoot,proto3" json:"receipts_root,omitempty"` // The root hash of the receipts trie + Sha3Uncles string `protobuf:"bytes,13,opt,name=sha3_uncles,json=sha3Uncles,proto3" json:"sha3_uncles,omitempty"` // The SHA3 hash of the uncles data in this block + Size uint64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"` // The size of this block + StateRoot string `protobuf:"bytes,15,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` // The root hash of the state trie + Timestamp uint64 `protobuf:"varint,16,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + TotalDifficulty string `protobuf:"bytes,17,opt,name=total_difficulty,json=totalDifficulty,proto3" json:"total_difficulty,omitempty"` // The total difficulty of the chain until this block + TransactionsRoot string `protobuf:"bytes,18,opt,name=transactions_root,json=transactionsRoot,proto3" json:"transactions_root,omitempty"` // The root hash of the transactions trie + IndexedAt uint64 `protobuf:"varint,19,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the block was indexed by crawler + Transactions []*ArbitrumOneTransaction `protobuf:"bytes,20,rep,name=transactions,proto3" json:"transactions,omitempty"` // The transactions included in this block + MixHash string `protobuf:"bytes,21,opt,name=mix_hash,json=mixHash,proto3" json:"mix_hash,omitempty"` // The timestamp of this block + SendCount string `protobuf:"bytes,22,opt,name=send_count,json=sendCount,proto3" json:"send_count,omitempty"` // The number of sends in this block + SendRoot string `protobuf:"bytes,23,opt,name=send_root,json=sendRoot,proto3" json:"send_root,omitempty"` // The root hash of the sends trie + L1BlockNumber uint64 `protobuf:"varint,24,opt,name=l1_block_number,json=l1BlockNumber,proto3" json:"l1_block_number,omitempty"` // The block number of the corresponding L1 block +} + +func (x *ArbitrumOneBlock) Reset() { + *x = ArbitrumOneBlock{} + if protoimpl.UnsafeEnabled { + mi := &file_arbitrum_one_index_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArbitrumOneBlock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArbitrumOneBlock) ProtoMessage() {} + +func (x *ArbitrumOneBlock) ProtoReflect() protoreflect.Message { + mi := &file_arbitrum_one_index_types_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArbitrumOneBlock.ProtoReflect.Descriptor instead. +func (*ArbitrumOneBlock) Descriptor() ([]byte, []int) { + return file_arbitrum_one_index_types_proto_rawDescGZIP(), []int{1} +} + +func (x *ArbitrumOneBlock) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *ArbitrumOneBlock) GetDifficulty() uint64 { + if x != nil { + return x.Difficulty + } + return 0 +} + +func (x *ArbitrumOneBlock) GetExtraData() string { + if x != nil { + return x.ExtraData + } + return "" +} + +func (x *ArbitrumOneBlock) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *ArbitrumOneBlock) GetGasUsed() uint64 { + if x != nil { + return x.GasUsed + } + return 0 +} + +func (x *ArbitrumOneBlock) GetBaseFeePerGas() string { + if x != nil { + return x.BaseFeePerGas + } + return "" +} + +func (x *ArbitrumOneBlock) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *ArbitrumOneBlock) GetLogsBloom() string { + if x != nil { + return x.LogsBloom + } + return "" +} + +func (x *ArbitrumOneBlock) GetMiner() string { + if x != nil { + return x.Miner + } + return "" +} + +func (x *ArbitrumOneBlock) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *ArbitrumOneBlock) GetParentHash() string { + if x != nil { + return x.ParentHash + } + return "" +} + +func (x *ArbitrumOneBlock) GetReceiptsRoot() string { + if x != nil { + return x.ReceiptsRoot + } + return "" +} + +func (x *ArbitrumOneBlock) GetSha3Uncles() string { + if x != nil { + return x.Sha3Uncles + } + return "" +} + +func (x *ArbitrumOneBlock) GetSize() uint64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *ArbitrumOneBlock) GetStateRoot() string { + if x != nil { + return x.StateRoot + } + return "" +} + +func (x *ArbitrumOneBlock) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *ArbitrumOneBlock) GetTotalDifficulty() string { + if x != nil { + return x.TotalDifficulty + } + return "" +} + +func (x *ArbitrumOneBlock) GetTransactionsRoot() string { + if x != nil { + return x.TransactionsRoot + } + return "" +} + +func (x *ArbitrumOneBlock) GetIndexedAt() uint64 { + if x != nil { + return x.IndexedAt + } + return 0 +} + +func (x *ArbitrumOneBlock) GetTransactions() []*ArbitrumOneTransaction { + if x != nil { + return x.Transactions + } + return nil +} + +func (x *ArbitrumOneBlock) GetMixHash() string { + if x != nil { + return x.MixHash + } + return "" +} + +func (x *ArbitrumOneBlock) GetSendCount() string { + if x != nil { + return x.SendCount + } + return "" +} + +func (x *ArbitrumOneBlock) GetSendRoot() string { + if x != nil { + return x.SendRoot + } + return "" +} + +func (x *ArbitrumOneBlock) GetL1BlockNumber() uint64 { + if x != nil { + return x.L1BlockNumber + } + return 0 +} + +type ArbitrumOneEventLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // The address of the contract that generated the log + Topics []string `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"` // Topics are indexed parameters during log generation + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // The data field from the log + BlockNumber uint64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number where this log was in + TransactionHash string `protobuf:"bytes,5,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` // The hash of the transaction that generated this log + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block where this log was in + Removed bool `protobuf:"varint,7,opt,name=removed,proto3" json:"removed,omitempty"` // True if the log was reverted due to a chain reorganization + LogIndex uint64 `protobuf:"varint,8,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // The index of the log in the block + TransactionIndex uint64 `protobuf:"varint,9,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block +} + +func (x *ArbitrumOneEventLog) Reset() { + *x = ArbitrumOneEventLog{} + if protoimpl.UnsafeEnabled { + mi := &file_arbitrum_one_index_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArbitrumOneEventLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArbitrumOneEventLog) ProtoMessage() {} + +func (x *ArbitrumOneEventLog) ProtoReflect() protoreflect.Message { + mi := &file_arbitrum_one_index_types_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArbitrumOneEventLog.ProtoReflect.Descriptor instead. +func (*ArbitrumOneEventLog) Descriptor() ([]byte, []int) { + return file_arbitrum_one_index_types_proto_rawDescGZIP(), []int{2} +} + +func (x *ArbitrumOneEventLog) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *ArbitrumOneEventLog) GetTopics() []string { + if x != nil { + return x.Topics + } + return nil +} + +func (x *ArbitrumOneEventLog) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *ArbitrumOneEventLog) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *ArbitrumOneEventLog) GetTransactionHash() string { + if x != nil { + return x.TransactionHash + } + return "" +} + +func (x *ArbitrumOneEventLog) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *ArbitrumOneEventLog) GetRemoved() bool { + if x != nil { + return x.Removed + } + return false +} + +func (x *ArbitrumOneEventLog) GetLogIndex() uint64 { + if x != nil { + return x.LogIndex + } + return 0 +} + +func (x *ArbitrumOneEventLog) GetTransactionIndex() uint64 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +var File_arbitrum_one_index_types_proto protoreflect.FileDescriptor + +var file_arbitrum_one_index_types_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x5f, 0x6f, 0x6e, 0x65, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xa1, 0x05, 0x0a, 0x16, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x4f, 0x6e, 0x65, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, + 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, + 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, + 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, + 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, + 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, + 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, + 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, + 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, + 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, + 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, + 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, + 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, + 0x72, 0x69, 0x74, 0x79, 0x22, 0x9f, 0x06, 0x0a, 0x10, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, + 0x6d, 0x4f, 0x6e, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, + 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, + 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, + 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, + 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, + 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, + 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, + 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, + 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, + 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, + 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, + 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, + 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3b, 0x0a, 0x0c, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x4f, 0x6e, 0x65, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x78, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x78, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x17, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, + 0x0a, 0x0f, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xac, 0x02, 0x0a, 0x13, 0x41, 0x72, 0x62, 0x69, 0x74, + 0x72, 0x75, 0x6d, 0x4f, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, + 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, + 0x75, 0x6d, 0x5f, 0x6f, 0x6e, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_arbitrum_one_index_types_proto_rawDescOnce sync.Once + file_arbitrum_one_index_types_proto_rawDescData = file_arbitrum_one_index_types_proto_rawDesc +) + +func file_arbitrum_one_index_types_proto_rawDescGZIP() []byte { + file_arbitrum_one_index_types_proto_rawDescOnce.Do(func() { + file_arbitrum_one_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_arbitrum_one_index_types_proto_rawDescData) + }) + return file_arbitrum_one_index_types_proto_rawDescData +} + +var file_arbitrum_one_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_arbitrum_one_index_types_proto_goTypes = []interface{}{ + (*ArbitrumOneTransaction)(nil), // 0: ArbitrumOneTransaction + (*ArbitrumOneBlock)(nil), // 1: ArbitrumOneBlock + (*ArbitrumOneEventLog)(nil), // 2: ArbitrumOneEventLog +} +var file_arbitrum_one_index_types_proto_depIdxs = []int32{ + 0, // 0: ArbitrumOneBlock.transactions:type_name -> ArbitrumOneTransaction + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_arbitrum_one_index_types_proto_init() } +func file_arbitrum_one_index_types_proto_init() { + if File_arbitrum_one_index_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_arbitrum_one_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArbitrumOneTransaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_arbitrum_one_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArbitrumOneBlock); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_arbitrum_one_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArbitrumOneEventLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_arbitrum_one_index_types_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_arbitrum_one_index_types_proto_goTypes, + DependencyIndexes: file_arbitrum_one_index_types_proto_depIdxs, + MessageInfos: file_arbitrum_one_index_types_proto_msgTypes, + }.Build() + File_arbitrum_one_index_types_proto = out.File + file_arbitrum_one_index_types_proto_rawDesc = nil + file_arbitrum_one_index_types_proto_goTypes = nil + file_arbitrum_one_index_types_proto_depIdxs = nil +} diff --git a/blockchain/arbitrum_one/arbitrum_one_index_types.proto b/blockchain/arbitrum_one/arbitrum_one_index_types.proto new file mode 100644 index 0000000..1138358 --- /dev/null +++ b/blockchain/arbitrum_one/arbitrum_one_index_types.proto @@ -0,0 +1,72 @@ +syntax = "proto3"; + +option go_package = ".arbitrum_one"; + + +// Represents a single transaction within a block +message ArbitrumOneTransaction { + string hash = 1; // The hash of the transaction + uint64 block_number = 2; // The block number the transaction is in + string from_address = 3; // The address the transaction is sent from + string to_address = 4; // The address the transaction is sent to + string gas = 5; // The gas limit of the transaction + string gas_price = 6; // The gas price of the transaction + string max_fee_per_gas = 7; // Used as a field to match potential EIP-1559 transaction types + string max_priority_fee_per_gas = 8; // Used as a field to match potential EIP-1559 transaction types + string input = 9; // The input data of the transaction + string nonce = 10; // The nonce of the transaction + uint64 transaction_index = 11; // The index of the transaction in the block + uint64 transaction_type = 12; // Field to match potential EIP-1559 transaction types + string value = 13; // The value of the transaction + uint64 indexed_at = 14; // When the transaction was indexed by crawler + uint64 block_timestamp = 15; // The timestamp of this block + string block_hash = 16; // The hash of the block the transaction is in + string chain_id = 17; // Used as a field to match potential EIP-1559 transaction types + string v = 18; // Used as a field to match potential EIP-1559 transaction types + string r = 19; // Used as a field to match potential EIP-1559 transaction types + string s = 20; // Used as a field to match potential EIP-1559 transaction types + repeated string access_list = 21; + + string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types +} + +// Represents a block in the Arbitrum blockchain +message ArbitrumOneBlock { + uint64 block_number = 1; // The block number + uint64 difficulty = 2; // The difficulty of this block + string extra_data = 3; // Extra data included in the block + uint64 gas_limit = 4; // The gas limit for this block + uint64 gas_used = 5; // The total gas used by all transactions in this block + string base_fee_per_gas = 6; // The base fee per gas for this block + string hash = 7; // The hash of this block + string logs_bloom = 8; // The logs bloom filter for this block + string miner = 9; // The address of the miner who mined this block + string nonce = 10; // The nonce of this block + string parent_hash = 11; // The hash of the parent block + string receipts_root = 12; // The root hash of the receipts trie + string sha3_uncles = 13; // The SHA3 hash of the uncles data in this block + uint64 size = 14; // The size of this block + string state_root = 15; // The root hash of the state trie + uint64 timestamp = 16; + string total_difficulty = 17; // The total difficulty of the chain until this block + string transactions_root = 18; // The root hash of the transactions trie + uint64 indexed_at = 19; // When the block was indexed by crawler + repeated ArbitrumOneTransaction transactions = 20; // The transactions included in this block + + string mix_hash = 21; // The timestamp of this block + string send_count = 22; // The number of sends in this block + string send_root = 23; // The root hash of the sends trie + uint64 l1_block_number = 24; // The block number of the corresponding L1 block +} + +message ArbitrumOneEventLog { + string address = 1; // The address of the contract that generated the log + repeated string topics = 2; // Topics are indexed parameters during log generation + string data = 3; // The data field from the log + uint64 block_number = 4; // The block number where this log was in + string transaction_hash = 5; // The hash of the transaction that generated this log + string block_hash = 6; // The hash of the block where this log was in + bool removed = 7; // True if the log was reverted due to a chain reorganization + uint64 log_index = 8; // The index of the log in the block + uint64 transaction_index = 9; // The index of the transaction in the block +} \ No newline at end of file diff --git a/blockchain/arbitrum_sepolia/arbitrum_sepolia.go b/blockchain/arbitrum_sepolia/arbitrum_sepolia.go new file mode 100644 index 0000000..fe690b8 --- /dev/null +++ b/blockchain/arbitrum_sepolia/arbitrum_sepolia.go @@ -0,0 +1,604 @@ +package arbitrum_sepolia + +import ( + "context" + "encoding/base64" + "encoding/hex" + "encoding/json" + "fmt" + "math/big" + "strings" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rpc" + seer_common "github.com/moonstream-to/seer/blockchain/common" + "github.com/moonstream-to/seer/indexer" + "google.golang.org/protobuf/proto" +) + +func NewClient(url string) (*Client, error) { + rpcClient, err := rpc.DialContext(context.Background(), url) + if err != nil { + return nil, err + } + return &Client{rpcClient: rpcClient}, nil +} + +// Client is a wrapper around the Ethereum JSON-RPC client. + +type Client struct { + rpcClient *rpc.Client +} + +// Client common + +// ChainType returns the chain type. +func (c *Client) ChainType() string { + return "arbitrum_sepolia" +} + +// Close closes the underlying RPC client. +func (c *Client) Close() { + c.rpcClient.Close() +} + +// GetLatestBlockNumber returns the latest block number. +func (c *Client) GetLatestBlockNumber() (*big.Int, error) { + var result string + if err := c.rpcClient.CallContext(context.Background(), &result, "eth_blockNumber"); err != nil { + return nil, err + } + + // Convert the hex string to a big.Int + blockNumber, ok := new(big.Int).SetString(result, 0) // The 0 base lets the function infer the base from the string prefix. + if !ok { + return nil, fmt.Errorf("invalid block number format: %s", result) + } + + return blockNumber, nil +} + +// BlockByNumber returns the block with the given number. +func (c *Client) GetBlockByNumber(ctx context.Context, number *big.Int) (*seer_common.BlockJson, error) { + + var rawResponse json.RawMessage // Use RawMessage to capture the entire JSON response + err := c.rpcClient.CallContext(ctx, &rawResponse, "eth_getBlockByNumber", "0x"+number.Text(16), true) + if err != nil { + fmt.Println("Error calling eth_getBlockByNumber: ", err) + return nil, err + } + + var response_json map[string]interface{} + + err = json.Unmarshal(rawResponse, &response_json) + + delete(response_json, "transactions") + + var block *seer_common.BlockJson + err = c.rpcClient.CallContext(ctx, &block, "eth_getBlockByNumber", "0x"+number.Text(16), true) // true to include transactions + return block, err +} + +// BlockByHash returns the block with the given hash. +func (c *Client) BlockByHash(ctx context.Context, hash common.Hash) (*seer_common.BlockJson, error) { + var block *seer_common.BlockJson + err := c.rpcClient.CallContext(ctx, &block, "eth_getBlockByHash", hash, true) // true to include transactions + return block, err +} + +// TransactionReceipt returns the receipt of a transaction by transaction hash. +func (c *Client) TransactionReceipt(ctx context.Context, hash common.Hash) (*types.Receipt, error) { + var receipt *types.Receipt + err := c.rpcClient.CallContext(ctx, &receipt, "eth_getTransactionReceipt", hash) + return receipt, err +} + +func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]*seer_common.EventJson, error) { + var logs []*seer_common.EventJson + fromBlock := q.FromBlock + toBlock := q.ToBlock + batchStep := new(big.Int).Sub(toBlock, fromBlock) // Calculate initial batch step + + for { + // Calculate the next "lastBlock" within the batch step or adjust to "toBlock" if exceeding + nextBlock := new(big.Int).Add(fromBlock, batchStep) + if nextBlock.Cmp(toBlock) > 0 { + nextBlock = new(big.Int).Set(toBlock) + } + + var result []*seer_common.EventJson + err := c.rpcClient.CallContext(ctx, &result, "eth_getLogs", struct { + FromBlock string `json:"fromBlock"` + ToBlock string `json:"toBlock"` + Addresses []common.Address `json:"addresses"` + Topics [][]common.Hash `json:"topics"` + }{ + FromBlock: toHex(fromBlock), + ToBlock: toHex(nextBlock), + Addresses: q.Addresses, + Topics: q.Topics, + }) + + if err != nil { + if strings.Contains(err.Error(), "query returned more than 10000 results") { + // Halve the batch step if too many results and retry + batchStep.Div(batchStep, big.NewInt(2)) + if batchStep.Cmp(big.NewInt(1)) < 0 { + // If the batch step is too small we will skip that block + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + if fromBlock.Cmp(toBlock) > 0 { + break + } + continue + } + continue + } else { + // For any other error, return immediately + return nil, err + } + } + + // Append the results and adjust "fromBlock" for the next batch + logs = append(logs, result...) + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + + // Break the loop if we've reached or exceeded "toBlock" + if fromBlock.Cmp(toBlock) > 0 { + break + } + } + + return logs, nil +} + +// fetchBlocks returns the blocks for a given range. +func (c *Client) fetchBlocks(ctx context.Context, from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + + for i := from; i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + return blocks, nil +} + +// Utility function to convert big.Int to its hexadecimal representation. +func toHex(number *big.Int) string { + return fmt.Sprintf("0x%x", number) +} + +func fromHex(hex string) *big.Int { + number := new(big.Int) + number.SetString(hex, 0) + return number +} + +// FetchBlocksInRange fetches blocks within a specified range. +// This could be useful for batch processing or analysis. +func (c *Client) FetchBlocksInRange(from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + ctx := context.Background() // For simplicity, using a background context; consider timeouts for production. + + for i := new(big.Int).Set(from); i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + fmt.Println("Block number: ", i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + + return blocks, nil +} + +// ParseBlocksAndTransactions parses blocks and their transactions into custom data structures. +// This method showcases how to handle and transform detailed block and transaction data. +func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*ArbitrumSepoliaBlock, []*ArbitrumSepoliaTransaction, error) { + blocksJson, err := c.FetchBlocksInRange(from, to) + if err != nil { + return nil, nil, err + } + + var parsedBlocks []*ArbitrumSepoliaBlock + var parsedTransactions []*ArbitrumSepoliaTransaction + for _, blockJson := range blocksJson { + // Convert BlockJson to Block and Transactions as required. + parsedBlock := ToProtoSingleBlock(blockJson) + + // Example: Parsing transactions within the block + for _, txJson := range blockJson.Transactions { + + txJson.BlockTimestamp = blockJson.Timestamp + + parsedTransaction := ToProtoSingleTransaction(&txJson) + parsedTransactions = append(parsedTransactions, parsedTransaction) + } + + parsedBlocks = append(parsedBlocks, parsedBlock) + } + + return parsedBlocks, parsedTransactions, nil +} + +func (c *Client) ParseEvents(from, to *big.Int, blocksCache map[uint64]indexer.BlockCache) ([]*ArbitrumSepoliaEventLog, error) { + + logs, err := c.ClientFilterLogs(context.Background(), ethereum.FilterQuery{ + FromBlock: from, + ToBlock: to, + }) + + if err != nil { + fmt.Println("Error fetching logs: ", err) + return nil, err + } + + var parsedEvents []*ArbitrumSepoliaEventLog + for _, log := range logs { + parsedEvent := ToProtoSingleEventLog(log) + parsedEvents = append(parsedEvents, parsedEvent) + } + + return parsedEvents, nil +} + +func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCache, error) { + parsedBlocks, parsedTransactions, err := c.ParseBlocksAndTransactions(from, to) + + if err != nil { + return nil, nil, nil, nil, nil, err + } + + blocksCache := make(map[uint64]indexer.BlockCache) + + var blocksProto []proto.Message + var blockIndex []indexer.BlockIndex + for index, block := range parsedBlocks { + blocksProto = append(blocksProto, block) // Assuming block is already a proto.Message + blocksCache[block.BlockNumber] = indexer.BlockCache{ + BlockNumber: block.BlockNumber, + BlockHash: block.Hash, + BlockTimestamp: block.Timestamp, + } // Assuming block.BlockNumber is int64 and block.Hash is string + blockIndex = append(blockIndex, indexer.NewBlockIndex("arbitrum_sepolia", + block.BlockNumber, + block.Hash, + block.Timestamp, + block.ParentHash, + uint64(index), + "", + )) + } + + var transactionsProto []proto.Message + var transactionIndex []indexer.TransactionIndex + for index, transaction := range parsedTransactions { + transactionsProto = append(transactionsProto, transaction) // Assuming transaction is also a proto.Message + + selector := "0x" + + if len(transaction.Input) > 10 { + selector = transaction.Input[:10] + } + + transactionIndex = append(transactionIndex, indexer.TransactionIndex{ + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + BlockTimestamp: transaction.BlockTimestamp, + FromAddress: transaction.FromAddress, + ToAddress: transaction.ToAddress, + RowID: uint64(index), + Selector: selector, // First 10 characters of the input data 0x + 4 bytes of the function signature + TransactionHash: transaction.Hash, + TransactionIndex: transaction.TransactionIndex, + Type: transaction.TransactionType, + Path: "", + }) + } + + return blocksProto, transactionsProto, blockIndex, transactionIndex, blocksCache, nil +} + +func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]indexer.BlockCache) ([]proto.Message, []indexer.LogIndex, error) { + + parsedEvents, err := c.ParseEvents(from, to, blocksCahche) + + if err != nil { + return nil, nil, err + } + + var eventsProto []proto.Message + var eventsIndex []indexer.LogIndex + for index, event := range parsedEvents { + eventsProto = append(eventsProto, event) // Assuming event is already a proto.Message + + var topic0, topic1, topic2 *string + + if len(event.Topics) == 0 { + fmt.Println("No topics found for event: ", event) + } else { + topic0 = &event.Topics[0] // First topic + } + + // Assign topics based on availability + if len(event.Topics) > 1 { + topic1 = &event.Topics[1] // Second topic, if present + } + if len(event.Topics) > 2 { + topic2 = &event.Topics[2] // Third topic, if present + } + + eventsIndex = append(eventsIndex, indexer.LogIndex{ + Address: event.Address, + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + BlockTimestamp: blocksCahche[event.BlockNumber].BlockTimestamp, + TransactionHash: event.TransactionHash, + Selector: topic0, // First topic + Topic1: topic1, + Topic2: topic2, + RowID: uint64(index), + LogIndex: event.LogIndex, + Path: "", + }) + } + + return eventsProto, eventsIndex, nil + +} +func ToProtoSingleBlock(obj *seer_common.BlockJson) *ArbitrumSepoliaBlock { + return &ArbitrumSepoliaBlock{ + BlockNumber: obj.BlockNumber, + Difficulty: obj.Difficulty, + ExtraData: obj.ExtraData, + GasLimit: obj.GasLimit, + GasUsed: obj.GasUsed, + BaseFeePerGas: obj.BaseFeePerGas, + Hash: obj.Hash, + LogsBloom: obj.LogsBloom, + Miner: obj.Miner, + Nonce: obj.Nonce, + ParentHash: obj.ParentHash, + ReceiptsRoot: obj.ReceiptsRoot, + Sha3Uncles: obj.Sha3Uncles, + Size: obj.Size, + StateRoot: obj.StateRoot, + Timestamp: obj.Timestamp, + TotalDifficulty: obj.TotalDifficulty, + TransactionsRoot: obj.TransactionsRoot, + IndexedAt: obj.IndexedAt, + + MixHash: obj.MixHash, + SendCount: obj.SendCount, + SendRoot: obj.SendRoot, + L1BlockNumber: obj.L1BlockNumber, + } +} + +func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *ArbitrumSepoliaTransaction { + return &ArbitrumSepoliaTransaction{ + Hash: obj.Hash, + BlockNumber: obj.BlockNumber, + BlockHash: obj.BlockHash, + FromAddress: obj.FromAddress, + ToAddress: obj.ToAddress, + Gas: obj.Gas, + GasPrice: obj.GasPrice, + MaxFeePerGas: obj.MaxFeePerGas, + MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, + Input: obj.Input, + Nonce: obj.Nonce, + TransactionIndex: obj.TransactionIndex, + TransactionType: obj.TransactionType, + Value: obj.Value, + IndexedAt: obj.IndexedAt, + BlockTimestamp: obj.BlockTimestamp, + + ChainId: obj.ChainId, + V: obj.V, + R: obj.R, + S: obj.S, + + YParity: obj.YParity, + } +} + +func ToProtoSingleEventLog(obj *seer_common.EventJson) *ArbitrumSepoliaEventLog { + + return &ArbitrumSepoliaEventLog{ + Address: obj.Address, + Topics: obj.Topics, + Data: obj.Data, + BlockNumber: obj.BlockNumber, + TransactionHash: obj.TransactionHash, + LogIndex: obj.LogIndex, + BlockHash: obj.BlockHash, + Removed: obj.Removed, + } +} + +func (c *Client) DecodeProtoEventLogs(data []string) ([]*ArbitrumSepoliaEventLog, error) { + var events []*ArbitrumSepoliaEventLog + for _, d := range data { + var event ArbitrumSepoliaEventLog + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &event); err != nil { + return nil, err + } + events = append(events, &event) + } + return events, nil +} + +func (c *Client) DecodeProtoTransactions(data []string) ([]*ArbitrumSepoliaTransaction, error) { + var transactions []*ArbitrumSepoliaTransaction + for _, d := range data { + var transaction ArbitrumSepoliaTransaction + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &transaction); err != nil { + return nil, err + } + transactions = append(transactions, &transaction) + } + return transactions, nil +} + +func (c *Client) DecodeProtoBlocks(data []string) ([]*ArbitrumSepoliaBlock, error) { + var blocks []*ArbitrumSepoliaBlock + for _, d := range data { + var block ArbitrumSepoliaBlock + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &block); err != nil { + return nil, err + } + blocks = append(blocks, &block) + } + return blocks, nil +} + +func (c *Client) DecodeProtoEventsToLabels(events []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.EventLabel, error) { + + decodedEvents, err := c.DecodeProtoEventLogs(events) + + if err != nil { + return nil, err + } + + var labels []indexer.EventLabel + + for _, event := range decodedEvents { + + var topicSelector string + + if len(event.Topics) > 0 { + topicSelector = event.Topics[0][:10] + } else { + continue + } + + checksumAddress := common.HexToAddress(event.Address).Hex() + + // Get the ABI string + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][topicSelector]["abi"])) + if err != nil { + fmt.Println("Error initializing contract ABI: ", err) + return nil, err + } + + // Decode the event data + decodedArgs, err := seer_common.DecodeLogArgsToLabelData(&contractAbi, event.Topics, event.Data) + + if err != nil { + fmt.Println("Error decoding event data: ", err) + return nil, err + } + + // Convert decodedArgs map to JSON + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert event to label + eventLabel := indexer.EventLabel{ + Label: indexer.SeerCrawlerLabel, + LabelName: abiMap[checksumAddress][topicSelector]["abi_name"], + LabelType: "event", + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + Address: event.Address, + TransactionHash: event.TransactionHash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[event.BlockNumber], + LogIndex: event.LogIndex, + } + + labels = append(labels, eventLabel) + + } + + return labels, nil +} + +func (c *Client) DecodeProtoTransactionsToLabels(transactions []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.TransactionLabel, error) { + + decodedTransactions, err := c.DecodeProtoTransactions(transactions) + + if err != nil { + return nil, err + } + + var labels []indexer.TransactionLabel + + for _, transaction := range decodedTransactions { + + selector := transaction.Input[:10] + + // To checksum address + checksumAddress := common.HexToAddress(transaction.ToAddress).Hex() + + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][selector]["abi"])) + + if err != nil { + return nil, err + } + + inputData, err := hex.DecodeString(transaction.Input[2:]) + if err != nil { + fmt.Println("Error decoding input data: ", err) + return nil, err + } + + decodedArgs, err := seer_common.DecodeTransactionInputDataToInterface(&contractAbi, inputData) + + if err != nil { + fmt.Println("Error decoding transaction input data: ", err) + return nil, err + } + + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert transaction to label + transactionLabel := indexer.TransactionLabel{ + Address: transaction.ToAddress, + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + CallerAddress: transaction.FromAddress, + LabelName: abiMap[checksumAddress][selector]["abi_name"], + LabelType: "tx_call", + OriginAddress: transaction.FromAddress, + Label: indexer.SeerCrawlerLabel, + TransactionHash: transaction.Hash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[transaction.BlockNumber], + } + + labels = append(labels, transactionLabel) + + } + + return labels, nil +} diff --git a/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.pb.go b/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.pb.go new file mode 100644 index 0000000..7e377d1 --- /dev/null +++ b/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.pb.go @@ -0,0 +1,792 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.1 +// protoc v3.6.1 +// source: arbitrum_sepolia_index_types.proto + +package arbitrum_sepolia + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents a single transaction within a block +type ArbitrumSepoliaTransaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types +} + +func (x *ArbitrumSepoliaTransaction) Reset() { + *x = ArbitrumSepoliaTransaction{} + if protoimpl.UnsafeEnabled { + mi := &file_arbitrum_sepolia_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArbitrumSepoliaTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArbitrumSepoliaTransaction) ProtoMessage() {} + +func (x *ArbitrumSepoliaTransaction) ProtoReflect() protoreflect.Message { + mi := &file_arbitrum_sepolia_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArbitrumSepoliaTransaction.ProtoReflect.Descriptor instead. +func (*ArbitrumSepoliaTransaction) Descriptor() ([]byte, []int) { + return file_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *ArbitrumSepoliaTransaction) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *ArbitrumSepoliaTransaction) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *ArbitrumSepoliaTransaction) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *ArbitrumSepoliaTransaction) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *ArbitrumSepoliaTransaction) GetGas() string { + if x != nil { + return x.Gas + } + return "" +} + +func (x *ArbitrumSepoliaTransaction) GetGasPrice() string { + if x != nil { + return x.GasPrice + } + return "" +} + +func (x *ArbitrumSepoliaTransaction) GetMaxFeePerGas() string { + if x != nil { + return x.MaxFeePerGas + } + return "" +} + +func (x *ArbitrumSepoliaTransaction) GetMaxPriorityFeePerGas() string { + if x != nil { + return x.MaxPriorityFeePerGas + } + return "" +} + +func (x *ArbitrumSepoliaTransaction) GetInput() string { + if x != nil { + return x.Input + } + return "" +} + +func (x *ArbitrumSepoliaTransaction) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *ArbitrumSepoliaTransaction) GetTransactionIndex() uint64 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +func (x *ArbitrumSepoliaTransaction) GetTransactionType() uint64 { + if x != nil { + return x.TransactionType + } + return 0 +} + +func (x *ArbitrumSepoliaTransaction) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *ArbitrumSepoliaTransaction) GetIndexedAt() uint64 { + if x != nil { + return x.IndexedAt + } + return 0 +} + +func (x *ArbitrumSepoliaTransaction) GetBlockTimestamp() uint64 { + if x != nil { + return x.BlockTimestamp + } + return 0 +} + +func (x *ArbitrumSepoliaTransaction) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *ArbitrumSepoliaTransaction) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *ArbitrumSepoliaTransaction) GetV() string { + if x != nil { + return x.V + } + return "" +} + +func (x *ArbitrumSepoliaTransaction) GetR() string { + if x != nil { + return x.R + } + return "" +} + +func (x *ArbitrumSepoliaTransaction) GetS() string { + if x != nil { + return x.S + } + return "" +} + +func (x *ArbitrumSepoliaTransaction) GetAccessList() []string { + if x != nil { + return x.AccessList + } + return nil +} + +func (x *ArbitrumSepoliaTransaction) GetYParity() string { + if x != nil { + return x.YParity + } + return "" +} + +// Represents a block in the Arbitrum blockchain +type ArbitrumSepoliaBlock struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number + Difficulty uint64 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty,omitempty"` // The difficulty of this block + ExtraData string `protobuf:"bytes,3,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"` // Extra data included in the block + GasLimit uint64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // The gas limit for this block + GasUsed uint64 `protobuf:"varint,5,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` // The total gas used by all transactions in this block + BaseFeePerGas string `protobuf:"bytes,6,opt,name=base_fee_per_gas,json=baseFeePerGas,proto3" json:"base_fee_per_gas,omitempty"` // The base fee per gas for this block + Hash string `protobuf:"bytes,7,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of this block + LogsBloom string `protobuf:"bytes,8,opt,name=logs_bloom,json=logsBloom,proto3" json:"logs_bloom,omitempty"` // The logs bloom filter for this block + Miner string `protobuf:"bytes,9,opt,name=miner,proto3" json:"miner,omitempty"` // The address of the miner who mined this block + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of this block + ParentHash string `protobuf:"bytes,11,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` // The hash of the parent block + ReceiptsRoot string `protobuf:"bytes,12,opt,name=receipts_root,json=receiptsRoot,proto3" json:"receipts_root,omitempty"` // The root hash of the receipts trie + Sha3Uncles string `protobuf:"bytes,13,opt,name=sha3_uncles,json=sha3Uncles,proto3" json:"sha3_uncles,omitempty"` // The SHA3 hash of the uncles data in this block + Size uint64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"` // The size of this block + StateRoot string `protobuf:"bytes,15,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` // The root hash of the state trie + Timestamp uint64 `protobuf:"varint,16,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + TotalDifficulty string `protobuf:"bytes,17,opt,name=total_difficulty,json=totalDifficulty,proto3" json:"total_difficulty,omitempty"` // The total difficulty of the chain until this block + TransactionsRoot string `protobuf:"bytes,18,opt,name=transactions_root,json=transactionsRoot,proto3" json:"transactions_root,omitempty"` // The root hash of the transactions trie + IndexedAt uint64 `protobuf:"varint,19,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the block was indexed by crawler + Transactions []*ArbitrumSepoliaTransaction `protobuf:"bytes,20,rep,name=transactions,proto3" json:"transactions,omitempty"` // The transactions included in this block + MixHash string `protobuf:"bytes,21,opt,name=mix_hash,json=mixHash,proto3" json:"mix_hash,omitempty"` // The timestamp of this block + SendCount string `protobuf:"bytes,22,opt,name=send_count,json=sendCount,proto3" json:"send_count,omitempty"` // The number of sends in this block + SendRoot string `protobuf:"bytes,23,opt,name=send_root,json=sendRoot,proto3" json:"send_root,omitempty"` // The root hash of the sends trie + L1BlockNumber uint64 `protobuf:"varint,24,opt,name=l1_block_number,json=l1BlockNumber,proto3" json:"l1_block_number,omitempty"` // The block number of the corresponding L1 block +} + +func (x *ArbitrumSepoliaBlock) Reset() { + *x = ArbitrumSepoliaBlock{} + if protoimpl.UnsafeEnabled { + mi := &file_arbitrum_sepolia_index_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArbitrumSepoliaBlock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArbitrumSepoliaBlock) ProtoMessage() {} + +func (x *ArbitrumSepoliaBlock) ProtoReflect() protoreflect.Message { + mi := &file_arbitrum_sepolia_index_types_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArbitrumSepoliaBlock.ProtoReflect.Descriptor instead. +func (*ArbitrumSepoliaBlock) Descriptor() ([]byte, []int) { + return file_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{1} +} + +func (x *ArbitrumSepoliaBlock) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *ArbitrumSepoliaBlock) GetDifficulty() uint64 { + if x != nil { + return x.Difficulty + } + return 0 +} + +func (x *ArbitrumSepoliaBlock) GetExtraData() string { + if x != nil { + return x.ExtraData + } + return "" +} + +func (x *ArbitrumSepoliaBlock) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *ArbitrumSepoliaBlock) GetGasUsed() uint64 { + if x != nil { + return x.GasUsed + } + return 0 +} + +func (x *ArbitrumSepoliaBlock) GetBaseFeePerGas() string { + if x != nil { + return x.BaseFeePerGas + } + return "" +} + +func (x *ArbitrumSepoliaBlock) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *ArbitrumSepoliaBlock) GetLogsBloom() string { + if x != nil { + return x.LogsBloom + } + return "" +} + +func (x *ArbitrumSepoliaBlock) GetMiner() string { + if x != nil { + return x.Miner + } + return "" +} + +func (x *ArbitrumSepoliaBlock) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *ArbitrumSepoliaBlock) GetParentHash() string { + if x != nil { + return x.ParentHash + } + return "" +} + +func (x *ArbitrumSepoliaBlock) GetReceiptsRoot() string { + if x != nil { + return x.ReceiptsRoot + } + return "" +} + +func (x *ArbitrumSepoliaBlock) GetSha3Uncles() string { + if x != nil { + return x.Sha3Uncles + } + return "" +} + +func (x *ArbitrumSepoliaBlock) GetSize() uint64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *ArbitrumSepoliaBlock) GetStateRoot() string { + if x != nil { + return x.StateRoot + } + return "" +} + +func (x *ArbitrumSepoliaBlock) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *ArbitrumSepoliaBlock) GetTotalDifficulty() string { + if x != nil { + return x.TotalDifficulty + } + return "" +} + +func (x *ArbitrumSepoliaBlock) GetTransactionsRoot() string { + if x != nil { + return x.TransactionsRoot + } + return "" +} + +func (x *ArbitrumSepoliaBlock) GetIndexedAt() uint64 { + if x != nil { + return x.IndexedAt + } + return 0 +} + +func (x *ArbitrumSepoliaBlock) GetTransactions() []*ArbitrumSepoliaTransaction { + if x != nil { + return x.Transactions + } + return nil +} + +func (x *ArbitrumSepoliaBlock) GetMixHash() string { + if x != nil { + return x.MixHash + } + return "" +} + +func (x *ArbitrumSepoliaBlock) GetSendCount() string { + if x != nil { + return x.SendCount + } + return "" +} + +func (x *ArbitrumSepoliaBlock) GetSendRoot() string { + if x != nil { + return x.SendRoot + } + return "" +} + +func (x *ArbitrumSepoliaBlock) GetL1BlockNumber() uint64 { + if x != nil { + return x.L1BlockNumber + } + return 0 +} + +type ArbitrumSepoliaEventLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // The address of the contract that generated the log + Topics []string `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"` // Topics are indexed parameters during log generation + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // The data field from the log + BlockNumber uint64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number where this log was in + TransactionHash string `protobuf:"bytes,5,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` // The hash of the transaction that generated this log + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block where this log was in + Removed bool `protobuf:"varint,7,opt,name=removed,proto3" json:"removed,omitempty"` // True if the log was reverted due to a chain reorganization + LogIndex uint64 `protobuf:"varint,8,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // The index of the log in the block + TransactionIndex uint64 `protobuf:"varint,9,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block +} + +func (x *ArbitrumSepoliaEventLog) Reset() { + *x = ArbitrumSepoliaEventLog{} + if protoimpl.UnsafeEnabled { + mi := &file_arbitrum_sepolia_index_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArbitrumSepoliaEventLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArbitrumSepoliaEventLog) ProtoMessage() {} + +func (x *ArbitrumSepoliaEventLog) ProtoReflect() protoreflect.Message { + mi := &file_arbitrum_sepolia_index_types_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArbitrumSepoliaEventLog.ProtoReflect.Descriptor instead. +func (*ArbitrumSepoliaEventLog) Descriptor() ([]byte, []int) { + return file_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{2} +} + +func (x *ArbitrumSepoliaEventLog) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *ArbitrumSepoliaEventLog) GetTopics() []string { + if x != nil { + return x.Topics + } + return nil +} + +func (x *ArbitrumSepoliaEventLog) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *ArbitrumSepoliaEventLog) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *ArbitrumSepoliaEventLog) GetTransactionHash() string { + if x != nil { + return x.TransactionHash + } + return "" +} + +func (x *ArbitrumSepoliaEventLog) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *ArbitrumSepoliaEventLog) GetRemoved() bool { + if x != nil { + return x.Removed + } + return false +} + +func (x *ArbitrumSepoliaEventLog) GetLogIndex() uint64 { + if x != nil { + return x.LogIndex + } + return 0 +} + +func (x *ArbitrumSepoliaEventLog) GetTransactionIndex() uint64 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +var File_arbitrum_sepolia_index_types_proto protoreflect.FileDescriptor + +var file_arbitrum_sepolia_index_types_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, + 0x69, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5, 0x05, 0x0a, 0x1a, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, + 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, + 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, + 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, + 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, + 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, + 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, + 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, + 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, + 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, + 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0xa7, 0x06, 0x0a, + 0x14, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, + 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, + 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, + 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, + 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, + 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, + 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, + 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, + 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x41, + 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x78, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x78, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x17, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, + 0x0a, 0x0f, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xb0, 0x02, 0x0a, 0x17, 0x41, 0x72, 0x62, 0x69, 0x74, + 0x72, 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, + 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, + 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, + 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x61, 0x72, + 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_arbitrum_sepolia_index_types_proto_rawDescOnce sync.Once + file_arbitrum_sepolia_index_types_proto_rawDescData = file_arbitrum_sepolia_index_types_proto_rawDesc +) + +func file_arbitrum_sepolia_index_types_proto_rawDescGZIP() []byte { + file_arbitrum_sepolia_index_types_proto_rawDescOnce.Do(func() { + file_arbitrum_sepolia_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_arbitrum_sepolia_index_types_proto_rawDescData) + }) + return file_arbitrum_sepolia_index_types_proto_rawDescData +} + +var file_arbitrum_sepolia_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_arbitrum_sepolia_index_types_proto_goTypes = []interface{}{ + (*ArbitrumSepoliaTransaction)(nil), // 0: ArbitrumSepoliaTransaction + (*ArbitrumSepoliaBlock)(nil), // 1: ArbitrumSepoliaBlock + (*ArbitrumSepoliaEventLog)(nil), // 2: ArbitrumSepoliaEventLog +} +var file_arbitrum_sepolia_index_types_proto_depIdxs = []int32{ + 0, // 0: ArbitrumSepoliaBlock.transactions:type_name -> ArbitrumSepoliaTransaction + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_arbitrum_sepolia_index_types_proto_init() } +func file_arbitrum_sepolia_index_types_proto_init() { + if File_arbitrum_sepolia_index_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_arbitrum_sepolia_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArbitrumSepoliaTransaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_arbitrum_sepolia_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArbitrumSepoliaBlock); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_arbitrum_sepolia_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArbitrumSepoliaEventLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_arbitrum_sepolia_index_types_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_arbitrum_sepolia_index_types_proto_goTypes, + DependencyIndexes: file_arbitrum_sepolia_index_types_proto_depIdxs, + MessageInfos: file_arbitrum_sepolia_index_types_proto_msgTypes, + }.Build() + File_arbitrum_sepolia_index_types_proto = out.File + file_arbitrum_sepolia_index_types_proto_rawDesc = nil + file_arbitrum_sepolia_index_types_proto_goTypes = nil + file_arbitrum_sepolia_index_types_proto_depIdxs = nil +} diff --git a/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.proto b/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.proto new file mode 100644 index 0000000..934e13a --- /dev/null +++ b/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.proto @@ -0,0 +1,72 @@ +syntax = "proto3"; + +option go_package = ".arbitrum_sepolia"; + + +// Represents a single transaction within a block +message ArbitrumSepoliaTransaction { + string hash = 1; // The hash of the transaction + uint64 block_number = 2; // The block number the transaction is in + string from_address = 3; // The address the transaction is sent from + string to_address = 4; // The address the transaction is sent to + string gas = 5; // The gas limit of the transaction + string gas_price = 6; // The gas price of the transaction + string max_fee_per_gas = 7; // Used as a field to match potential EIP-1559 transaction types + string max_priority_fee_per_gas = 8; // Used as a field to match potential EIP-1559 transaction types + string input = 9; // The input data of the transaction + string nonce = 10; // The nonce of the transaction + uint64 transaction_index = 11; // The index of the transaction in the block + uint64 transaction_type = 12; // Field to match potential EIP-1559 transaction types + string value = 13; // The value of the transaction + uint64 indexed_at = 14; // When the transaction was indexed by crawler + uint64 block_timestamp = 15; // The timestamp of this block + string block_hash = 16; // The hash of the block the transaction is in + string chain_id = 17; // Used as a field to match potential EIP-1559 transaction types + string v = 18; // Used as a field to match potential EIP-1559 transaction types + string r = 19; // Used as a field to match potential EIP-1559 transaction types + string s = 20; // Used as a field to match potential EIP-1559 transaction types + repeated string access_list = 21; + + string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types +} + +// Represents a block in the Arbitrum blockchain +message ArbitrumSepoliaBlock { + uint64 block_number = 1; // The block number + uint64 difficulty = 2; // The difficulty of this block + string extra_data = 3; // Extra data included in the block + uint64 gas_limit = 4; // The gas limit for this block + uint64 gas_used = 5; // The total gas used by all transactions in this block + string base_fee_per_gas = 6; // The base fee per gas for this block + string hash = 7; // The hash of this block + string logs_bloom = 8; // The logs bloom filter for this block + string miner = 9; // The address of the miner who mined this block + string nonce = 10; // The nonce of this block + string parent_hash = 11; // The hash of the parent block + string receipts_root = 12; // The root hash of the receipts trie + string sha3_uncles = 13; // The SHA3 hash of the uncles data in this block + uint64 size = 14; // The size of this block + string state_root = 15; // The root hash of the state trie + uint64 timestamp = 16; + string total_difficulty = 17; // The total difficulty of the chain until this block + string transactions_root = 18; // The root hash of the transactions trie + uint64 indexed_at = 19; // When the block was indexed by crawler + repeated ArbitrumSepoliaTransaction transactions = 20; // The transactions included in this block + + string mix_hash = 21; // The timestamp of this block + string send_count = 22; // The number of sends in this block + string send_root = 23; // The root hash of the sends trie + uint64 l1_block_number = 24; // The block number of the corresponding L1 block +} + +message ArbitrumSepoliaEventLog { + string address = 1; // The address of the contract that generated the log + repeated string topics = 2; // Topics are indexed parameters during log generation + string data = 3; // The data field from the log + uint64 block_number = 4; // The block number where this log was in + string transaction_hash = 5; // The hash of the transaction that generated this log + string block_hash = 6; // The hash of the block where this log was in + bool removed = 7; // True if the log was reverted due to a chain reorganization + uint64 log_index = 8; // The index of the log in the block + uint64 transaction_index = 9; // The index of the transaction in the block +} \ No newline at end of file diff --git a/blockchain/blockchain.go.tmpl b/blockchain/blockchain.go.tmpl index a4278bb..a2a210d 100644 --- a/blockchain/blockchain.go.tmpl +++ b/blockchain/blockchain.go.tmpl @@ -353,18 +353,18 @@ func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]i } func ToProtoSingleBlock(obj *seer_common.BlockJson) *{{.BlockchainName}}Block { return &{{.BlockchainName}}Block{ - BlockNumber: obj.BlockNumber, - Difficulty: obj.Difficulty, - ExtraData: obj.ExtraData, - GasLimit: obj.GasLimit, - GasUsed: obj.GasUsed, - BaseFeePerGas: obj.BaseFeePerGas, - Hash: obj.Hash, - LogsBloom: obj.LogsBloom, - Miner: obj.Miner, - Nonce: obj.Nonce, - ParentHash: obj.ParentHash, - ReceiptRoot: obj.ReceiptRoot, + BlockNumber: obj.BlockNumber, + Difficulty: obj.Difficulty, + ExtraData: obj.ExtraData, + GasLimit: obj.GasLimit, + GasUsed: obj.GasUsed, + BaseFeePerGas: obj.BaseFeePerGas, + Hash: obj.Hash, + LogsBloom: obj.LogsBloom, + Miner: obj.Miner, + Nonce: obj.Nonce, + ParentHash: obj.ParentHash, + ReceiptsRoot: obj.ReceiptsRoot, Sha3Uncles: obj.Sha3Uncles, Size: obj.Size, StateRoot: obj.StateRoot, @@ -372,6 +372,11 @@ func ToProtoSingleBlock(obj *seer_common.BlockJson) *{{.BlockchainName}}Block { TotalDifficulty: obj.TotalDifficulty, TransactionsRoot: obj.TransactionsRoot, IndexedAt: obj.IndexedAt, + + {{if .IsSideChain -}} MixHash: obj.MixHash, {{end}} + {{if .IsSideChain -}} SendCount: obj.SendCount, {{end}} + {{if .IsSideChain -}} SendRoot: obj.SendRoot, {{end}} + {{if .IsSideChain -}} L1BlockNumber: obj.L1BlockNumber, {{end}} } } @@ -393,6 +398,13 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *{{.BlockchainNa Value: obj.Value, IndexedAt: obj.IndexedAt, BlockTimestamp: obj.BlockTimestamp, + + ChainId: obj.ChainId, + V: obj.V, + R: obj.R, + S: obj.S, + + {{if .IsSideChain -}} YParity: obj.YParity, {{end}} } } diff --git a/blockchain/common/decoding.go b/blockchain/common/decoding.go index cf22aa0..8e44d6a 100644 --- a/blockchain/common/decoding.go +++ b/blockchain/common/decoding.go @@ -24,7 +24,7 @@ type BlockJson struct { Nonce string `json:"nonce"` BlockNumber uint64 `json:"number"` ParentHash string `json:"parentHash"` - ReceiptRoot string `json:"receiptRoot"` + ReceiptsRoot string `json:"receiptsRoot"` Sha3Uncles string `json:"sha3Uncles"` StateRoot string `json:"stateRoot"` Timestamp uint64 `json:"timestamp"` diff --git a/blockchain/ethereum/ethereum.go b/blockchain/ethereum/ethereum.go index 9fbac92..f80fff2 100644 --- a/blockchain/ethereum/ethereum.go +++ b/blockchain/ethereum/ethereum.go @@ -364,7 +364,7 @@ func ToProtoSingleBlock(obj *seer_common.BlockJson) *EthereumBlock { Miner: obj.Miner, Nonce: obj.Nonce, ParentHash: obj.ParentHash, - ReceiptRoot: obj.ReceiptRoot, + ReceiptsRoot: obj.ReceiptsRoot, Sha3Uncles: obj.Sha3Uncles, Size: obj.Size, StateRoot: obj.StateRoot, @@ -393,6 +393,11 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *EthereumTransac Value: obj.Value, IndexedAt: obj.IndexedAt, BlockTimestamp: obj.BlockTimestamp, + + ChainId: obj.ChainId, + V: obj.V, + R: obj.R, + S: obj.S, } } diff --git a/blockchain/ethereum/ethereum_index_types.pb.go b/blockchain/ethereum/ethereum_index_types.pb.go index 7e07f63..b27e03e 100644 --- a/blockchain/ethereum/ethereum_index_types.pb.go +++ b/blockchain/ethereum/ethereum_index_types.pb.go @@ -26,22 +26,27 @@ type EthereumTransaction struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` - ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` - Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // using string to handle big numeric values - GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` - MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` - MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` - Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // could be a long text - Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` - TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` - TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` - Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // using string to handle big numeric values - IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // using uint64 to represent timestamp - BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // using uint64 to represent timestam - BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Added field for block hash + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // using string to handle big numeric values + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // could be a long text + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // using string to handle big numeric values + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // using uint64 to represent timestamp + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // using uint64 to represent timestam + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Added field for block hash + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` } func (x *EthereumTransaction) Reset() { @@ -188,6 +193,41 @@ func (x *EthereumTransaction) GetBlockHash() string { return "" } +func (x *EthereumTransaction) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *EthereumTransaction) GetV() string { + if x != nil { + return x.V + } + return "" +} + +func (x *EthereumTransaction) GetR() string { + if x != nil { + return x.R + } + return "" +} + +func (x *EthereumTransaction) GetS() string { + if x != nil { + return x.S + } + return "" +} + +func (x *EthereumTransaction) GetAccessList() []string { + if x != nil { + return x.AccessList + } + return nil +} + // Represents a single blockchain block type EthereumBlock struct { state protoimpl.MessageState @@ -205,7 +245,7 @@ type EthereumBlock struct { Miner string `protobuf:"bytes,9,opt,name=miner,proto3" json:"miner,omitempty"` Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` ParentHash string `protobuf:"bytes,11,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` - ReceiptRoot string `protobuf:"bytes,12,opt,name=receipt_root,json=receiptRoot,proto3" json:"receipt_root,omitempty"` + ReceiptsRoot string `protobuf:"bytes,12,opt,name=receipts_root,json=receiptsRoot,proto3" json:"receipts_root,omitempty"` Sha3Uncles string `protobuf:"bytes,13,opt,name=sha3_uncles,json=sha3Uncles,proto3" json:"sha3_uncles,omitempty"` Size uint64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"` StateRoot string `protobuf:"bytes,15,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` @@ -325,9 +365,9 @@ func (x *EthereumBlock) GetParentHash() string { return "" } -func (x *EthereumBlock) GetReceiptRoot() string { +func (x *EthereumBlock) GetReceiptsRoot() string { if x != nil { - return x.ReceiptRoot + return x.ReceiptsRoot } return "" } @@ -503,7 +543,7 @@ var File_ethereum_index_types_proto protoreflect.FileDescriptor var file_ethereum_index_types_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x04, 0x0a, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x05, 0x0a, 0x13, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, @@ -537,70 +577,75 @@ var file_ethereum_index_types_proto_rawDesc = []byte{ 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0x98, 0x05, 0x0a, - 0x0d, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, - 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, - 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, - 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, - 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, - 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, - 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, - 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, - 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, - 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x5f, 0x72, 0x6f, 0x6f, - 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, - 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, - 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, - 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, - 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, - 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, - 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa9, 0x02, 0x0a, 0x10, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, - 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, - 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x42, 0x1a, 0x5a, 0x18, 0x73, 0x65, 0x65, 0x72, 0x2e, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, + 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, + 0x73, 0x74, 0x22, 0x9a, 0x05, 0x0a, 0x0d, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, + 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, + 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, + 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, + 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, + 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, + 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, + 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, + 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, + 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, + 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, + 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, + 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0xa9, 0x02, 0x0a, 0x10, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, + 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, + 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, + 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, + 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x0b, 0x5a, 0x09, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/blockchain/ethereum/ethereum_index_types.proto b/blockchain/ethereum/ethereum_index_types.proto index f422eac..cf4a59d 100644 --- a/blockchain/ethereum/ethereum_index_types.proto +++ b/blockchain/ethereum/ethereum_index_types.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "ethereum"; +option go_package = ".ethereum"; // Represents a single transaction within a block @@ -21,6 +21,11 @@ message EthereumTransaction { uint64 indexed_at = 14; // using uint64 to represent timestamp uint64 block_timestamp = 15; // using uint64 to represent timestam string block_hash = 16; // Added field for block hash + string chain_id = 17; // Used as a field to match potential EIP-1559 transaction types + string v = 18; // Used as a field to match potential EIP-1559 transaction types + string r = 19; // Used as a field to match potential EIP-1559 transaction types + string s = 20; // Used as a field to match potential EIP-1559 transaction types + repeated string access_list = 21; } // Represents a single blockchain block @@ -36,7 +41,7 @@ message EthereumBlock { string miner = 9; string nonce = 10; string parent_hash = 11; - string receipt_root = 12; + string receipts_root = 12; string sha3_uncles = 13; uint64 size = 14; string state_root = 15; diff --git a/blockchain/handlers.go b/blockchain/handlers.go index a9487f9..33fcc6d 100644 --- a/blockchain/handlers.go +++ b/blockchain/handlers.go @@ -8,6 +8,8 @@ import ( "os" "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/moonstream-to/seer/blockchain/arbitrum_one" + "github.com/moonstream-to/seer/blockchain/arbitrum_sepolia" "github.com/moonstream-to/seer/blockchain/ethereum" "github.com/moonstream-to/seer/blockchain/polygon" "github.com/moonstream-to/seer/indexer" @@ -21,6 +23,12 @@ func wrapClient(url, chain string) (BlockchainClient, error) { } else if chain == "polygon" { client, err := polygon.NewClient(url) return client, err + } else if chain == "arbitrum_one" { + client, err := arbitrum_one.NewClient(url) + return client, err + } else if chain == "arbitrum_sepolia" { + client, err := arbitrum_sepolia.NewClient(url) + return client, err } else { return nil, errors.New("unsupported chain type") } // Ensure ethereum.Client implements BlockchainClient. diff --git a/blockchain/polygon/polygon.go b/blockchain/polygon/polygon.go index 3df51be..51d2478 100644 --- a/blockchain/polygon/polygon.go +++ b/blockchain/polygon/polygon.go @@ -364,7 +364,7 @@ func ToProtoSingleBlock(obj *seer_common.BlockJson) *PolygonBlock { Miner: obj.Miner, Nonce: obj.Nonce, ParentHash: obj.ParentHash, - ReceiptRoot: obj.ReceiptRoot, + ReceiptsRoot: obj.ReceiptsRoot, Sha3Uncles: obj.Sha3Uncles, Size: obj.Size, StateRoot: obj.StateRoot, @@ -393,6 +393,11 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *PolygonTransact Value: obj.Value, IndexedAt: obj.IndexedAt, BlockTimestamp: obj.BlockTimestamp, + + ChainId: obj.ChainId, + V: obj.V, + R: obj.R, + S: obj.S, } } diff --git a/blockchain/polygon/polygon_index_types.pb.go b/blockchain/polygon/polygon_index_types.pb.go index 853d163..b27fc6c 100644 --- a/blockchain/polygon/polygon_index_types.pb.go +++ b/blockchain/polygon/polygon_index_types.pb.go @@ -26,22 +26,27 @@ type PolygonTransaction struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` - ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` - Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // using string to handle big numeric values - GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` - MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` - MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` - Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // could be a long text - Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` - TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` - TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` - Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // using string to handle big numeric values - IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // using uint64 to represent timestamp - BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // using uint64 to represent timestam - BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Added field for block hash + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // using string to handle big numeric values + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // could be a long text + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // using string to handle big numeric values + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // using uint64 to represent timestamp + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // using uint64 to represent timestam + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Added field for block hash + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` } func (x *PolygonTransaction) Reset() { @@ -188,6 +193,41 @@ func (x *PolygonTransaction) GetBlockHash() string { return "" } +func (x *PolygonTransaction) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *PolygonTransaction) GetV() string { + if x != nil { + return x.V + } + return "" +} + +func (x *PolygonTransaction) GetR() string { + if x != nil { + return x.R + } + return "" +} + +func (x *PolygonTransaction) GetS() string { + if x != nil { + return x.S + } + return "" +} + +func (x *PolygonTransaction) GetAccessList() []string { + if x != nil { + return x.AccessList + } + return nil +} + // Represents a single blockchain block type PolygonBlock struct { state protoimpl.MessageState @@ -205,7 +245,7 @@ type PolygonBlock struct { Miner string `protobuf:"bytes,9,opt,name=miner,proto3" json:"miner,omitempty"` Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` ParentHash string `protobuf:"bytes,11,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` - ReceiptRoot string `protobuf:"bytes,12,opt,name=receipt_root,json=receiptRoot,proto3" json:"receipt_root,omitempty"` + ReceiptsRoot string `protobuf:"bytes,12,opt,name=receipts_root,json=receiptsRoot,proto3" json:"receipts_root,omitempty"` Sha3Uncles string `protobuf:"bytes,13,opt,name=sha3_uncles,json=sha3Uncles,proto3" json:"sha3_uncles,omitempty"` Size uint64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"` StateRoot string `protobuf:"bytes,15,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` @@ -325,9 +365,9 @@ func (x *PolygonBlock) GetParentHash() string { return "" } -func (x *PolygonBlock) GetReceiptRoot() string { +func (x *PolygonBlock) GetReceiptsRoot() string { if x != nil { - return x.ReceiptRoot + return x.ReceiptsRoot } return "" } @@ -503,7 +543,7 @@ var File_polygon_index_types_proto protoreflect.FileDescriptor var file_polygon_index_types_proto_rawDesc = []byte{ 0x0a, 0x19, 0x70, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x04, 0x0a, 0x12, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x05, 0x0a, 0x12, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, @@ -537,68 +577,75 @@ var file_polygon_index_types_proto_rawDesc = []byte{ 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0x96, 0x05, 0x0a, 0x0c, 0x50, - 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, - 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, - 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, - 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, - 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, - 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, - 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, - 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, - 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x21, - 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x6f, 0x6f, - 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, - 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, - 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, - 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, - 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, - 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x22, 0xa8, 0x02, 0x0a, 0x0f, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, - 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x04, - 0x5a, 0x02, 0x2e, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, + 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, + 0x22, 0x98, 0x05, 0x0a, 0x0c, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, + 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, + 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, + 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, + 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, + 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, + 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, + 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, + 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, + 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, + 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa8, 0x02, 0x0a, 0x0f, + 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, + 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, + 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x70, 0x6f, 0x6c, 0x79, 0x67, + 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/blockchain/polygon/polygon_index_types.proto b/blockchain/polygon/polygon_index_types.proto index f12494e..36f0ac0 100644 --- a/blockchain/polygon/polygon_index_types.proto +++ b/blockchain/polygon/polygon_index_types.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "polygon"; +option go_package = ".polygon"; // Represents a single transaction within a block @@ -21,6 +21,11 @@ message PolygonTransaction { uint64 indexed_at = 14; // using uint64 to represent timestamp uint64 block_timestamp = 15; // using uint64 to represent timestam string block_hash = 16; // Added field for block hash + string chain_id = 17; // Used as a field to match potential EIP-1559 transaction types + string v = 18; // Used as a field to match potential EIP-1559 transaction types + string r = 19; // Used as a field to match potential EIP-1559 transaction types + string s = 20; // Used as a field to match potential EIP-1559 transaction types + repeated string access_list = 21; } // Represents a single blockchain block @@ -36,7 +41,7 @@ message PolygonBlock { string miner = 9; string nonce = 10; string parent_hash = 11; - string receipt_root = 12; + string receipts_root = 12; string sha3_uncles = 13; uint64 size = 14; string state_root = 15; diff --git a/cmd.go b/cmd.go index 30fdd9e..3111c67 100644 --- a/cmd.go +++ b/cmd.go @@ -134,10 +134,12 @@ func CreateBlockchainCommand() *cobra.Command { type BlockchainTemplateData struct { BlockchainName string BlockchainNameLower string + IsSideChain bool } func CreateBlockchainGenerateCommand() *cobra.Command { var blockchainNameLower string + var sideChain bool blockchainGenerateCmd := &cobra.Command{ Use: "generate", @@ -173,7 +175,11 @@ func CreateBlockchainGenerateCommand() *cobra.Command { defer outputFile.Close() // Execute template and write to output file - data := BlockchainTemplateData{BlockchainName: blockchainName, BlockchainNameLower: blockchainNameLower} + data := BlockchainTemplateData{ + BlockchainName: blockchainName, + BlockchainNameLower: blockchainNameLower, + IsSideChain: sideChain, + } execErr := tmpl.Execute(outputFile, data) if execErr != nil { return execErr @@ -186,6 +192,7 @@ func CreateBlockchainGenerateCommand() *cobra.Command { } blockchainGenerateCmd.Flags().StringVarP(&blockchainNameLower, "name", "n", "", "The name of the blockchain to generate lowercase (example: 'arbitrum_one')") + blockchainGenerateCmd.Flags().BoolVar(&sideChain, "side-chain", false, "Set this flag to extend Blocks and Transactions with additional fields for side chains (default: false)") return blockchainGenerateCmd } diff --git a/crawler/README.md b/crawler/README.md index e908fa3..c059bb0 100644 --- a/crawler/README.md +++ b/crawler/README.md @@ -43,11 +43,25 @@ Will generate the following files: ## Regenerate proto interface -Proto compiler docs: https://protobuf.dev/reference/go/go-generated/ +1. Go to chain directory, for example: + +```bash +cd blockchain/ethereum +``` + +2. Generate code with proto compiler, docs: https://protobuf.dev/reference/go/go-generated/ ```bash protoc --go_out=. --go_opt=paths=source_relative \ - blocks_transactions_.proto + ethereum_index_types.proto +``` + +3. Rename generated file similar to chain package. +4. Generate interface with seer, if chain is L2, specify flag `--side-chain`: + +```bash +cd ../.. +./seer blockchain generate -n ethereum ``` ## Run crawler From 207a0750506d721121c03eb5c5eba116e7c19f3a Mon Sep 17 00:00:00 2001 From: kompotkot Date: Mon, 3 Jun 2024 13:23:42 +0000 Subject: [PATCH 04/13] Game7, mantle and xai chains --- blockchain/arbitrum_one/arbitrum_one.go | 3 +- .../arbitrum_one_index_types.proto | 2 +- .../arbitrum_sepolia/arbitrum_sepolia.go | 3 +- .../arbitrum_sepolia_index_types.proto | 2 +- blockchain/blockchain.go.tmpl | 3 +- blockchain/common/decoding.go | 46 +- blockchain/ethereum/ethereum.go | 3 + .../ethereum/ethereum_index_types.pb.go | 136 +-- .../ethereum/ethereum_index_types.proto | 2 + .../game7_orbit_arbitrum_sepolia.go | 605 +++++++++++++ ...7_orbit_arbitrum_sepolia_index_types.pb.go | 796 ++++++++++++++++++ ...7_orbit_arbitrum_sepolia_index_types.proto | 72 ++ blockchain/mantle/mantle.go | 600 +++++++++++++ blockchain/mantle/mantle_index_types.pb.go | 748 ++++++++++++++++ blockchain/mantle/mantle_index_types.proto | 67 ++ blockchain/mantle_sepolia/mantle_sepolia.go | 600 +++++++++++++ .../mantle_sepolia_index_types.pb.go | 751 +++++++++++++++++ .../mantle_sepolia_index_types.proto | 67 ++ blockchain/polygon/polygon.go | 3 + blockchain/polygon/polygon_index_types.pb.go | 136 +-- blockchain/polygon/polygon_index_types.proto | 2 + blockchain/xai/xai.go | 605 +++++++++++++ blockchain/xai/xai_index_types.pb.go | 787 +++++++++++++++++ blockchain/xai/xai_index_types.proto | 72 ++ blockchain/xai_sepolia/xai_sepolia.go | 605 +++++++++++++ .../xai_sepolia/xai_sepolia_index_types.pb.go | 790 +++++++++++++++++ .../xai_sepolia/xai_sepolia_index_types.proto | 72 ++ crawler/settings.go | 39 +- sample.env | 7 + storage/settings.go | 11 +- 30 files changed, 7477 insertions(+), 158 deletions(-) create mode 100644 blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia.go create mode 100644 blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.pb.go create mode 100644 blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.proto create mode 100644 blockchain/mantle/mantle.go create mode 100644 blockchain/mantle/mantle_index_types.pb.go create mode 100644 blockchain/mantle/mantle_index_types.proto create mode 100644 blockchain/mantle_sepolia/mantle_sepolia.go create mode 100644 blockchain/mantle_sepolia/mantle_sepolia_index_types.pb.go create mode 100644 blockchain/mantle_sepolia/mantle_sepolia_index_types.proto create mode 100644 blockchain/xai/xai.go create mode 100644 blockchain/xai/xai_index_types.pb.go create mode 100644 blockchain/xai/xai_index_types.proto create mode 100644 blockchain/xai_sepolia/xai_sepolia.go create mode 100644 blockchain/xai_sepolia/xai_sepolia_index_types.pb.go create mode 100644 blockchain/xai_sepolia/xai_sepolia_index_types.proto diff --git a/blockchain/arbitrum_one/arbitrum_one.go b/blockchain/arbitrum_one/arbitrum_one.go index edbaa9d..9b33819 100644 --- a/blockchain/arbitrum_one/arbitrum_one.go +++ b/blockchain/arbitrum_one/arbitrum_one.go @@ -404,7 +404,8 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *ArbitrumOneTran R: obj.R, S: obj.S, - YParity: obj.YParity, + AccessList: obj.AccessList, + YParity: obj.YParity, } } diff --git a/blockchain/arbitrum_one/arbitrum_one_index_types.proto b/blockchain/arbitrum_one/arbitrum_one_index_types.proto index 1138358..cf7efe6 100644 --- a/blockchain/arbitrum_one/arbitrum_one_index_types.proto +++ b/blockchain/arbitrum_one/arbitrum_one_index_types.proto @@ -25,8 +25,8 @@ message ArbitrumOneTransaction { string v = 18; // Used as a field to match potential EIP-1559 transaction types string r = 19; // Used as a field to match potential EIP-1559 transaction types string s = 20; // Used as a field to match potential EIP-1559 transaction types - repeated string access_list = 21; + repeated string access_list = 21; string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types } diff --git a/blockchain/arbitrum_sepolia/arbitrum_sepolia.go b/blockchain/arbitrum_sepolia/arbitrum_sepolia.go index fe690b8..a1eac8b 100644 --- a/blockchain/arbitrum_sepolia/arbitrum_sepolia.go +++ b/blockchain/arbitrum_sepolia/arbitrum_sepolia.go @@ -404,7 +404,8 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *ArbitrumSepolia R: obj.R, S: obj.S, - YParity: obj.YParity, + AccessList: obj.AccessList, + YParity: obj.YParity, } } diff --git a/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.proto b/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.proto index 934e13a..62ae5ae 100644 --- a/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.proto +++ b/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.proto @@ -25,8 +25,8 @@ message ArbitrumSepoliaTransaction { string v = 18; // Used as a field to match potential EIP-1559 transaction types string r = 19; // Used as a field to match potential EIP-1559 transaction types string s = 20; // Used as a field to match potential EIP-1559 transaction types - repeated string access_list = 21; + repeated string access_list = 21; string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types } diff --git a/blockchain/blockchain.go.tmpl b/blockchain/blockchain.go.tmpl index a2a210d..5a724ec 100644 --- a/blockchain/blockchain.go.tmpl +++ b/blockchain/blockchain.go.tmpl @@ -404,7 +404,8 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *{{.BlockchainNa R: obj.R, S: obj.S, - {{if .IsSideChain -}} YParity: obj.YParity, {{end}} + AccessList: obj.AccessList, + YParity: obj.YParity, } } diff --git a/blockchain/common/decoding.go b/blockchain/common/decoding.go index 8e44d6a..cbb0ff9 100644 --- a/blockchain/common/decoding.go +++ b/blockchain/common/decoding.go @@ -43,29 +43,29 @@ type BlockJson struct { } type TransactionJson struct { - AccessList []AccessList `json:"accessList"` - BlockHash string `json:"blockHash"` - BlockNumber uint64 `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 uint64 `json:"transactionIndex"` - TransactionType uint64 `json:"type"` - Value string `json:"value"` - IndexedAt uint64 `json:"indexed_at"` - BlockTimestamp uint64 `json:"block_timestamp"` - - YParity string `json:"yParity,omitempty"` + BlockHash string `json:"blockHash"` + BlockNumber uint64 `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 uint64 `json:"transactionIndex"` + TransactionType uint64 `json:"type"` + Value string `json:"value"` + IndexedAt uint64 `json:"indexed_at"` + BlockTimestamp uint64 `json:"block_timestamp"` + + AccessList []string `json:"accessList,omitempty"` // TODO(kompotkot): Use AccessList struct + YParity string `json:"yParity,omitempty"` } type AccessList struct { diff --git a/blockchain/ethereum/ethereum.go b/blockchain/ethereum/ethereum.go index f80fff2..9dfe7da 100644 --- a/blockchain/ethereum/ethereum.go +++ b/blockchain/ethereum/ethereum.go @@ -398,6 +398,9 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *EthereumTransac V: obj.V, R: obj.R, S: obj.S, + + AccessList: obj.AccessList, + YParity: obj.YParity, } } diff --git a/blockchain/ethereum/ethereum_index_types.pb.go b/blockchain/ethereum/ethereum_index_types.pb.go index b27e03e..4c57aee 100644 --- a/blockchain/ethereum/ethereum_index_types.pb.go +++ b/blockchain/ethereum/ethereum_index_types.pb.go @@ -47,6 +47,7 @@ type EthereumTransaction struct { R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types } func (x *EthereumTransaction) Reset() { @@ -228,6 +229,13 @@ func (x *EthereumTransaction) GetAccessList() []string { return nil } +func (x *EthereumTransaction) GetYParity() string { + if x != nil { + return x.YParity + } + return "" +} + // Represents a single blockchain block type EthereumBlock struct { state protoimpl.MessageState @@ -543,7 +551,7 @@ var File_ethereum_index_types_proto protoreflect.FileDescriptor var file_ethereum_index_types_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x05, 0x0a, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9e, 0x05, 0x0a, 0x13, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, @@ -584,68 +592,70 @@ var file_ethereum_index_types_proto_rawDesc = []byte{ 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, - 0x73, 0x74, 0x22, 0x9a, 0x05, 0x0a, 0x0d, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, - 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, - 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, - 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, - 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, - 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, - 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, - 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, - 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, - 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, - 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, - 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, - 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, - 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, - 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, - 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, - 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x45, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0xa9, 0x02, 0x0a, 0x10, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, - 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, - 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, - 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x0b, 0x5a, 0x09, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0x9a, 0x05, + 0x0a, 0x0d, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, + 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, + 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, + 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, + 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, + 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, + 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, + 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, + 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, + 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa9, 0x02, 0x0a, 0x10, 0x45, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, + 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, + 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/blockchain/ethereum/ethereum_index_types.proto b/blockchain/ethereum/ethereum_index_types.proto index cf4a59d..8ba62df 100644 --- a/blockchain/ethereum/ethereum_index_types.proto +++ b/blockchain/ethereum/ethereum_index_types.proto @@ -25,7 +25,9 @@ message EthereumTransaction { string v = 18; // Used as a field to match potential EIP-1559 transaction types string r = 19; // Used as a field to match potential EIP-1559 transaction types string s = 20; // Used as a field to match potential EIP-1559 transaction types + repeated string access_list = 21; + string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types } // Represents a single blockchain block diff --git a/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia.go b/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia.go new file mode 100644 index 0000000..4d3d210 --- /dev/null +++ b/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia.go @@ -0,0 +1,605 @@ +package game7_orbit_arbitrum_sepolia + +import ( + "context" + "encoding/base64" + "encoding/hex" + "encoding/json" + "fmt" + "math/big" + "strings" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rpc" + seer_common "github.com/moonstream-to/seer/blockchain/common" + "github.com/moonstream-to/seer/indexer" + "google.golang.org/protobuf/proto" +) + +func NewClient(url string) (*Client, error) { + rpcClient, err := rpc.DialContext(context.Background(), url) + if err != nil { + return nil, err + } + return &Client{rpcClient: rpcClient}, nil +} + +// Client is a wrapper around the Ethereum JSON-RPC client. + +type Client struct { + rpcClient *rpc.Client +} + +// Client common + +// ChainType returns the chain type. +func (c *Client) ChainType() string { + return "game7_orbit_arbitrum_sepolia" +} + +// Close closes the underlying RPC client. +func (c *Client) Close() { + c.rpcClient.Close() +} + +// GetLatestBlockNumber returns the latest block number. +func (c *Client) GetLatestBlockNumber() (*big.Int, error) { + var result string + if err := c.rpcClient.CallContext(context.Background(), &result, "eth_blockNumber"); err != nil { + return nil, err + } + + // Convert the hex string to a big.Int + blockNumber, ok := new(big.Int).SetString(result, 0) // The 0 base lets the function infer the base from the string prefix. + if !ok { + return nil, fmt.Errorf("invalid block number format: %s", result) + } + + return blockNumber, nil +} + +// BlockByNumber returns the block with the given number. +func (c *Client) GetBlockByNumber(ctx context.Context, number *big.Int) (*seer_common.BlockJson, error) { + + var rawResponse json.RawMessage // Use RawMessage to capture the entire JSON response + err := c.rpcClient.CallContext(ctx, &rawResponse, "eth_getBlockByNumber", "0x"+number.Text(16), true) + if err != nil { + fmt.Println("Error calling eth_getBlockByNumber: ", err) + return nil, err + } + + var response_json map[string]interface{} + + err = json.Unmarshal(rawResponse, &response_json) + + delete(response_json, "transactions") + + var block *seer_common.BlockJson + err = c.rpcClient.CallContext(ctx, &block, "eth_getBlockByNumber", "0x"+number.Text(16), true) // true to include transactions + return block, err +} + +// BlockByHash returns the block with the given hash. +func (c *Client) BlockByHash(ctx context.Context, hash common.Hash) (*seer_common.BlockJson, error) { + var block *seer_common.BlockJson + err := c.rpcClient.CallContext(ctx, &block, "eth_getBlockByHash", hash, true) // true to include transactions + return block, err +} + +// TransactionReceipt returns the receipt of a transaction by transaction hash. +func (c *Client) TransactionReceipt(ctx context.Context, hash common.Hash) (*types.Receipt, error) { + var receipt *types.Receipt + err := c.rpcClient.CallContext(ctx, &receipt, "eth_getTransactionReceipt", hash) + return receipt, err +} + +func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]*seer_common.EventJson, error) { + var logs []*seer_common.EventJson + fromBlock := q.FromBlock + toBlock := q.ToBlock + batchStep := new(big.Int).Sub(toBlock, fromBlock) // Calculate initial batch step + + for { + // Calculate the next "lastBlock" within the batch step or adjust to "toBlock" if exceeding + nextBlock := new(big.Int).Add(fromBlock, batchStep) + if nextBlock.Cmp(toBlock) > 0 { + nextBlock = new(big.Int).Set(toBlock) + } + + var result []*seer_common.EventJson + err := c.rpcClient.CallContext(ctx, &result, "eth_getLogs", struct { + FromBlock string `json:"fromBlock"` + ToBlock string `json:"toBlock"` + Addresses []common.Address `json:"addresses"` + Topics [][]common.Hash `json:"topics"` + }{ + FromBlock: toHex(fromBlock), + ToBlock: toHex(nextBlock), + Addresses: q.Addresses, + Topics: q.Topics, + }) + + if err != nil { + if strings.Contains(err.Error(), "query returned more than 10000 results") { + // Halve the batch step if too many results and retry + batchStep.Div(batchStep, big.NewInt(2)) + if batchStep.Cmp(big.NewInt(1)) < 0 { + // If the batch step is too small we will skip that block + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + if fromBlock.Cmp(toBlock) > 0 { + break + } + continue + } + continue + } else { + // For any other error, return immediately + return nil, err + } + } + + // Append the results and adjust "fromBlock" for the next batch + logs = append(logs, result...) + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + + // Break the loop if we've reached or exceeded "toBlock" + if fromBlock.Cmp(toBlock) > 0 { + break + } + } + + return logs, nil +} + +// fetchBlocks returns the blocks for a given range. +func (c *Client) fetchBlocks(ctx context.Context, from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + + for i := from; i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + return blocks, nil +} + +// Utility function to convert big.Int to its hexadecimal representation. +func toHex(number *big.Int) string { + return fmt.Sprintf("0x%x", number) +} + +func fromHex(hex string) *big.Int { + number := new(big.Int) + number.SetString(hex, 0) + return number +} + +// FetchBlocksInRange fetches blocks within a specified range. +// This could be useful for batch processing or analysis. +func (c *Client) FetchBlocksInRange(from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + ctx := context.Background() // For simplicity, using a background context; consider timeouts for production. + + for i := new(big.Int).Set(from); i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + fmt.Println("Block number: ", i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + + return blocks, nil +} + +// ParseBlocksAndTransactions parses blocks and their transactions into custom data structures. +// This method showcases how to handle and transform detailed block and transaction data. +func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*Game7OrbitArbitrumSepoliaBlock, []*Game7OrbitArbitrumSepoliaTransaction, error) { + blocksJson, err := c.FetchBlocksInRange(from, to) + if err != nil { + return nil, nil, err + } + + var parsedBlocks []*Game7OrbitArbitrumSepoliaBlock + var parsedTransactions []*Game7OrbitArbitrumSepoliaTransaction + for _, blockJson := range blocksJson { + // Convert BlockJson to Block and Transactions as required. + parsedBlock := ToProtoSingleBlock(blockJson) + + // Example: Parsing transactions within the block + for _, txJson := range blockJson.Transactions { + + txJson.BlockTimestamp = blockJson.Timestamp + + parsedTransaction := ToProtoSingleTransaction(&txJson) + parsedTransactions = append(parsedTransactions, parsedTransaction) + } + + parsedBlocks = append(parsedBlocks, parsedBlock) + } + + return parsedBlocks, parsedTransactions, nil +} + +func (c *Client) ParseEvents(from, to *big.Int, blocksCache map[uint64]indexer.BlockCache) ([]*Game7OrbitArbitrumSepoliaEventLog, error) { + + logs, err := c.ClientFilterLogs(context.Background(), ethereum.FilterQuery{ + FromBlock: from, + ToBlock: to, + }) + + if err != nil { + fmt.Println("Error fetching logs: ", err) + return nil, err + } + + var parsedEvents []*Game7OrbitArbitrumSepoliaEventLog + for _, log := range logs { + parsedEvent := ToProtoSingleEventLog(log) + parsedEvents = append(parsedEvents, parsedEvent) + } + + return parsedEvents, nil +} + +func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCache, error) { + parsedBlocks, parsedTransactions, err := c.ParseBlocksAndTransactions(from, to) + + if err != nil { + return nil, nil, nil, nil, nil, err + } + + blocksCache := make(map[uint64]indexer.BlockCache) + + var blocksProto []proto.Message + var blockIndex []indexer.BlockIndex + for index, block := range parsedBlocks { + blocksProto = append(blocksProto, block) // Assuming block is already a proto.Message + blocksCache[block.BlockNumber] = indexer.BlockCache{ + BlockNumber: block.BlockNumber, + BlockHash: block.Hash, + BlockTimestamp: block.Timestamp, + } // Assuming block.BlockNumber is int64 and block.Hash is string + blockIndex = append(blockIndex, indexer.NewBlockIndex("game7_orbit_arbitrum_sepolia", + block.BlockNumber, + block.Hash, + block.Timestamp, + block.ParentHash, + uint64(index), + "", + )) + } + + var transactionsProto []proto.Message + var transactionIndex []indexer.TransactionIndex + for index, transaction := range parsedTransactions { + transactionsProto = append(transactionsProto, transaction) // Assuming transaction is also a proto.Message + + selector := "0x" + + if len(transaction.Input) > 10 { + selector = transaction.Input[:10] + } + + transactionIndex = append(transactionIndex, indexer.TransactionIndex{ + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + BlockTimestamp: transaction.BlockTimestamp, + FromAddress: transaction.FromAddress, + ToAddress: transaction.ToAddress, + RowID: uint64(index), + Selector: selector, // First 10 characters of the input data 0x + 4 bytes of the function signature + TransactionHash: transaction.Hash, + TransactionIndex: transaction.TransactionIndex, + Type: transaction.TransactionType, + Path: "", + }) + } + + return blocksProto, transactionsProto, blockIndex, transactionIndex, blocksCache, nil +} + +func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]indexer.BlockCache) ([]proto.Message, []indexer.LogIndex, error) { + + parsedEvents, err := c.ParseEvents(from, to, blocksCahche) + + if err != nil { + return nil, nil, err + } + + var eventsProto []proto.Message + var eventsIndex []indexer.LogIndex + for index, event := range parsedEvents { + eventsProto = append(eventsProto, event) // Assuming event is already a proto.Message + + var topic0, topic1, topic2 *string + + if len(event.Topics) == 0 { + fmt.Println("No topics found for event: ", event) + } else { + topic0 = &event.Topics[0] // First topic + } + + // Assign topics based on availability + if len(event.Topics) > 1 { + topic1 = &event.Topics[1] // Second topic, if present + } + if len(event.Topics) > 2 { + topic2 = &event.Topics[2] // Third topic, if present + } + + eventsIndex = append(eventsIndex, indexer.LogIndex{ + Address: event.Address, + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + BlockTimestamp: blocksCahche[event.BlockNumber].BlockTimestamp, + TransactionHash: event.TransactionHash, + Selector: topic0, // First topic + Topic1: topic1, + Topic2: topic2, + RowID: uint64(index), + LogIndex: event.LogIndex, + Path: "", + }) + } + + return eventsProto, eventsIndex, nil + +} +func ToProtoSingleBlock(obj *seer_common.BlockJson) *Game7OrbitArbitrumSepoliaBlock { + return &Game7OrbitArbitrumSepoliaBlock{ + BlockNumber: obj.BlockNumber, + Difficulty: obj.Difficulty, + ExtraData: obj.ExtraData, + GasLimit: obj.GasLimit, + GasUsed: obj.GasUsed, + BaseFeePerGas: obj.BaseFeePerGas, + Hash: obj.Hash, + LogsBloom: obj.LogsBloom, + Miner: obj.Miner, + Nonce: obj.Nonce, + ParentHash: obj.ParentHash, + ReceiptsRoot: obj.ReceiptsRoot, + Sha3Uncles: obj.Sha3Uncles, + Size: obj.Size, + StateRoot: obj.StateRoot, + Timestamp: obj.Timestamp, + TotalDifficulty: obj.TotalDifficulty, + TransactionsRoot: obj.TransactionsRoot, + IndexedAt: obj.IndexedAt, + + MixHash: obj.MixHash, + SendCount: obj.SendCount, + SendRoot: obj.SendRoot, + L1BlockNumber: obj.L1BlockNumber, + } +} + +func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *Game7OrbitArbitrumSepoliaTransaction { + return &Game7OrbitArbitrumSepoliaTransaction{ + Hash: obj.Hash, + BlockNumber: obj.BlockNumber, + BlockHash: obj.BlockHash, + FromAddress: obj.FromAddress, + ToAddress: obj.ToAddress, + Gas: obj.Gas, + GasPrice: obj.GasPrice, + MaxFeePerGas: obj.MaxFeePerGas, + MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, + Input: obj.Input, + Nonce: obj.Nonce, + TransactionIndex: obj.TransactionIndex, + TransactionType: obj.TransactionType, + Value: obj.Value, + IndexedAt: obj.IndexedAt, + BlockTimestamp: obj.BlockTimestamp, + + ChainId: obj.ChainId, + V: obj.V, + R: obj.R, + S: obj.S, + + AccessList: obj.AccessList, + YParity: obj.YParity, + } +} + +func ToProtoSingleEventLog(obj *seer_common.EventJson) *Game7OrbitArbitrumSepoliaEventLog { + + return &Game7OrbitArbitrumSepoliaEventLog{ + Address: obj.Address, + Topics: obj.Topics, + Data: obj.Data, + BlockNumber: obj.BlockNumber, + TransactionHash: obj.TransactionHash, + LogIndex: obj.LogIndex, + BlockHash: obj.BlockHash, + Removed: obj.Removed, + } +} + +func (c *Client) DecodeProtoEventLogs(data []string) ([]*Game7OrbitArbitrumSepoliaEventLog, error) { + var events []*Game7OrbitArbitrumSepoliaEventLog + for _, d := range data { + var event Game7OrbitArbitrumSepoliaEventLog + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &event); err != nil { + return nil, err + } + events = append(events, &event) + } + return events, nil +} + +func (c *Client) DecodeProtoTransactions(data []string) ([]*Game7OrbitArbitrumSepoliaTransaction, error) { + var transactions []*Game7OrbitArbitrumSepoliaTransaction + for _, d := range data { + var transaction Game7OrbitArbitrumSepoliaTransaction + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &transaction); err != nil { + return nil, err + } + transactions = append(transactions, &transaction) + } + return transactions, nil +} + +func (c *Client) DecodeProtoBlocks(data []string) ([]*Game7OrbitArbitrumSepoliaBlock, error) { + var blocks []*Game7OrbitArbitrumSepoliaBlock + for _, d := range data { + var block Game7OrbitArbitrumSepoliaBlock + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &block); err != nil { + return nil, err + } + blocks = append(blocks, &block) + } + return blocks, nil +} + +func (c *Client) DecodeProtoEventsToLabels(events []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.EventLabel, error) { + + decodedEvents, err := c.DecodeProtoEventLogs(events) + + if err != nil { + return nil, err + } + + var labels []indexer.EventLabel + + for _, event := range decodedEvents { + + var topicSelector string + + if len(event.Topics) > 0 { + topicSelector = event.Topics[0][:10] + } else { + continue + } + + checksumAddress := common.HexToAddress(event.Address).Hex() + + // Get the ABI string + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][topicSelector]["abi"])) + if err != nil { + fmt.Println("Error initializing contract ABI: ", err) + return nil, err + } + + // Decode the event data + decodedArgs, err := seer_common.DecodeLogArgsToLabelData(&contractAbi, event.Topics, event.Data) + + if err != nil { + fmt.Println("Error decoding event data: ", err) + return nil, err + } + + // Convert decodedArgs map to JSON + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert event to label + eventLabel := indexer.EventLabel{ + Label: indexer.SeerCrawlerLabel, + LabelName: abiMap[checksumAddress][topicSelector]["abi_name"], + LabelType: "event", + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + Address: event.Address, + TransactionHash: event.TransactionHash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[event.BlockNumber], + LogIndex: event.LogIndex, + } + + labels = append(labels, eventLabel) + + } + + return labels, nil +} + +func (c *Client) DecodeProtoTransactionsToLabels(transactions []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.TransactionLabel, error) { + + decodedTransactions, err := c.DecodeProtoTransactions(transactions) + + if err != nil { + return nil, err + } + + var labels []indexer.TransactionLabel + + for _, transaction := range decodedTransactions { + + selector := transaction.Input[:10] + + // To checksum address + checksumAddress := common.HexToAddress(transaction.ToAddress).Hex() + + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][selector]["abi"])) + + if err != nil { + return nil, err + } + + inputData, err := hex.DecodeString(transaction.Input[2:]) + if err != nil { + fmt.Println("Error decoding input data: ", err) + return nil, err + } + + decodedArgs, err := seer_common.DecodeTransactionInputDataToInterface(&contractAbi, inputData) + + if err != nil { + fmt.Println("Error decoding transaction input data: ", err) + return nil, err + } + + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert transaction to label + transactionLabel := indexer.TransactionLabel{ + Address: transaction.ToAddress, + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + CallerAddress: transaction.FromAddress, + LabelName: abiMap[checksumAddress][selector]["abi_name"], + LabelType: "tx_call", + OriginAddress: transaction.FromAddress, + Label: indexer.SeerCrawlerLabel, + TransactionHash: transaction.Hash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[transaction.BlockNumber], + } + + labels = append(labels, transactionLabel) + + } + + return labels, nil +} diff --git a/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.pb.go b/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.pb.go new file mode 100644 index 0000000..c65621d --- /dev/null +++ b/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.pb.go @@ -0,0 +1,796 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.1 +// protoc v3.6.1 +// source: game7_orbit_arbitrum_sepolia_index_types.proto + +package game7_orbit_arbitrum_sepolia + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents a single transaction within a block +type Game7OrbitArbitrumSepoliaTransaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) Reset() { + *x = Game7OrbitArbitrumSepoliaTransaction{} + if protoimpl.UnsafeEnabled { + mi := &file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Game7OrbitArbitrumSepoliaTransaction) ProtoMessage() {} + +func (x *Game7OrbitArbitrumSepoliaTransaction) ProtoReflect() protoreflect.Message { + mi := &file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Game7OrbitArbitrumSepoliaTransaction.ProtoReflect.Descriptor instead. +func (*Game7OrbitArbitrumSepoliaTransaction) Descriptor() ([]byte, []int) { + return file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetGas() string { + if x != nil { + return x.Gas + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetGasPrice() string { + if x != nil { + return x.GasPrice + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetMaxFeePerGas() string { + if x != nil { + return x.MaxFeePerGas + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetMaxPriorityFeePerGas() string { + if x != nil { + return x.MaxPriorityFeePerGas + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetInput() string { + if x != nil { + return x.Input + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetTransactionIndex() uint64 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetTransactionType() uint64 { + if x != nil { + return x.TransactionType + } + return 0 +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetIndexedAt() uint64 { + if x != nil { + return x.IndexedAt + } + return 0 +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetBlockTimestamp() uint64 { + if x != nil { + return x.BlockTimestamp + } + return 0 +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetV() string { + if x != nil { + return x.V + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetR() string { + if x != nil { + return x.R + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetS() string { + if x != nil { + return x.S + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetAccessList() []string { + if x != nil { + return x.AccessList + } + return nil +} + +func (x *Game7OrbitArbitrumSepoliaTransaction) GetYParity() string { + if x != nil { + return x.YParity + } + return "" +} + +// Represents a block in the blockchain +type Game7OrbitArbitrumSepoliaBlock struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number + Difficulty uint64 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty,omitempty"` // The difficulty of this block + ExtraData string `protobuf:"bytes,3,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"` // Extra data included in the block + GasLimit uint64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // The gas limit for this block + GasUsed uint64 `protobuf:"varint,5,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` // The total gas used by all transactions in this block + BaseFeePerGas string `protobuf:"bytes,6,opt,name=base_fee_per_gas,json=baseFeePerGas,proto3" json:"base_fee_per_gas,omitempty"` // The base fee per gas for this block + Hash string `protobuf:"bytes,7,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of this block + LogsBloom string `protobuf:"bytes,8,opt,name=logs_bloom,json=logsBloom,proto3" json:"logs_bloom,omitempty"` // The logs bloom filter for this block + Miner string `protobuf:"bytes,9,opt,name=miner,proto3" json:"miner,omitempty"` // The address of the miner who mined this block + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of this block + ParentHash string `protobuf:"bytes,11,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` // The hash of the parent block + ReceiptsRoot string `protobuf:"bytes,12,opt,name=receipts_root,json=receiptsRoot,proto3" json:"receipts_root,omitempty"` // The root hash of the receipts trie + Sha3Uncles string `protobuf:"bytes,13,opt,name=sha3_uncles,json=sha3Uncles,proto3" json:"sha3_uncles,omitempty"` // The SHA3 hash of the uncles data in this block + Size uint64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"` // The size of this block + StateRoot string `protobuf:"bytes,15,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` // The root hash of the state trie + Timestamp uint64 `protobuf:"varint,16,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + TotalDifficulty string `protobuf:"bytes,17,opt,name=total_difficulty,json=totalDifficulty,proto3" json:"total_difficulty,omitempty"` // The total difficulty of the chain until this block + TransactionsRoot string `protobuf:"bytes,18,opt,name=transactions_root,json=transactionsRoot,proto3" json:"transactions_root,omitempty"` // The root hash of the transactions trie + IndexedAt uint64 `protobuf:"varint,19,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the block was indexed by crawler + Transactions []*Game7OrbitArbitrumSepoliaTransaction `protobuf:"bytes,20,rep,name=transactions,proto3" json:"transactions,omitempty"` // The transactions included in this block + MixHash string `protobuf:"bytes,21,opt,name=mix_hash,json=mixHash,proto3" json:"mix_hash,omitempty"` // The timestamp of this block + SendCount string `protobuf:"bytes,22,opt,name=send_count,json=sendCount,proto3" json:"send_count,omitempty"` // The number of sends in this block + SendRoot string `protobuf:"bytes,23,opt,name=send_root,json=sendRoot,proto3" json:"send_root,omitempty"` // The root hash of the sends trie + L1BlockNumber uint64 `protobuf:"varint,24,opt,name=l1_block_number,json=l1BlockNumber,proto3" json:"l1_block_number,omitempty"` // The block number of the corresponding L1 block +} + +func (x *Game7OrbitArbitrumSepoliaBlock) Reset() { + *x = Game7OrbitArbitrumSepoliaBlock{} + if protoimpl.UnsafeEnabled { + mi := &file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Game7OrbitArbitrumSepoliaBlock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Game7OrbitArbitrumSepoliaBlock) ProtoMessage() {} + +func (x *Game7OrbitArbitrumSepoliaBlock) ProtoReflect() protoreflect.Message { + mi := &file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Game7OrbitArbitrumSepoliaBlock.ProtoReflect.Descriptor instead. +func (*Game7OrbitArbitrumSepoliaBlock) Descriptor() ([]byte, []int) { + return file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{1} +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetDifficulty() uint64 { + if x != nil { + return x.Difficulty + } + return 0 +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetExtraData() string { + if x != nil { + return x.ExtraData + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetGasUsed() uint64 { + if x != nil { + return x.GasUsed + } + return 0 +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetBaseFeePerGas() string { + if x != nil { + return x.BaseFeePerGas + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetLogsBloom() string { + if x != nil { + return x.LogsBloom + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetMiner() string { + if x != nil { + return x.Miner + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetParentHash() string { + if x != nil { + return x.ParentHash + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetReceiptsRoot() string { + if x != nil { + return x.ReceiptsRoot + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetSha3Uncles() string { + if x != nil { + return x.Sha3Uncles + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetSize() uint64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetStateRoot() string { + if x != nil { + return x.StateRoot + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetTotalDifficulty() string { + if x != nil { + return x.TotalDifficulty + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetTransactionsRoot() string { + if x != nil { + return x.TransactionsRoot + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetIndexedAt() uint64 { + if x != nil { + return x.IndexedAt + } + return 0 +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetTransactions() []*Game7OrbitArbitrumSepoliaTransaction { + if x != nil { + return x.Transactions + } + return nil +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetMixHash() string { + if x != nil { + return x.MixHash + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetSendCount() string { + if x != nil { + return x.SendCount + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetSendRoot() string { + if x != nil { + return x.SendRoot + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaBlock) GetL1BlockNumber() uint64 { + if x != nil { + return x.L1BlockNumber + } + return 0 +} + +type Game7OrbitArbitrumSepoliaEventLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // The address of the contract that generated the log + Topics []string `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"` // Topics are indexed parameters during log generation + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // The data field from the log + BlockNumber uint64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number where this log was in + TransactionHash string `protobuf:"bytes,5,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` // The hash of the transaction that generated this log + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block where this log was in + Removed bool `protobuf:"varint,7,opt,name=removed,proto3" json:"removed,omitempty"` // True if the log was reverted due to a chain reorganization + LogIndex uint64 `protobuf:"varint,8,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // The index of the log in the block + TransactionIndex uint64 `protobuf:"varint,9,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block +} + +func (x *Game7OrbitArbitrumSepoliaEventLog) Reset() { + *x = Game7OrbitArbitrumSepoliaEventLog{} + if protoimpl.UnsafeEnabled { + mi := &file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Game7OrbitArbitrumSepoliaEventLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Game7OrbitArbitrumSepoliaEventLog) ProtoMessage() {} + +func (x *Game7OrbitArbitrumSepoliaEventLog) ProtoReflect() protoreflect.Message { + mi := &file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Game7OrbitArbitrumSepoliaEventLog.ProtoReflect.Descriptor instead. +func (*Game7OrbitArbitrumSepoliaEventLog) Descriptor() ([]byte, []int) { + return file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{2} +} + +func (x *Game7OrbitArbitrumSepoliaEventLog) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaEventLog) GetTopics() []string { + if x != nil { + return x.Topics + } + return nil +} + +func (x *Game7OrbitArbitrumSepoliaEventLog) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaEventLog) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *Game7OrbitArbitrumSepoliaEventLog) GetTransactionHash() string { + if x != nil { + return x.TransactionHash + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaEventLog) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaEventLog) GetRemoved() bool { + if x != nil { + return x.Removed + } + return false +} + +func (x *Game7OrbitArbitrumSepoliaEventLog) GetLogIndex() uint64 { + if x != nil { + return x.LogIndex + } + return 0 +} + +func (x *Game7OrbitArbitrumSepoliaEventLog) GetTransactionIndex() uint64 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +var File_game7_orbit_arbitrum_sepolia_index_types_proto protoreflect.FileDescriptor + +var file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x37, 0x5f, 0x6f, 0x72, 0x62, 0x69, 0x74, 0x5f, 0x61, 0x72, + 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xaf, 0x05, 0x0a, 0x24, 0x47, 0x61, 0x6d, 0x65, 0x37, 0x4f, 0x72, 0x62, 0x69, 0x74, 0x41, + 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, + 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, + 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, + 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, + 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, + 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, + 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, + 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, + 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, + 0x74, 0x79, 0x22, 0xbb, 0x06, 0x0a, 0x1e, 0x47, 0x61, 0x6d, 0x65, 0x37, 0x4f, 0x72, 0x62, 0x69, + 0x74, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, + 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, + 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, + 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, + 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, + 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, + 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, + 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, + 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x49, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x47, + 0x61, 0x6d, 0x65, 0x37, 0x4f, 0x72, 0x62, 0x69, 0x74, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, + 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x15, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, + 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, + 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x73, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x31, 0x5f, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x22, 0xba, 0x02, 0x0a, 0x21, 0x47, 0x61, 0x6d, 0x65, 0x37, 0x4f, 0x72, 0x62, 0x69, 0x74, 0x41, + 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x1f, 0x5a, + 0x1d, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x37, 0x5f, 0x6f, 0x72, 0x62, 0x69, 0x74, 0x5f, 0x61, 0x72, + 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescOnce sync.Once + file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescData = file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDesc +) + +func file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescGZIP() []byte { + file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescOnce.Do(func() { + file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescData) + }) + return file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescData +} + +var file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_game7_orbit_arbitrum_sepolia_index_types_proto_goTypes = []interface{}{ + (*Game7OrbitArbitrumSepoliaTransaction)(nil), // 0: Game7OrbitArbitrumSepoliaTransaction + (*Game7OrbitArbitrumSepoliaBlock)(nil), // 1: Game7OrbitArbitrumSepoliaBlock + (*Game7OrbitArbitrumSepoliaEventLog)(nil), // 2: Game7OrbitArbitrumSepoliaEventLog +} +var file_game7_orbit_arbitrum_sepolia_index_types_proto_depIdxs = []int32{ + 0, // 0: Game7OrbitArbitrumSepoliaBlock.transactions:type_name -> Game7OrbitArbitrumSepoliaTransaction + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_game7_orbit_arbitrum_sepolia_index_types_proto_init() } +func file_game7_orbit_arbitrum_sepolia_index_types_proto_init() { + if File_game7_orbit_arbitrum_sepolia_index_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Game7OrbitArbitrumSepoliaTransaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Game7OrbitArbitrumSepoliaBlock); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Game7OrbitArbitrumSepoliaEventLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_game7_orbit_arbitrum_sepolia_index_types_proto_goTypes, + DependencyIndexes: file_game7_orbit_arbitrum_sepolia_index_types_proto_depIdxs, + MessageInfos: file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes, + }.Build() + File_game7_orbit_arbitrum_sepolia_index_types_proto = out.File + file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDesc = nil + file_game7_orbit_arbitrum_sepolia_index_types_proto_goTypes = nil + file_game7_orbit_arbitrum_sepolia_index_types_proto_depIdxs = nil +} diff --git a/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.proto b/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.proto new file mode 100644 index 0000000..164e1ba --- /dev/null +++ b/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.proto @@ -0,0 +1,72 @@ +syntax = "proto3"; + +option go_package = ".game7_orbit_arbitrum_sepolia"; + + +// Represents a single transaction within a block +message Game7OrbitArbitrumSepoliaTransaction { + string hash = 1; // The hash of the transaction + uint64 block_number = 2; // The block number the transaction is in + string from_address = 3; // The address the transaction is sent from + string to_address = 4; // The address the transaction is sent to + string gas = 5; // The gas limit of the transaction + string gas_price = 6; // The gas price of the transaction + string max_fee_per_gas = 7; // Used as a field to match potential EIP-1559 transaction types + string max_priority_fee_per_gas = 8; // Used as a field to match potential EIP-1559 transaction types + string input = 9; // The input data of the transaction + string nonce = 10; // The nonce of the transaction + uint64 transaction_index = 11; // The index of the transaction in the block + uint64 transaction_type = 12; // Field to match potential EIP-1559 transaction types + string value = 13; // The value of the transaction + uint64 indexed_at = 14; // When the transaction was indexed by crawler + uint64 block_timestamp = 15; // The timestamp of this block + string block_hash = 16; // The hash of the block the transaction is in + string chain_id = 17; // Used as a field to match potential EIP-1559 transaction types + string v = 18; // Used as a field to match potential EIP-1559 transaction types + string r = 19; // Used as a field to match potential EIP-1559 transaction types + string s = 20; // Used as a field to match potential EIP-1559 transaction types + + repeated string access_list = 21; + string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types +} + +// Represents a block in the blockchain +message Game7OrbitArbitrumSepoliaBlock { + uint64 block_number = 1; // The block number + uint64 difficulty = 2; // The difficulty of this block + string extra_data = 3; // Extra data included in the block + uint64 gas_limit = 4; // The gas limit for this block + uint64 gas_used = 5; // The total gas used by all transactions in this block + string base_fee_per_gas = 6; // The base fee per gas for this block + string hash = 7; // The hash of this block + string logs_bloom = 8; // The logs bloom filter for this block + string miner = 9; // The address of the miner who mined this block + string nonce = 10; // The nonce of this block + string parent_hash = 11; // The hash of the parent block + string receipts_root = 12; // The root hash of the receipts trie + string sha3_uncles = 13; // The SHA3 hash of the uncles data in this block + uint64 size = 14; // The size of this block + string state_root = 15; // The root hash of the state trie + uint64 timestamp = 16; + string total_difficulty = 17; // The total difficulty of the chain until this block + string transactions_root = 18; // The root hash of the transactions trie + uint64 indexed_at = 19; // When the block was indexed by crawler + repeated Game7OrbitArbitrumSepoliaTransaction transactions = 20; // The transactions included in this block + + string mix_hash = 21; // The timestamp of this block + string send_count = 22; // The number of sends in this block + string send_root = 23; // The root hash of the sends trie + uint64 l1_block_number = 24; // The block number of the corresponding L1 block +} + +message Game7OrbitArbitrumSepoliaEventLog { + string address = 1; // The address of the contract that generated the log + repeated string topics = 2; // Topics are indexed parameters during log generation + string data = 3; // The data field from the log + uint64 block_number = 4; // The block number where this log was in + string transaction_hash = 5; // The hash of the transaction that generated this log + string block_hash = 6; // The hash of the block where this log was in + bool removed = 7; // True if the log was reverted due to a chain reorganization + uint64 log_index = 8; // The index of the log in the block + uint64 transaction_index = 9; // The index of the transaction in the block +} \ No newline at end of file diff --git a/blockchain/mantle/mantle.go b/blockchain/mantle/mantle.go new file mode 100644 index 0000000..280d067 --- /dev/null +++ b/blockchain/mantle/mantle.go @@ -0,0 +1,600 @@ +package mantle + +import ( + "context" + "encoding/base64" + "encoding/hex" + "encoding/json" + "fmt" + "math/big" + "strings" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rpc" + seer_common "github.com/moonstream-to/seer/blockchain/common" + "github.com/moonstream-to/seer/indexer" + "google.golang.org/protobuf/proto" +) + +func NewClient(url string) (*Client, error) { + rpcClient, err := rpc.DialContext(context.Background(), url) + if err != nil { + return nil, err + } + return &Client{rpcClient: rpcClient}, nil +} + +// Client is a wrapper around the Ethereum JSON-RPC client. + +type Client struct { + rpcClient *rpc.Client +} + +// Client common + +// ChainType returns the chain type. +func (c *Client) ChainType() string { + return "mantle" +} + +// Close closes the underlying RPC client. +func (c *Client) Close() { + c.rpcClient.Close() +} + +// GetLatestBlockNumber returns the latest block number. +func (c *Client) GetLatestBlockNumber() (*big.Int, error) { + var result string + if err := c.rpcClient.CallContext(context.Background(), &result, "eth_blockNumber"); err != nil { + return nil, err + } + + // Convert the hex string to a big.Int + blockNumber, ok := new(big.Int).SetString(result, 0) // The 0 base lets the function infer the base from the string prefix. + if !ok { + return nil, fmt.Errorf("invalid block number format: %s", result) + } + + return blockNumber, nil +} + +// BlockByNumber returns the block with the given number. +func (c *Client) GetBlockByNumber(ctx context.Context, number *big.Int) (*seer_common.BlockJson, error) { + + var rawResponse json.RawMessage // Use RawMessage to capture the entire JSON response + err := c.rpcClient.CallContext(ctx, &rawResponse, "eth_getBlockByNumber", "0x"+number.Text(16), true) + if err != nil { + fmt.Println("Error calling eth_getBlockByNumber: ", err) + return nil, err + } + + var response_json map[string]interface{} + + err = json.Unmarshal(rawResponse, &response_json) + + delete(response_json, "transactions") + + var block *seer_common.BlockJson + err = c.rpcClient.CallContext(ctx, &block, "eth_getBlockByNumber", "0x"+number.Text(16), true) // true to include transactions + return block, err +} + +// BlockByHash returns the block with the given hash. +func (c *Client) BlockByHash(ctx context.Context, hash common.Hash) (*seer_common.BlockJson, error) { + var block *seer_common.BlockJson + err := c.rpcClient.CallContext(ctx, &block, "eth_getBlockByHash", hash, true) // true to include transactions + return block, err +} + +// TransactionReceipt returns the receipt of a transaction by transaction hash. +func (c *Client) TransactionReceipt(ctx context.Context, hash common.Hash) (*types.Receipt, error) { + var receipt *types.Receipt + err := c.rpcClient.CallContext(ctx, &receipt, "eth_getTransactionReceipt", hash) + return receipt, err +} + +func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]*seer_common.EventJson, error) { + var logs []*seer_common.EventJson + fromBlock := q.FromBlock + toBlock := q.ToBlock + batchStep := new(big.Int).Sub(toBlock, fromBlock) // Calculate initial batch step + + for { + // Calculate the next "lastBlock" within the batch step or adjust to "toBlock" if exceeding + nextBlock := new(big.Int).Add(fromBlock, batchStep) + if nextBlock.Cmp(toBlock) > 0 { + nextBlock = new(big.Int).Set(toBlock) + } + + var result []*seer_common.EventJson + err := c.rpcClient.CallContext(ctx, &result, "eth_getLogs", struct { + FromBlock string `json:"fromBlock"` + ToBlock string `json:"toBlock"` + Addresses []common.Address `json:"addresses"` + Topics [][]common.Hash `json:"topics"` + }{ + FromBlock: toHex(fromBlock), + ToBlock: toHex(nextBlock), + Addresses: q.Addresses, + Topics: q.Topics, + }) + + if err != nil { + if strings.Contains(err.Error(), "query returned more than 10000 results") { + // Halve the batch step if too many results and retry + batchStep.Div(batchStep, big.NewInt(2)) + if batchStep.Cmp(big.NewInt(1)) < 0 { + // If the batch step is too small we will skip that block + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + if fromBlock.Cmp(toBlock) > 0 { + break + } + continue + } + continue + } else { + // For any other error, return immediately + return nil, err + } + } + + // Append the results and adjust "fromBlock" for the next batch + logs = append(logs, result...) + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + + // Break the loop if we've reached or exceeded "toBlock" + if fromBlock.Cmp(toBlock) > 0 { + break + } + } + + return logs, nil +} + +// fetchBlocks returns the blocks for a given range. +func (c *Client) fetchBlocks(ctx context.Context, from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + + for i := from; i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + return blocks, nil +} + +// Utility function to convert big.Int to its hexadecimal representation. +func toHex(number *big.Int) string { + return fmt.Sprintf("0x%x", number) +} + +func fromHex(hex string) *big.Int { + number := new(big.Int) + number.SetString(hex, 0) + return number +} + +// FetchBlocksInRange fetches blocks within a specified range. +// This could be useful for batch processing or analysis. +func (c *Client) FetchBlocksInRange(from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + ctx := context.Background() // For simplicity, using a background context; consider timeouts for production. + + for i := new(big.Int).Set(from); i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + fmt.Println("Block number: ", i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + + return blocks, nil +} + +// ParseBlocksAndTransactions parses blocks and their transactions into custom data structures. +// This method showcases how to handle and transform detailed block and transaction data. +func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*MantleBlock, []*MantleTransaction, error) { + blocksJson, err := c.FetchBlocksInRange(from, to) + if err != nil { + return nil, nil, err + } + + var parsedBlocks []*MantleBlock + var parsedTransactions []*MantleTransaction + for _, blockJson := range blocksJson { + // Convert BlockJson to Block and Transactions as required. + parsedBlock := ToProtoSingleBlock(blockJson) + + // Example: Parsing transactions within the block + for _, txJson := range blockJson.Transactions { + + txJson.BlockTimestamp = blockJson.Timestamp + + parsedTransaction := ToProtoSingleTransaction(&txJson) + parsedTransactions = append(parsedTransactions, parsedTransaction) + } + + parsedBlocks = append(parsedBlocks, parsedBlock) + } + + return parsedBlocks, parsedTransactions, nil +} + +func (c *Client) ParseEvents(from, to *big.Int, blocksCache map[uint64]indexer.BlockCache) ([]*MantleEventLog, error) { + + logs, err := c.ClientFilterLogs(context.Background(), ethereum.FilterQuery{ + FromBlock: from, + ToBlock: to, + }) + + if err != nil { + fmt.Println("Error fetching logs: ", err) + return nil, err + } + + var parsedEvents []*MantleEventLog + for _, log := range logs { + parsedEvent := ToProtoSingleEventLog(log) + parsedEvents = append(parsedEvents, parsedEvent) + } + + return parsedEvents, nil +} + +func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCache, error) { + parsedBlocks, parsedTransactions, err := c.ParseBlocksAndTransactions(from, to) + + if err != nil { + return nil, nil, nil, nil, nil, err + } + + blocksCache := make(map[uint64]indexer.BlockCache) + + var blocksProto []proto.Message + var blockIndex []indexer.BlockIndex + for index, block := range parsedBlocks { + blocksProto = append(blocksProto, block) // Assuming block is already a proto.Message + blocksCache[block.BlockNumber] = indexer.BlockCache{ + BlockNumber: block.BlockNumber, + BlockHash: block.Hash, + BlockTimestamp: block.Timestamp, + } // Assuming block.BlockNumber is int64 and block.Hash is string + blockIndex = append(blockIndex, indexer.NewBlockIndex("mantle", + block.BlockNumber, + block.Hash, + block.Timestamp, + block.ParentHash, + uint64(index), + "", + )) + } + + var transactionsProto []proto.Message + var transactionIndex []indexer.TransactionIndex + for index, transaction := range parsedTransactions { + transactionsProto = append(transactionsProto, transaction) // Assuming transaction is also a proto.Message + + selector := "0x" + + if len(transaction.Input) > 10 { + selector = transaction.Input[:10] + } + + transactionIndex = append(transactionIndex, indexer.TransactionIndex{ + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + BlockTimestamp: transaction.BlockTimestamp, + FromAddress: transaction.FromAddress, + ToAddress: transaction.ToAddress, + RowID: uint64(index), + Selector: selector, // First 10 characters of the input data 0x + 4 bytes of the function signature + TransactionHash: transaction.Hash, + TransactionIndex: transaction.TransactionIndex, + Type: transaction.TransactionType, + Path: "", + }) + } + + return blocksProto, transactionsProto, blockIndex, transactionIndex, blocksCache, nil +} + +func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]indexer.BlockCache) ([]proto.Message, []indexer.LogIndex, error) { + + parsedEvents, err := c.ParseEvents(from, to, blocksCahche) + + if err != nil { + return nil, nil, err + } + + var eventsProto []proto.Message + var eventsIndex []indexer.LogIndex + for index, event := range parsedEvents { + eventsProto = append(eventsProto, event) // Assuming event is already a proto.Message + + var topic0, topic1, topic2 *string + + if len(event.Topics) == 0 { + fmt.Println("No topics found for event: ", event) + } else { + topic0 = &event.Topics[0] // First topic + } + + // Assign topics based on availability + if len(event.Topics) > 1 { + topic1 = &event.Topics[1] // Second topic, if present + } + if len(event.Topics) > 2 { + topic2 = &event.Topics[2] // Third topic, if present + } + + eventsIndex = append(eventsIndex, indexer.LogIndex{ + Address: event.Address, + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + BlockTimestamp: blocksCahche[event.BlockNumber].BlockTimestamp, + TransactionHash: event.TransactionHash, + Selector: topic0, // First topic + Topic1: topic1, + Topic2: topic2, + RowID: uint64(index), + LogIndex: event.LogIndex, + Path: "", + }) + } + + return eventsProto, eventsIndex, nil + +} +func ToProtoSingleBlock(obj *seer_common.BlockJson) *MantleBlock { + return &MantleBlock{ + BlockNumber: obj.BlockNumber, + Difficulty: obj.Difficulty, + ExtraData: obj.ExtraData, + GasLimit: obj.GasLimit, + GasUsed: obj.GasUsed, + BaseFeePerGas: obj.BaseFeePerGas, + Hash: obj.Hash, + LogsBloom: obj.LogsBloom, + Miner: obj.Miner, + Nonce: obj.Nonce, + ParentHash: obj.ParentHash, + ReceiptsRoot: obj.ReceiptsRoot, + Sha3Uncles: obj.Sha3Uncles, + Size: obj.Size, + StateRoot: obj.StateRoot, + Timestamp: obj.Timestamp, + TotalDifficulty: obj.TotalDifficulty, + TransactionsRoot: obj.TransactionsRoot, + IndexedAt: obj.IndexedAt, + } +} + +func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *MantleTransaction { + return &MantleTransaction{ + Hash: obj.Hash, + BlockNumber: obj.BlockNumber, + BlockHash: obj.BlockHash, + FromAddress: obj.FromAddress, + ToAddress: obj.ToAddress, + Gas: obj.Gas, + GasPrice: obj.GasPrice, + MaxFeePerGas: obj.MaxFeePerGas, + MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, + Input: obj.Input, + Nonce: obj.Nonce, + TransactionIndex: obj.TransactionIndex, + TransactionType: obj.TransactionType, + Value: obj.Value, + IndexedAt: obj.IndexedAt, + BlockTimestamp: obj.BlockTimestamp, + + ChainId: obj.ChainId, + V: obj.V, + R: obj.R, + S: obj.S, + + AccessList: obj.AccessList, + YParity: obj.YParity, + } +} + +func ToProtoSingleEventLog(obj *seer_common.EventJson) *MantleEventLog { + + return &MantleEventLog{ + Address: obj.Address, + Topics: obj.Topics, + Data: obj.Data, + BlockNumber: obj.BlockNumber, + TransactionHash: obj.TransactionHash, + LogIndex: obj.LogIndex, + BlockHash: obj.BlockHash, + Removed: obj.Removed, + } +} + +func (c *Client) DecodeProtoEventLogs(data []string) ([]*MantleEventLog, error) { + var events []*MantleEventLog + for _, d := range data { + var event MantleEventLog + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &event); err != nil { + return nil, err + } + events = append(events, &event) + } + return events, nil +} + +func (c *Client) DecodeProtoTransactions(data []string) ([]*MantleTransaction, error) { + var transactions []*MantleTransaction + for _, d := range data { + var transaction MantleTransaction + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &transaction); err != nil { + return nil, err + } + transactions = append(transactions, &transaction) + } + return transactions, nil +} + +func (c *Client) DecodeProtoBlocks(data []string) ([]*MantleBlock, error) { + var blocks []*MantleBlock + for _, d := range data { + var block MantleBlock + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &block); err != nil { + return nil, err + } + blocks = append(blocks, &block) + } + return blocks, nil +} + +func (c *Client) DecodeProtoEventsToLabels(events []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.EventLabel, error) { + + decodedEvents, err := c.DecodeProtoEventLogs(events) + + if err != nil { + return nil, err + } + + var labels []indexer.EventLabel + + for _, event := range decodedEvents { + + var topicSelector string + + if len(event.Topics) > 0 { + topicSelector = event.Topics[0][:10] + } else { + continue + } + + checksumAddress := common.HexToAddress(event.Address).Hex() + + // Get the ABI string + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][topicSelector]["abi"])) + if err != nil { + fmt.Println("Error initializing contract ABI: ", err) + return nil, err + } + + // Decode the event data + decodedArgs, err := seer_common.DecodeLogArgsToLabelData(&contractAbi, event.Topics, event.Data) + + if err != nil { + fmt.Println("Error decoding event data: ", err) + return nil, err + } + + // Convert decodedArgs map to JSON + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert event to label + eventLabel := indexer.EventLabel{ + Label: indexer.SeerCrawlerLabel, + LabelName: abiMap[checksumAddress][topicSelector]["abi_name"], + LabelType: "event", + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + Address: event.Address, + TransactionHash: event.TransactionHash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[event.BlockNumber], + LogIndex: event.LogIndex, + } + + labels = append(labels, eventLabel) + + } + + return labels, nil +} + +func (c *Client) DecodeProtoTransactionsToLabels(transactions []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.TransactionLabel, error) { + + decodedTransactions, err := c.DecodeProtoTransactions(transactions) + + if err != nil { + return nil, err + } + + var labels []indexer.TransactionLabel + + for _, transaction := range decodedTransactions { + + selector := transaction.Input[:10] + + // To checksum address + checksumAddress := common.HexToAddress(transaction.ToAddress).Hex() + + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][selector]["abi"])) + + if err != nil { + return nil, err + } + + inputData, err := hex.DecodeString(transaction.Input[2:]) + if err != nil { + fmt.Println("Error decoding input data: ", err) + return nil, err + } + + decodedArgs, err := seer_common.DecodeTransactionInputDataToInterface(&contractAbi, inputData) + + if err != nil { + fmt.Println("Error decoding transaction input data: ", err) + return nil, err + } + + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert transaction to label + transactionLabel := indexer.TransactionLabel{ + Address: transaction.ToAddress, + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + CallerAddress: transaction.FromAddress, + LabelName: abiMap[checksumAddress][selector]["abi_name"], + LabelType: "tx_call", + OriginAddress: transaction.FromAddress, + Label: indexer.SeerCrawlerLabel, + TransactionHash: transaction.Hash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[transaction.BlockNumber], + } + + labels = append(labels, transactionLabel) + + } + + return labels, nil +} diff --git a/blockchain/mantle/mantle_index_types.pb.go b/blockchain/mantle/mantle_index_types.pb.go new file mode 100644 index 0000000..7089b6e --- /dev/null +++ b/blockchain/mantle/mantle_index_types.pb.go @@ -0,0 +1,748 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.1 +// protoc v3.6.1 +// source: mantle_index_types.proto + +package mantle + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents a single transaction within a block +type MantleTransaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types +} + +func (x *MantleTransaction) Reset() { + *x = MantleTransaction{} + if protoimpl.UnsafeEnabled { + mi := &file_mantle_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MantleTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MantleTransaction) ProtoMessage() {} + +func (x *MantleTransaction) ProtoReflect() protoreflect.Message { + mi := &file_mantle_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MantleTransaction.ProtoReflect.Descriptor instead. +func (*MantleTransaction) Descriptor() ([]byte, []int) { + return file_mantle_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *MantleTransaction) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *MantleTransaction) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *MantleTransaction) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *MantleTransaction) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *MantleTransaction) GetGas() string { + if x != nil { + return x.Gas + } + return "" +} + +func (x *MantleTransaction) GetGasPrice() string { + if x != nil { + return x.GasPrice + } + return "" +} + +func (x *MantleTransaction) GetMaxFeePerGas() string { + if x != nil { + return x.MaxFeePerGas + } + return "" +} + +func (x *MantleTransaction) GetMaxPriorityFeePerGas() string { + if x != nil { + return x.MaxPriorityFeePerGas + } + return "" +} + +func (x *MantleTransaction) GetInput() string { + if x != nil { + return x.Input + } + return "" +} + +func (x *MantleTransaction) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *MantleTransaction) GetTransactionIndex() uint64 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +func (x *MantleTransaction) GetTransactionType() uint64 { + if x != nil { + return x.TransactionType + } + return 0 +} + +func (x *MantleTransaction) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *MantleTransaction) GetIndexedAt() uint64 { + if x != nil { + return x.IndexedAt + } + return 0 +} + +func (x *MantleTransaction) GetBlockTimestamp() uint64 { + if x != nil { + return x.BlockTimestamp + } + return 0 +} + +func (x *MantleTransaction) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *MantleTransaction) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *MantleTransaction) GetV() string { + if x != nil { + return x.V + } + return "" +} + +func (x *MantleTransaction) GetR() string { + if x != nil { + return x.R + } + return "" +} + +func (x *MantleTransaction) GetS() string { + if x != nil { + return x.S + } + return "" +} + +func (x *MantleTransaction) GetAccessList() []string { + if x != nil { + return x.AccessList + } + return nil +} + +func (x *MantleTransaction) GetYParity() string { + if x != nil { + return x.YParity + } + return "" +} + +// Represents a block in the blockchain +type MantleBlock struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number + Difficulty uint64 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty,omitempty"` // The difficulty of this block + ExtraData string `protobuf:"bytes,3,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"` // Extra data included in the block + GasLimit uint64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // The gas limit for this block + GasUsed uint64 `protobuf:"varint,5,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` // The total gas used by all transactions in this block + BaseFeePerGas string `protobuf:"bytes,6,opt,name=base_fee_per_gas,json=baseFeePerGas,proto3" json:"base_fee_per_gas,omitempty"` // The base fee per gas for this block + Hash string `protobuf:"bytes,7,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of this block + LogsBloom string `protobuf:"bytes,8,opt,name=logs_bloom,json=logsBloom,proto3" json:"logs_bloom,omitempty"` // The logs bloom filter for this block + Miner string `protobuf:"bytes,9,opt,name=miner,proto3" json:"miner,omitempty"` // The address of the miner who mined this block + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of this block + ParentHash string `protobuf:"bytes,11,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` // The hash of the parent block + ReceiptsRoot string `protobuf:"bytes,12,opt,name=receipts_root,json=receiptsRoot,proto3" json:"receipts_root,omitempty"` // The root hash of the receipts trie + Sha3Uncles string `protobuf:"bytes,13,opt,name=sha3_uncles,json=sha3Uncles,proto3" json:"sha3_uncles,omitempty"` // The SHA3 hash of the uncles data in this block + Size uint64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"` // The size of this block + StateRoot string `protobuf:"bytes,15,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` // The root hash of the state trie + Timestamp uint64 `protobuf:"varint,16,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + TotalDifficulty string `protobuf:"bytes,17,opt,name=total_difficulty,json=totalDifficulty,proto3" json:"total_difficulty,omitempty"` // The total difficulty of the chain until this block + TransactionsRoot string `protobuf:"bytes,18,opt,name=transactions_root,json=transactionsRoot,proto3" json:"transactions_root,omitempty"` // The root hash of the transactions trie + IndexedAt uint64 `protobuf:"varint,19,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the block was indexed by crawler + Transactions []*MantleTransaction `protobuf:"bytes,20,rep,name=transactions,proto3" json:"transactions,omitempty"` // The transactions included in this block +} + +func (x *MantleBlock) Reset() { + *x = MantleBlock{} + if protoimpl.UnsafeEnabled { + mi := &file_mantle_index_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MantleBlock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MantleBlock) ProtoMessage() {} + +func (x *MantleBlock) ProtoReflect() protoreflect.Message { + mi := &file_mantle_index_types_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MantleBlock.ProtoReflect.Descriptor instead. +func (*MantleBlock) Descriptor() ([]byte, []int) { + return file_mantle_index_types_proto_rawDescGZIP(), []int{1} +} + +func (x *MantleBlock) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *MantleBlock) GetDifficulty() uint64 { + if x != nil { + return x.Difficulty + } + return 0 +} + +func (x *MantleBlock) GetExtraData() string { + if x != nil { + return x.ExtraData + } + return "" +} + +func (x *MantleBlock) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *MantleBlock) GetGasUsed() uint64 { + if x != nil { + return x.GasUsed + } + return 0 +} + +func (x *MantleBlock) GetBaseFeePerGas() string { + if x != nil { + return x.BaseFeePerGas + } + return "" +} + +func (x *MantleBlock) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *MantleBlock) GetLogsBloom() string { + if x != nil { + return x.LogsBloom + } + return "" +} + +func (x *MantleBlock) GetMiner() string { + if x != nil { + return x.Miner + } + return "" +} + +func (x *MantleBlock) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *MantleBlock) GetParentHash() string { + if x != nil { + return x.ParentHash + } + return "" +} + +func (x *MantleBlock) GetReceiptsRoot() string { + if x != nil { + return x.ReceiptsRoot + } + return "" +} + +func (x *MantleBlock) GetSha3Uncles() string { + if x != nil { + return x.Sha3Uncles + } + return "" +} + +func (x *MantleBlock) GetSize() uint64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *MantleBlock) GetStateRoot() string { + if x != nil { + return x.StateRoot + } + return "" +} + +func (x *MantleBlock) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *MantleBlock) GetTotalDifficulty() string { + if x != nil { + return x.TotalDifficulty + } + return "" +} + +func (x *MantleBlock) GetTransactionsRoot() string { + if x != nil { + return x.TransactionsRoot + } + return "" +} + +func (x *MantleBlock) GetIndexedAt() uint64 { + if x != nil { + return x.IndexedAt + } + return 0 +} + +func (x *MantleBlock) GetTransactions() []*MantleTransaction { + if x != nil { + return x.Transactions + } + return nil +} + +type MantleEventLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // The address of the contract that generated the log + Topics []string `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"` // Topics are indexed parameters during log generation + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // The data field from the log + BlockNumber uint64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number where this log was in + TransactionHash string `protobuf:"bytes,5,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` // The hash of the transaction that generated this log + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block where this log was in + Removed bool `protobuf:"varint,7,opt,name=removed,proto3" json:"removed,omitempty"` // True if the log was reverted due to a chain reorganization + LogIndex uint64 `protobuf:"varint,8,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // The index of the log in the block + TransactionIndex uint64 `protobuf:"varint,9,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block +} + +func (x *MantleEventLog) Reset() { + *x = MantleEventLog{} + if protoimpl.UnsafeEnabled { + mi := &file_mantle_index_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MantleEventLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MantleEventLog) ProtoMessage() {} + +func (x *MantleEventLog) ProtoReflect() protoreflect.Message { + mi := &file_mantle_index_types_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MantleEventLog.ProtoReflect.Descriptor instead. +func (*MantleEventLog) Descriptor() ([]byte, []int) { + return file_mantle_index_types_proto_rawDescGZIP(), []int{2} +} + +func (x *MantleEventLog) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *MantleEventLog) GetTopics() []string { + if x != nil { + return x.Topics + } + return nil +} + +func (x *MantleEventLog) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *MantleEventLog) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *MantleEventLog) GetTransactionHash() string { + if x != nil { + return x.TransactionHash + } + return "" +} + +func (x *MantleEventLog) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *MantleEventLog) GetRemoved() bool { + if x != nil { + return x.Removed + } + return false +} + +func (x *MantleEventLog) GetLogIndex() uint64 { + if x != nil { + return x.LogIndex + } + return 0 +} + +func (x *MantleEventLog) GetTransactionIndex() uint64 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +var File_mantle_index_types_proto protoreflect.FileDescriptor + +var file_mantle_index_types_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x6d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x05, 0x0a, 0x11, 0x4d, + 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, + 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, + 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, + 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, + 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, + 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, + 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, + 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, + 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0x96, 0x05, 0x0a, 0x0b, 0x4d, 0x61, + 0x6e, 0x74, 0x6c, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, + 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, + 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, + 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, + 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, + 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, + 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, + 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, + 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, + 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, + 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, + 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, + 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, + 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x09, 0x5a, 0x07, + 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_mantle_index_types_proto_rawDescOnce sync.Once + file_mantle_index_types_proto_rawDescData = file_mantle_index_types_proto_rawDesc +) + +func file_mantle_index_types_proto_rawDescGZIP() []byte { + file_mantle_index_types_proto_rawDescOnce.Do(func() { + file_mantle_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_mantle_index_types_proto_rawDescData) + }) + return file_mantle_index_types_proto_rawDescData +} + +var file_mantle_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_mantle_index_types_proto_goTypes = []interface{}{ + (*MantleTransaction)(nil), // 0: MantleTransaction + (*MantleBlock)(nil), // 1: MantleBlock + (*MantleEventLog)(nil), // 2: MantleEventLog +} +var file_mantle_index_types_proto_depIdxs = []int32{ + 0, // 0: MantleBlock.transactions:type_name -> MantleTransaction + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_mantle_index_types_proto_init() } +func file_mantle_index_types_proto_init() { + if File_mantle_index_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mantle_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MantleTransaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mantle_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MantleBlock); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mantle_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MantleEventLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mantle_index_types_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mantle_index_types_proto_goTypes, + DependencyIndexes: file_mantle_index_types_proto_depIdxs, + MessageInfos: file_mantle_index_types_proto_msgTypes, + }.Build() + File_mantle_index_types_proto = out.File + file_mantle_index_types_proto_rawDesc = nil + file_mantle_index_types_proto_goTypes = nil + file_mantle_index_types_proto_depIdxs = nil +} diff --git a/blockchain/mantle/mantle_index_types.proto b/blockchain/mantle/mantle_index_types.proto new file mode 100644 index 0000000..98a52ba --- /dev/null +++ b/blockchain/mantle/mantle_index_types.proto @@ -0,0 +1,67 @@ +syntax = "proto3"; + +option go_package = ".mantle"; + + +// Represents a single transaction within a block +message MantleTransaction { + string hash = 1; // The hash of the transaction + uint64 block_number = 2; // The block number the transaction is in + string from_address = 3; // The address the transaction is sent from + string to_address = 4; // The address the transaction is sent to + string gas = 5; // The gas limit of the transaction + string gas_price = 6; // The gas price of the transaction + string max_fee_per_gas = 7; // Used as a field to match potential EIP-1559 transaction types + string max_priority_fee_per_gas = 8; // Used as a field to match potential EIP-1559 transaction types + string input = 9; // The input data of the transaction + string nonce = 10; // The nonce of the transaction + uint64 transaction_index = 11; // The index of the transaction in the block + uint64 transaction_type = 12; // Field to match potential EIP-1559 transaction types + string value = 13; // The value of the transaction + uint64 indexed_at = 14; // When the transaction was indexed by crawler + uint64 block_timestamp = 15; // The timestamp of this block + string block_hash = 16; // The hash of the block the transaction is in + string chain_id = 17; // Used as a field to match potential EIP-1559 transaction types + string v = 18; // Used as a field to match potential EIP-1559 transaction types + string r = 19; // Used as a field to match potential EIP-1559 transaction types + string s = 20; // Used as a field to match potential EIP-1559 transaction types + + repeated string access_list = 21; + string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types +} + +// Represents a block in the blockchain +message MantleBlock { + uint64 block_number = 1; // The block number + uint64 difficulty = 2; // The difficulty of this block + string extra_data = 3; // Extra data included in the block + uint64 gas_limit = 4; // The gas limit for this block + uint64 gas_used = 5; // The total gas used by all transactions in this block + string base_fee_per_gas = 6; // The base fee per gas for this block + string hash = 7; // The hash of this block + string logs_bloom = 8; // The logs bloom filter for this block + string miner = 9; // The address of the miner who mined this block + string nonce = 10; // The nonce of this block + string parent_hash = 11; // The hash of the parent block + string receipts_root = 12; // The root hash of the receipts trie + string sha3_uncles = 13; // The SHA3 hash of the uncles data in this block + uint64 size = 14; // The size of this block + string state_root = 15; // The root hash of the state trie + uint64 timestamp = 16; + string total_difficulty = 17; // The total difficulty of the chain until this block + string transactions_root = 18; // The root hash of the transactions trie + uint64 indexed_at = 19; // When the block was indexed by crawler + repeated MantleTransaction transactions = 20; // The transactions included in this block +} + +message MantleEventLog { + string address = 1; // The address of the contract that generated the log + repeated string topics = 2; // Topics are indexed parameters during log generation + string data = 3; // The data field from the log + uint64 block_number = 4; // The block number where this log was in + string transaction_hash = 5; // The hash of the transaction that generated this log + string block_hash = 6; // The hash of the block where this log was in + bool removed = 7; // True if the log was reverted due to a chain reorganization + uint64 log_index = 8; // The index of the log in the block + uint64 transaction_index = 9; // The index of the transaction in the block +} \ No newline at end of file diff --git a/blockchain/mantle_sepolia/mantle_sepolia.go b/blockchain/mantle_sepolia/mantle_sepolia.go new file mode 100644 index 0000000..16c37c4 --- /dev/null +++ b/blockchain/mantle_sepolia/mantle_sepolia.go @@ -0,0 +1,600 @@ +package mantle_sepolia + +import ( + "context" + "encoding/base64" + "encoding/hex" + "encoding/json" + "fmt" + "math/big" + "strings" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rpc" + seer_common "github.com/moonstream-to/seer/blockchain/common" + "github.com/moonstream-to/seer/indexer" + "google.golang.org/protobuf/proto" +) + +func NewClient(url string) (*Client, error) { + rpcClient, err := rpc.DialContext(context.Background(), url) + if err != nil { + return nil, err + } + return &Client{rpcClient: rpcClient}, nil +} + +// Client is a wrapper around the Ethereum JSON-RPC client. + +type Client struct { + rpcClient *rpc.Client +} + +// Client common + +// ChainType returns the chain type. +func (c *Client) ChainType() string { + return "mantle_sepolia" +} + +// Close closes the underlying RPC client. +func (c *Client) Close() { + c.rpcClient.Close() +} + +// GetLatestBlockNumber returns the latest block number. +func (c *Client) GetLatestBlockNumber() (*big.Int, error) { + var result string + if err := c.rpcClient.CallContext(context.Background(), &result, "eth_blockNumber"); err != nil { + return nil, err + } + + // Convert the hex string to a big.Int + blockNumber, ok := new(big.Int).SetString(result, 0) // The 0 base lets the function infer the base from the string prefix. + if !ok { + return nil, fmt.Errorf("invalid block number format: %s", result) + } + + return blockNumber, nil +} + +// BlockByNumber returns the block with the given number. +func (c *Client) GetBlockByNumber(ctx context.Context, number *big.Int) (*seer_common.BlockJson, error) { + + var rawResponse json.RawMessage // Use RawMessage to capture the entire JSON response + err := c.rpcClient.CallContext(ctx, &rawResponse, "eth_getBlockByNumber", "0x"+number.Text(16), true) + if err != nil { + fmt.Println("Error calling eth_getBlockByNumber: ", err) + return nil, err + } + + var response_json map[string]interface{} + + err = json.Unmarshal(rawResponse, &response_json) + + delete(response_json, "transactions") + + var block *seer_common.BlockJson + err = c.rpcClient.CallContext(ctx, &block, "eth_getBlockByNumber", "0x"+number.Text(16), true) // true to include transactions + return block, err +} + +// BlockByHash returns the block with the given hash. +func (c *Client) BlockByHash(ctx context.Context, hash common.Hash) (*seer_common.BlockJson, error) { + var block *seer_common.BlockJson + err := c.rpcClient.CallContext(ctx, &block, "eth_getBlockByHash", hash, true) // true to include transactions + return block, err +} + +// TransactionReceipt returns the receipt of a transaction by transaction hash. +func (c *Client) TransactionReceipt(ctx context.Context, hash common.Hash) (*types.Receipt, error) { + var receipt *types.Receipt + err := c.rpcClient.CallContext(ctx, &receipt, "eth_getTransactionReceipt", hash) + return receipt, err +} + +func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]*seer_common.EventJson, error) { + var logs []*seer_common.EventJson + fromBlock := q.FromBlock + toBlock := q.ToBlock + batchStep := new(big.Int).Sub(toBlock, fromBlock) // Calculate initial batch step + + for { + // Calculate the next "lastBlock" within the batch step or adjust to "toBlock" if exceeding + nextBlock := new(big.Int).Add(fromBlock, batchStep) + if nextBlock.Cmp(toBlock) > 0 { + nextBlock = new(big.Int).Set(toBlock) + } + + var result []*seer_common.EventJson + err := c.rpcClient.CallContext(ctx, &result, "eth_getLogs", struct { + FromBlock string `json:"fromBlock"` + ToBlock string `json:"toBlock"` + Addresses []common.Address `json:"addresses"` + Topics [][]common.Hash `json:"topics"` + }{ + FromBlock: toHex(fromBlock), + ToBlock: toHex(nextBlock), + Addresses: q.Addresses, + Topics: q.Topics, + }) + + if err != nil { + if strings.Contains(err.Error(), "query returned more than 10000 results") { + // Halve the batch step if too many results and retry + batchStep.Div(batchStep, big.NewInt(2)) + if batchStep.Cmp(big.NewInt(1)) < 0 { + // If the batch step is too small we will skip that block + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + if fromBlock.Cmp(toBlock) > 0 { + break + } + continue + } + continue + } else { + // For any other error, return immediately + return nil, err + } + } + + // Append the results and adjust "fromBlock" for the next batch + logs = append(logs, result...) + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + + // Break the loop if we've reached or exceeded "toBlock" + if fromBlock.Cmp(toBlock) > 0 { + break + } + } + + return logs, nil +} + +// fetchBlocks returns the blocks for a given range. +func (c *Client) fetchBlocks(ctx context.Context, from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + + for i := from; i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + return blocks, nil +} + +// Utility function to convert big.Int to its hexadecimal representation. +func toHex(number *big.Int) string { + return fmt.Sprintf("0x%x", number) +} + +func fromHex(hex string) *big.Int { + number := new(big.Int) + number.SetString(hex, 0) + return number +} + +// FetchBlocksInRange fetches blocks within a specified range. +// This could be useful for batch processing or analysis. +func (c *Client) FetchBlocksInRange(from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + ctx := context.Background() // For simplicity, using a background context; consider timeouts for production. + + for i := new(big.Int).Set(from); i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + fmt.Println("Block number: ", i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + + return blocks, nil +} + +// ParseBlocksAndTransactions parses blocks and their transactions into custom data structures. +// This method showcases how to handle and transform detailed block and transaction data. +func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*MantleSepoliaBlock, []*MantleSepoliaTransaction, error) { + blocksJson, err := c.FetchBlocksInRange(from, to) + if err != nil { + return nil, nil, err + } + + var parsedBlocks []*MantleSepoliaBlock + var parsedTransactions []*MantleSepoliaTransaction + for _, blockJson := range blocksJson { + // Convert BlockJson to Block and Transactions as required. + parsedBlock := ToProtoSingleBlock(blockJson) + + // Example: Parsing transactions within the block + for _, txJson := range blockJson.Transactions { + + txJson.BlockTimestamp = blockJson.Timestamp + + parsedTransaction := ToProtoSingleTransaction(&txJson) + parsedTransactions = append(parsedTransactions, parsedTransaction) + } + + parsedBlocks = append(parsedBlocks, parsedBlock) + } + + return parsedBlocks, parsedTransactions, nil +} + +func (c *Client) ParseEvents(from, to *big.Int, blocksCache map[uint64]indexer.BlockCache) ([]*MantleSepoliaEventLog, error) { + + logs, err := c.ClientFilterLogs(context.Background(), ethereum.FilterQuery{ + FromBlock: from, + ToBlock: to, + }) + + if err != nil { + fmt.Println("Error fetching logs: ", err) + return nil, err + } + + var parsedEvents []*MantleSepoliaEventLog + for _, log := range logs { + parsedEvent := ToProtoSingleEventLog(log) + parsedEvents = append(parsedEvents, parsedEvent) + } + + return parsedEvents, nil +} + +func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCache, error) { + parsedBlocks, parsedTransactions, err := c.ParseBlocksAndTransactions(from, to) + + if err != nil { + return nil, nil, nil, nil, nil, err + } + + blocksCache := make(map[uint64]indexer.BlockCache) + + var blocksProto []proto.Message + var blockIndex []indexer.BlockIndex + for index, block := range parsedBlocks { + blocksProto = append(blocksProto, block) // Assuming block is already a proto.Message + blocksCache[block.BlockNumber] = indexer.BlockCache{ + BlockNumber: block.BlockNumber, + BlockHash: block.Hash, + BlockTimestamp: block.Timestamp, + } // Assuming block.BlockNumber is int64 and block.Hash is string + blockIndex = append(blockIndex, indexer.NewBlockIndex("mantle_sepolia", + block.BlockNumber, + block.Hash, + block.Timestamp, + block.ParentHash, + uint64(index), + "", + )) + } + + var transactionsProto []proto.Message + var transactionIndex []indexer.TransactionIndex + for index, transaction := range parsedTransactions { + transactionsProto = append(transactionsProto, transaction) // Assuming transaction is also a proto.Message + + selector := "0x" + + if len(transaction.Input) > 10 { + selector = transaction.Input[:10] + } + + transactionIndex = append(transactionIndex, indexer.TransactionIndex{ + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + BlockTimestamp: transaction.BlockTimestamp, + FromAddress: transaction.FromAddress, + ToAddress: transaction.ToAddress, + RowID: uint64(index), + Selector: selector, // First 10 characters of the input data 0x + 4 bytes of the function signature + TransactionHash: transaction.Hash, + TransactionIndex: transaction.TransactionIndex, + Type: transaction.TransactionType, + Path: "", + }) + } + + return blocksProto, transactionsProto, blockIndex, transactionIndex, blocksCache, nil +} + +func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]indexer.BlockCache) ([]proto.Message, []indexer.LogIndex, error) { + + parsedEvents, err := c.ParseEvents(from, to, blocksCahche) + + if err != nil { + return nil, nil, err + } + + var eventsProto []proto.Message + var eventsIndex []indexer.LogIndex + for index, event := range parsedEvents { + eventsProto = append(eventsProto, event) // Assuming event is already a proto.Message + + var topic0, topic1, topic2 *string + + if len(event.Topics) == 0 { + fmt.Println("No topics found for event: ", event) + } else { + topic0 = &event.Topics[0] // First topic + } + + // Assign topics based on availability + if len(event.Topics) > 1 { + topic1 = &event.Topics[1] // Second topic, if present + } + if len(event.Topics) > 2 { + topic2 = &event.Topics[2] // Third topic, if present + } + + eventsIndex = append(eventsIndex, indexer.LogIndex{ + Address: event.Address, + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + BlockTimestamp: blocksCahche[event.BlockNumber].BlockTimestamp, + TransactionHash: event.TransactionHash, + Selector: topic0, // First topic + Topic1: topic1, + Topic2: topic2, + RowID: uint64(index), + LogIndex: event.LogIndex, + Path: "", + }) + } + + return eventsProto, eventsIndex, nil + +} +func ToProtoSingleBlock(obj *seer_common.BlockJson) *MantleSepoliaBlock { + return &MantleSepoliaBlock{ + BlockNumber: obj.BlockNumber, + Difficulty: obj.Difficulty, + ExtraData: obj.ExtraData, + GasLimit: obj.GasLimit, + GasUsed: obj.GasUsed, + BaseFeePerGas: obj.BaseFeePerGas, + Hash: obj.Hash, + LogsBloom: obj.LogsBloom, + Miner: obj.Miner, + Nonce: obj.Nonce, + ParentHash: obj.ParentHash, + ReceiptsRoot: obj.ReceiptsRoot, + Sha3Uncles: obj.Sha3Uncles, + Size: obj.Size, + StateRoot: obj.StateRoot, + Timestamp: obj.Timestamp, + TotalDifficulty: obj.TotalDifficulty, + TransactionsRoot: obj.TransactionsRoot, + IndexedAt: obj.IndexedAt, + } +} + +func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *MantleSepoliaTransaction { + return &MantleSepoliaTransaction{ + Hash: obj.Hash, + BlockNumber: obj.BlockNumber, + BlockHash: obj.BlockHash, + FromAddress: obj.FromAddress, + ToAddress: obj.ToAddress, + Gas: obj.Gas, + GasPrice: obj.GasPrice, + MaxFeePerGas: obj.MaxFeePerGas, + MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, + Input: obj.Input, + Nonce: obj.Nonce, + TransactionIndex: obj.TransactionIndex, + TransactionType: obj.TransactionType, + Value: obj.Value, + IndexedAt: obj.IndexedAt, + BlockTimestamp: obj.BlockTimestamp, + + ChainId: obj.ChainId, + V: obj.V, + R: obj.R, + S: obj.S, + + AccessList: obj.AccessList, + YParity: obj.YParity, + } +} + +func ToProtoSingleEventLog(obj *seer_common.EventJson) *MantleSepoliaEventLog { + + return &MantleSepoliaEventLog{ + Address: obj.Address, + Topics: obj.Topics, + Data: obj.Data, + BlockNumber: obj.BlockNumber, + TransactionHash: obj.TransactionHash, + LogIndex: obj.LogIndex, + BlockHash: obj.BlockHash, + Removed: obj.Removed, + } +} + +func (c *Client) DecodeProtoEventLogs(data []string) ([]*MantleSepoliaEventLog, error) { + var events []*MantleSepoliaEventLog + for _, d := range data { + var event MantleSepoliaEventLog + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &event); err != nil { + return nil, err + } + events = append(events, &event) + } + return events, nil +} + +func (c *Client) DecodeProtoTransactions(data []string) ([]*MantleSepoliaTransaction, error) { + var transactions []*MantleSepoliaTransaction + for _, d := range data { + var transaction MantleSepoliaTransaction + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &transaction); err != nil { + return nil, err + } + transactions = append(transactions, &transaction) + } + return transactions, nil +} + +func (c *Client) DecodeProtoBlocks(data []string) ([]*MantleSepoliaBlock, error) { + var blocks []*MantleSepoliaBlock + for _, d := range data { + var block MantleSepoliaBlock + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &block); err != nil { + return nil, err + } + blocks = append(blocks, &block) + } + return blocks, nil +} + +func (c *Client) DecodeProtoEventsToLabels(events []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.EventLabel, error) { + + decodedEvents, err := c.DecodeProtoEventLogs(events) + + if err != nil { + return nil, err + } + + var labels []indexer.EventLabel + + for _, event := range decodedEvents { + + var topicSelector string + + if len(event.Topics) > 0 { + topicSelector = event.Topics[0][:10] + } else { + continue + } + + checksumAddress := common.HexToAddress(event.Address).Hex() + + // Get the ABI string + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][topicSelector]["abi"])) + if err != nil { + fmt.Println("Error initializing contract ABI: ", err) + return nil, err + } + + // Decode the event data + decodedArgs, err := seer_common.DecodeLogArgsToLabelData(&contractAbi, event.Topics, event.Data) + + if err != nil { + fmt.Println("Error decoding event data: ", err) + return nil, err + } + + // Convert decodedArgs map to JSON + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert event to label + eventLabel := indexer.EventLabel{ + Label: indexer.SeerCrawlerLabel, + LabelName: abiMap[checksumAddress][topicSelector]["abi_name"], + LabelType: "event", + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + Address: event.Address, + TransactionHash: event.TransactionHash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[event.BlockNumber], + LogIndex: event.LogIndex, + } + + labels = append(labels, eventLabel) + + } + + return labels, nil +} + +func (c *Client) DecodeProtoTransactionsToLabels(transactions []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.TransactionLabel, error) { + + decodedTransactions, err := c.DecodeProtoTransactions(transactions) + + if err != nil { + return nil, err + } + + var labels []indexer.TransactionLabel + + for _, transaction := range decodedTransactions { + + selector := transaction.Input[:10] + + // To checksum address + checksumAddress := common.HexToAddress(transaction.ToAddress).Hex() + + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][selector]["abi"])) + + if err != nil { + return nil, err + } + + inputData, err := hex.DecodeString(transaction.Input[2:]) + if err != nil { + fmt.Println("Error decoding input data: ", err) + return nil, err + } + + decodedArgs, err := seer_common.DecodeTransactionInputDataToInterface(&contractAbi, inputData) + + if err != nil { + fmt.Println("Error decoding transaction input data: ", err) + return nil, err + } + + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert transaction to label + transactionLabel := indexer.TransactionLabel{ + Address: transaction.ToAddress, + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + CallerAddress: transaction.FromAddress, + LabelName: abiMap[checksumAddress][selector]["abi_name"], + LabelType: "tx_call", + OriginAddress: transaction.FromAddress, + Label: indexer.SeerCrawlerLabel, + TransactionHash: transaction.Hash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[transaction.BlockNumber], + } + + labels = append(labels, transactionLabel) + + } + + return labels, nil +} diff --git a/blockchain/mantle_sepolia/mantle_sepolia_index_types.pb.go b/blockchain/mantle_sepolia/mantle_sepolia_index_types.pb.go new file mode 100644 index 0000000..2bd7377 --- /dev/null +++ b/blockchain/mantle_sepolia/mantle_sepolia_index_types.pb.go @@ -0,0 +1,751 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.1 +// protoc v3.6.1 +// source: mantle_sepolia_index_types.proto + +package mantle_sepolia + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents a single transaction within a block +type MantleSepoliaTransaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types +} + +func (x *MantleSepoliaTransaction) Reset() { + *x = MantleSepoliaTransaction{} + if protoimpl.UnsafeEnabled { + mi := &file_mantle_sepolia_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MantleSepoliaTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MantleSepoliaTransaction) ProtoMessage() {} + +func (x *MantleSepoliaTransaction) ProtoReflect() protoreflect.Message { + mi := &file_mantle_sepolia_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MantleSepoliaTransaction.ProtoReflect.Descriptor instead. +func (*MantleSepoliaTransaction) Descriptor() ([]byte, []int) { + return file_mantle_sepolia_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *MantleSepoliaTransaction) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *MantleSepoliaTransaction) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *MantleSepoliaTransaction) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *MantleSepoliaTransaction) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *MantleSepoliaTransaction) GetGas() string { + if x != nil { + return x.Gas + } + return "" +} + +func (x *MantleSepoliaTransaction) GetGasPrice() string { + if x != nil { + return x.GasPrice + } + return "" +} + +func (x *MantleSepoliaTransaction) GetMaxFeePerGas() string { + if x != nil { + return x.MaxFeePerGas + } + return "" +} + +func (x *MantleSepoliaTransaction) GetMaxPriorityFeePerGas() string { + if x != nil { + return x.MaxPriorityFeePerGas + } + return "" +} + +func (x *MantleSepoliaTransaction) GetInput() string { + if x != nil { + return x.Input + } + return "" +} + +func (x *MantleSepoliaTransaction) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *MantleSepoliaTransaction) GetTransactionIndex() uint64 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +func (x *MantleSepoliaTransaction) GetTransactionType() uint64 { + if x != nil { + return x.TransactionType + } + return 0 +} + +func (x *MantleSepoliaTransaction) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *MantleSepoliaTransaction) GetIndexedAt() uint64 { + if x != nil { + return x.IndexedAt + } + return 0 +} + +func (x *MantleSepoliaTransaction) GetBlockTimestamp() uint64 { + if x != nil { + return x.BlockTimestamp + } + return 0 +} + +func (x *MantleSepoliaTransaction) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *MantleSepoliaTransaction) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *MantleSepoliaTransaction) GetV() string { + if x != nil { + return x.V + } + return "" +} + +func (x *MantleSepoliaTransaction) GetR() string { + if x != nil { + return x.R + } + return "" +} + +func (x *MantleSepoliaTransaction) GetS() string { + if x != nil { + return x.S + } + return "" +} + +func (x *MantleSepoliaTransaction) GetAccessList() []string { + if x != nil { + return x.AccessList + } + return nil +} + +func (x *MantleSepoliaTransaction) GetYParity() string { + if x != nil { + return x.YParity + } + return "" +} + +// Represents a block in the blockchain +type MantleSepoliaBlock struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number + Difficulty uint64 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty,omitempty"` // The difficulty of this block + ExtraData string `protobuf:"bytes,3,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"` // Extra data included in the block + GasLimit uint64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // The gas limit for this block + GasUsed uint64 `protobuf:"varint,5,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` // The total gas used by all transactions in this block + BaseFeePerGas string `protobuf:"bytes,6,opt,name=base_fee_per_gas,json=baseFeePerGas,proto3" json:"base_fee_per_gas,omitempty"` // The base fee per gas for this block + Hash string `protobuf:"bytes,7,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of this block + LogsBloom string `protobuf:"bytes,8,opt,name=logs_bloom,json=logsBloom,proto3" json:"logs_bloom,omitempty"` // The logs bloom filter for this block + Miner string `protobuf:"bytes,9,opt,name=miner,proto3" json:"miner,omitempty"` // The address of the miner who mined this block + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of this block + ParentHash string `protobuf:"bytes,11,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` // The hash of the parent block + ReceiptsRoot string `protobuf:"bytes,12,opt,name=receipts_root,json=receiptsRoot,proto3" json:"receipts_root,omitempty"` // The root hash of the receipts trie + Sha3Uncles string `protobuf:"bytes,13,opt,name=sha3_uncles,json=sha3Uncles,proto3" json:"sha3_uncles,omitempty"` // The SHA3 hash of the uncles data in this block + Size uint64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"` // The size of this block + StateRoot string `protobuf:"bytes,15,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` // The root hash of the state trie + Timestamp uint64 `protobuf:"varint,16,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + TotalDifficulty string `protobuf:"bytes,17,opt,name=total_difficulty,json=totalDifficulty,proto3" json:"total_difficulty,omitempty"` // The total difficulty of the chain until this block + TransactionsRoot string `protobuf:"bytes,18,opt,name=transactions_root,json=transactionsRoot,proto3" json:"transactions_root,omitempty"` // The root hash of the transactions trie + IndexedAt uint64 `protobuf:"varint,19,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the block was indexed by crawler + Transactions []*MantleSepoliaTransaction `protobuf:"bytes,20,rep,name=transactions,proto3" json:"transactions,omitempty"` // The transactions included in this block +} + +func (x *MantleSepoliaBlock) Reset() { + *x = MantleSepoliaBlock{} + if protoimpl.UnsafeEnabled { + mi := &file_mantle_sepolia_index_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MantleSepoliaBlock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MantleSepoliaBlock) ProtoMessage() {} + +func (x *MantleSepoliaBlock) ProtoReflect() protoreflect.Message { + mi := &file_mantle_sepolia_index_types_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MantleSepoliaBlock.ProtoReflect.Descriptor instead. +func (*MantleSepoliaBlock) Descriptor() ([]byte, []int) { + return file_mantle_sepolia_index_types_proto_rawDescGZIP(), []int{1} +} + +func (x *MantleSepoliaBlock) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *MantleSepoliaBlock) GetDifficulty() uint64 { + if x != nil { + return x.Difficulty + } + return 0 +} + +func (x *MantleSepoliaBlock) GetExtraData() string { + if x != nil { + return x.ExtraData + } + return "" +} + +func (x *MantleSepoliaBlock) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *MantleSepoliaBlock) GetGasUsed() uint64 { + if x != nil { + return x.GasUsed + } + return 0 +} + +func (x *MantleSepoliaBlock) GetBaseFeePerGas() string { + if x != nil { + return x.BaseFeePerGas + } + return "" +} + +func (x *MantleSepoliaBlock) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *MantleSepoliaBlock) GetLogsBloom() string { + if x != nil { + return x.LogsBloom + } + return "" +} + +func (x *MantleSepoliaBlock) GetMiner() string { + if x != nil { + return x.Miner + } + return "" +} + +func (x *MantleSepoliaBlock) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *MantleSepoliaBlock) GetParentHash() string { + if x != nil { + return x.ParentHash + } + return "" +} + +func (x *MantleSepoliaBlock) GetReceiptsRoot() string { + if x != nil { + return x.ReceiptsRoot + } + return "" +} + +func (x *MantleSepoliaBlock) GetSha3Uncles() string { + if x != nil { + return x.Sha3Uncles + } + return "" +} + +func (x *MantleSepoliaBlock) GetSize() uint64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *MantleSepoliaBlock) GetStateRoot() string { + if x != nil { + return x.StateRoot + } + return "" +} + +func (x *MantleSepoliaBlock) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *MantleSepoliaBlock) GetTotalDifficulty() string { + if x != nil { + return x.TotalDifficulty + } + return "" +} + +func (x *MantleSepoliaBlock) GetTransactionsRoot() string { + if x != nil { + return x.TransactionsRoot + } + return "" +} + +func (x *MantleSepoliaBlock) GetIndexedAt() uint64 { + if x != nil { + return x.IndexedAt + } + return 0 +} + +func (x *MantleSepoliaBlock) GetTransactions() []*MantleSepoliaTransaction { + if x != nil { + return x.Transactions + } + return nil +} + +type MantleSepoliaEventLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // The address of the contract that generated the log + Topics []string `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"` // Topics are indexed parameters during log generation + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // The data field from the log + BlockNumber uint64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number where this log was in + TransactionHash string `protobuf:"bytes,5,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` // The hash of the transaction that generated this log + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block where this log was in + Removed bool `protobuf:"varint,7,opt,name=removed,proto3" json:"removed,omitempty"` // True if the log was reverted due to a chain reorganization + LogIndex uint64 `protobuf:"varint,8,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // The index of the log in the block + TransactionIndex uint64 `protobuf:"varint,9,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block +} + +func (x *MantleSepoliaEventLog) Reset() { + *x = MantleSepoliaEventLog{} + if protoimpl.UnsafeEnabled { + mi := &file_mantle_sepolia_index_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MantleSepoliaEventLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MantleSepoliaEventLog) ProtoMessage() {} + +func (x *MantleSepoliaEventLog) ProtoReflect() protoreflect.Message { + mi := &file_mantle_sepolia_index_types_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MantleSepoliaEventLog.ProtoReflect.Descriptor instead. +func (*MantleSepoliaEventLog) Descriptor() ([]byte, []int) { + return file_mantle_sepolia_index_types_proto_rawDescGZIP(), []int{2} +} + +func (x *MantleSepoliaEventLog) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *MantleSepoliaEventLog) GetTopics() []string { + if x != nil { + return x.Topics + } + return nil +} + +func (x *MantleSepoliaEventLog) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *MantleSepoliaEventLog) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *MantleSepoliaEventLog) GetTransactionHash() string { + if x != nil { + return x.TransactionHash + } + return "" +} + +func (x *MantleSepoliaEventLog) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *MantleSepoliaEventLog) GetRemoved() bool { + if x != nil { + return x.Removed + } + return false +} + +func (x *MantleSepoliaEventLog) GetLogIndex() uint64 { + if x != nil { + return x.LogIndex + } + return 0 +} + +func (x *MantleSepoliaEventLog) GetTransactionIndex() uint64 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +var File_mantle_sepolia_index_types_proto protoreflect.FileDescriptor + +var file_mantle_sepolia_index_types_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x6d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xa3, 0x05, 0x0a, 0x18, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x53, 0x65, 0x70, + 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, + 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, + 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, + 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, + 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, + 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x66, + 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x36, + 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, + 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, + 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, + 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76, + 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x0c, + 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x1f, 0x0a, 0x0b, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, + 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0xa4, 0x05, 0x0a, 0x12, 0x4d, 0x61, 0x6e, + 0x74, 0x6c, 0x65, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, + 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, + 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, + 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, + 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, + 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, + 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, + 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, + 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, + 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x3d, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x53, + 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0xae, 0x02, 0x0a, 0x15, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, + 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, + 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x42, 0x11, 0x5a, 0x0f, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x70, 0x6f, + 0x6c, 0x69, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_mantle_sepolia_index_types_proto_rawDescOnce sync.Once + file_mantle_sepolia_index_types_proto_rawDescData = file_mantle_sepolia_index_types_proto_rawDesc +) + +func file_mantle_sepolia_index_types_proto_rawDescGZIP() []byte { + file_mantle_sepolia_index_types_proto_rawDescOnce.Do(func() { + file_mantle_sepolia_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_mantle_sepolia_index_types_proto_rawDescData) + }) + return file_mantle_sepolia_index_types_proto_rawDescData +} + +var file_mantle_sepolia_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_mantle_sepolia_index_types_proto_goTypes = []interface{}{ + (*MantleSepoliaTransaction)(nil), // 0: MantleSepoliaTransaction + (*MantleSepoliaBlock)(nil), // 1: MantleSepoliaBlock + (*MantleSepoliaEventLog)(nil), // 2: MantleSepoliaEventLog +} +var file_mantle_sepolia_index_types_proto_depIdxs = []int32{ + 0, // 0: MantleSepoliaBlock.transactions:type_name -> MantleSepoliaTransaction + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_mantle_sepolia_index_types_proto_init() } +func file_mantle_sepolia_index_types_proto_init() { + if File_mantle_sepolia_index_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mantle_sepolia_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MantleSepoliaTransaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mantle_sepolia_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MantleSepoliaBlock); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mantle_sepolia_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MantleSepoliaEventLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mantle_sepolia_index_types_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mantle_sepolia_index_types_proto_goTypes, + DependencyIndexes: file_mantle_sepolia_index_types_proto_depIdxs, + MessageInfos: file_mantle_sepolia_index_types_proto_msgTypes, + }.Build() + File_mantle_sepolia_index_types_proto = out.File + file_mantle_sepolia_index_types_proto_rawDesc = nil + file_mantle_sepolia_index_types_proto_goTypes = nil + file_mantle_sepolia_index_types_proto_depIdxs = nil +} diff --git a/blockchain/mantle_sepolia/mantle_sepolia_index_types.proto b/blockchain/mantle_sepolia/mantle_sepolia_index_types.proto new file mode 100644 index 0000000..900e44e --- /dev/null +++ b/blockchain/mantle_sepolia/mantle_sepolia_index_types.proto @@ -0,0 +1,67 @@ +syntax = "proto3"; + +option go_package = ".mantle_sepolia"; + + +// Represents a single transaction within a block +message MantleSepoliaTransaction { + string hash = 1; // The hash of the transaction + uint64 block_number = 2; // The block number the transaction is in + string from_address = 3; // The address the transaction is sent from + string to_address = 4; // The address the transaction is sent to + string gas = 5; // The gas limit of the transaction + string gas_price = 6; // The gas price of the transaction + string max_fee_per_gas = 7; // Used as a field to match potential EIP-1559 transaction types + string max_priority_fee_per_gas = 8; // Used as a field to match potential EIP-1559 transaction types + string input = 9; // The input data of the transaction + string nonce = 10; // The nonce of the transaction + uint64 transaction_index = 11; // The index of the transaction in the block + uint64 transaction_type = 12; // Field to match potential EIP-1559 transaction types + string value = 13; // The value of the transaction + uint64 indexed_at = 14; // When the transaction was indexed by crawler + uint64 block_timestamp = 15; // The timestamp of this block + string block_hash = 16; // The hash of the block the transaction is in + string chain_id = 17; // Used as a field to match potential EIP-1559 transaction types + string v = 18; // Used as a field to match potential EIP-1559 transaction types + string r = 19; // Used as a field to match potential EIP-1559 transaction types + string s = 20; // Used as a field to match potential EIP-1559 transaction types + + repeated string access_list = 21; + string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types +} + +// Represents a block in the blockchain +message MantleSepoliaBlock { + uint64 block_number = 1; // The block number + uint64 difficulty = 2; // The difficulty of this block + string extra_data = 3; // Extra data included in the block + uint64 gas_limit = 4; // The gas limit for this block + uint64 gas_used = 5; // The total gas used by all transactions in this block + string base_fee_per_gas = 6; // The base fee per gas for this block + string hash = 7; // The hash of this block + string logs_bloom = 8; // The logs bloom filter for this block + string miner = 9; // The address of the miner who mined this block + string nonce = 10; // The nonce of this block + string parent_hash = 11; // The hash of the parent block + string receipts_root = 12; // The root hash of the receipts trie + string sha3_uncles = 13; // The SHA3 hash of the uncles data in this block + uint64 size = 14; // The size of this block + string state_root = 15; // The root hash of the state trie + uint64 timestamp = 16; + string total_difficulty = 17; // The total difficulty of the chain until this block + string transactions_root = 18; // The root hash of the transactions trie + uint64 indexed_at = 19; // When the block was indexed by crawler + repeated MantleSepoliaTransaction transactions = 20; // The transactions included in this block +} + +message MantleSepoliaEventLog { + string address = 1; // The address of the contract that generated the log + repeated string topics = 2; // Topics are indexed parameters during log generation + string data = 3; // The data field from the log + uint64 block_number = 4; // The block number where this log was in + string transaction_hash = 5; // The hash of the transaction that generated this log + string block_hash = 6; // The hash of the block where this log was in + bool removed = 7; // True if the log was reverted due to a chain reorganization + uint64 log_index = 8; // The index of the log in the block + uint64 transaction_index = 9; // The index of the transaction in the block +} \ No newline at end of file diff --git a/blockchain/polygon/polygon.go b/blockchain/polygon/polygon.go index 51d2478..e21177c 100644 --- a/blockchain/polygon/polygon.go +++ b/blockchain/polygon/polygon.go @@ -398,6 +398,9 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *PolygonTransact V: obj.V, R: obj.R, S: obj.S, + + AccessList: obj.AccessList, + YParity: obj.YParity, } } diff --git a/blockchain/polygon/polygon_index_types.pb.go b/blockchain/polygon/polygon_index_types.pb.go index b27fc6c..64148c2 100644 --- a/blockchain/polygon/polygon_index_types.pb.go +++ b/blockchain/polygon/polygon_index_types.pb.go @@ -47,6 +47,7 @@ type PolygonTransaction struct { R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types } func (x *PolygonTransaction) Reset() { @@ -228,6 +229,13 @@ func (x *PolygonTransaction) GetAccessList() []string { return nil } +func (x *PolygonTransaction) GetYParity() string { + if x != nil { + return x.YParity + } + return "" +} + // Represents a single blockchain block type PolygonBlock struct { state protoimpl.MessageState @@ -543,7 +551,7 @@ var File_polygon_index_types_proto protoreflect.FileDescriptor var file_polygon_index_types_proto_rawDesc = []byte{ 0x0a, 0x19, 0x70, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x05, 0x0a, 0x12, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x05, 0x0a, 0x12, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, @@ -584,68 +592,70 @@ var file_polygon_index_types_proto_rawDesc = []byte{ 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, - 0x22, 0x98, 0x05, 0x0a, 0x0c, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, - 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, - 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, - 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, - 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, - 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, - 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, - 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, - 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, - 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, - 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa8, 0x02, 0x0a, 0x0f, - 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, - 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, - 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, - 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x70, 0x6f, 0x6c, 0x79, 0x67, - 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0x98, 0x05, 0x0a, 0x0c, + 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, + 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, + 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, + 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, + 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, + 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, + 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, + 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, + 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, + 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, + 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, + 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, + 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, + 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x37, 0x0a, + 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa8, 0x02, 0x0a, 0x0f, 0x50, 0x6f, 0x6c, 0x79, 0x67, + 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, + 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, + 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x70, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/blockchain/polygon/polygon_index_types.proto b/blockchain/polygon/polygon_index_types.proto index 36f0ac0..df58b1e 100644 --- a/blockchain/polygon/polygon_index_types.proto +++ b/blockchain/polygon/polygon_index_types.proto @@ -25,7 +25,9 @@ message PolygonTransaction { string v = 18; // Used as a field to match potential EIP-1559 transaction types string r = 19; // Used as a field to match potential EIP-1559 transaction types string s = 20; // Used as a field to match potential EIP-1559 transaction types + repeated string access_list = 21; + string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types } // Represents a single blockchain block diff --git a/blockchain/xai/xai.go b/blockchain/xai/xai.go new file mode 100644 index 0000000..6458828 --- /dev/null +++ b/blockchain/xai/xai.go @@ -0,0 +1,605 @@ +package xai + +import ( + "context" + "encoding/base64" + "encoding/hex" + "encoding/json" + "fmt" + "math/big" + "strings" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rpc" + seer_common "github.com/moonstream-to/seer/blockchain/common" + "github.com/moonstream-to/seer/indexer" + "google.golang.org/protobuf/proto" +) + +func NewClient(url string) (*Client, error) { + rpcClient, err := rpc.DialContext(context.Background(), url) + if err != nil { + return nil, err + } + return &Client{rpcClient: rpcClient}, nil +} + +// Client is a wrapper around the Ethereum JSON-RPC client. + +type Client struct { + rpcClient *rpc.Client +} + +// Client common + +// ChainType returns the chain type. +func (c *Client) ChainType() string { + return "xai" +} + +// Close closes the underlying RPC client. +func (c *Client) Close() { + c.rpcClient.Close() +} + +// GetLatestBlockNumber returns the latest block number. +func (c *Client) GetLatestBlockNumber() (*big.Int, error) { + var result string + if err := c.rpcClient.CallContext(context.Background(), &result, "eth_blockNumber"); err != nil { + return nil, err + } + + // Convert the hex string to a big.Int + blockNumber, ok := new(big.Int).SetString(result, 0) // The 0 base lets the function infer the base from the string prefix. + if !ok { + return nil, fmt.Errorf("invalid block number format: %s", result) + } + + return blockNumber, nil +} + +// BlockByNumber returns the block with the given number. +func (c *Client) GetBlockByNumber(ctx context.Context, number *big.Int) (*seer_common.BlockJson, error) { + + var rawResponse json.RawMessage // Use RawMessage to capture the entire JSON response + err := c.rpcClient.CallContext(ctx, &rawResponse, "eth_getBlockByNumber", "0x"+number.Text(16), true) + if err != nil { + fmt.Println("Error calling eth_getBlockByNumber: ", err) + return nil, err + } + + var response_json map[string]interface{} + + err = json.Unmarshal(rawResponse, &response_json) + + delete(response_json, "transactions") + + var block *seer_common.BlockJson + err = c.rpcClient.CallContext(ctx, &block, "eth_getBlockByNumber", "0x"+number.Text(16), true) // true to include transactions + return block, err +} + +// BlockByHash returns the block with the given hash. +func (c *Client) BlockByHash(ctx context.Context, hash common.Hash) (*seer_common.BlockJson, error) { + var block *seer_common.BlockJson + err := c.rpcClient.CallContext(ctx, &block, "eth_getBlockByHash", hash, true) // true to include transactions + return block, err +} + +// TransactionReceipt returns the receipt of a transaction by transaction hash. +func (c *Client) TransactionReceipt(ctx context.Context, hash common.Hash) (*types.Receipt, error) { + var receipt *types.Receipt + err := c.rpcClient.CallContext(ctx, &receipt, "eth_getTransactionReceipt", hash) + return receipt, err +} + +func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]*seer_common.EventJson, error) { + var logs []*seer_common.EventJson + fromBlock := q.FromBlock + toBlock := q.ToBlock + batchStep := new(big.Int).Sub(toBlock, fromBlock) // Calculate initial batch step + + for { + // Calculate the next "lastBlock" within the batch step or adjust to "toBlock" if exceeding + nextBlock := new(big.Int).Add(fromBlock, batchStep) + if nextBlock.Cmp(toBlock) > 0 { + nextBlock = new(big.Int).Set(toBlock) + } + + var result []*seer_common.EventJson + err := c.rpcClient.CallContext(ctx, &result, "eth_getLogs", struct { + FromBlock string `json:"fromBlock"` + ToBlock string `json:"toBlock"` + Addresses []common.Address `json:"addresses"` + Topics [][]common.Hash `json:"topics"` + }{ + FromBlock: toHex(fromBlock), + ToBlock: toHex(nextBlock), + Addresses: q.Addresses, + Topics: q.Topics, + }) + + if err != nil { + if strings.Contains(err.Error(), "query returned more than 10000 results") { + // Halve the batch step if too many results and retry + batchStep.Div(batchStep, big.NewInt(2)) + if batchStep.Cmp(big.NewInt(1)) < 0 { + // If the batch step is too small we will skip that block + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + if fromBlock.Cmp(toBlock) > 0 { + break + } + continue + } + continue + } else { + // For any other error, return immediately + return nil, err + } + } + + // Append the results and adjust "fromBlock" for the next batch + logs = append(logs, result...) + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + + // Break the loop if we've reached or exceeded "toBlock" + if fromBlock.Cmp(toBlock) > 0 { + break + } + } + + return logs, nil +} + +// fetchBlocks returns the blocks for a given range. +func (c *Client) fetchBlocks(ctx context.Context, from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + + for i := from; i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + return blocks, nil +} + +// Utility function to convert big.Int to its hexadecimal representation. +func toHex(number *big.Int) string { + return fmt.Sprintf("0x%x", number) +} + +func fromHex(hex string) *big.Int { + number := new(big.Int) + number.SetString(hex, 0) + return number +} + +// FetchBlocksInRange fetches blocks within a specified range. +// This could be useful for batch processing or analysis. +func (c *Client) FetchBlocksInRange(from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + ctx := context.Background() // For simplicity, using a background context; consider timeouts for production. + + for i := new(big.Int).Set(from); i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + fmt.Println("Block number: ", i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + + return blocks, nil +} + +// ParseBlocksAndTransactions parses blocks and their transactions into custom data structures. +// This method showcases how to handle and transform detailed block and transaction data. +func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*XaiBlock, []*XaiTransaction, error) { + blocksJson, err := c.FetchBlocksInRange(from, to) + if err != nil { + return nil, nil, err + } + + var parsedBlocks []*XaiBlock + var parsedTransactions []*XaiTransaction + for _, blockJson := range blocksJson { + // Convert BlockJson to Block and Transactions as required. + parsedBlock := ToProtoSingleBlock(blockJson) + + // Example: Parsing transactions within the block + for _, txJson := range blockJson.Transactions { + + txJson.BlockTimestamp = blockJson.Timestamp + + parsedTransaction := ToProtoSingleTransaction(&txJson) + parsedTransactions = append(parsedTransactions, parsedTransaction) + } + + parsedBlocks = append(parsedBlocks, parsedBlock) + } + + return parsedBlocks, parsedTransactions, nil +} + +func (c *Client) ParseEvents(from, to *big.Int, blocksCache map[uint64]indexer.BlockCache) ([]*XaiEventLog, error) { + + logs, err := c.ClientFilterLogs(context.Background(), ethereum.FilterQuery{ + FromBlock: from, + ToBlock: to, + }) + + if err != nil { + fmt.Println("Error fetching logs: ", err) + return nil, err + } + + var parsedEvents []*XaiEventLog + for _, log := range logs { + parsedEvent := ToProtoSingleEventLog(log) + parsedEvents = append(parsedEvents, parsedEvent) + } + + return parsedEvents, nil +} + +func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCache, error) { + parsedBlocks, parsedTransactions, err := c.ParseBlocksAndTransactions(from, to) + + if err != nil { + return nil, nil, nil, nil, nil, err + } + + blocksCache := make(map[uint64]indexer.BlockCache) + + var blocksProto []proto.Message + var blockIndex []indexer.BlockIndex + for index, block := range parsedBlocks { + blocksProto = append(blocksProto, block) // Assuming block is already a proto.Message + blocksCache[block.BlockNumber] = indexer.BlockCache{ + BlockNumber: block.BlockNumber, + BlockHash: block.Hash, + BlockTimestamp: block.Timestamp, + } // Assuming block.BlockNumber is int64 and block.Hash is string + blockIndex = append(blockIndex, indexer.NewBlockIndex("xai", + block.BlockNumber, + block.Hash, + block.Timestamp, + block.ParentHash, + uint64(index), + "", + )) + } + + var transactionsProto []proto.Message + var transactionIndex []indexer.TransactionIndex + for index, transaction := range parsedTransactions { + transactionsProto = append(transactionsProto, transaction) // Assuming transaction is also a proto.Message + + selector := "0x" + + if len(transaction.Input) > 10 { + selector = transaction.Input[:10] + } + + transactionIndex = append(transactionIndex, indexer.TransactionIndex{ + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + BlockTimestamp: transaction.BlockTimestamp, + FromAddress: transaction.FromAddress, + ToAddress: transaction.ToAddress, + RowID: uint64(index), + Selector: selector, // First 10 characters of the input data 0x + 4 bytes of the function signature + TransactionHash: transaction.Hash, + TransactionIndex: transaction.TransactionIndex, + Type: transaction.TransactionType, + Path: "", + }) + } + + return blocksProto, transactionsProto, blockIndex, transactionIndex, blocksCache, nil +} + +func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]indexer.BlockCache) ([]proto.Message, []indexer.LogIndex, error) { + + parsedEvents, err := c.ParseEvents(from, to, blocksCahche) + + if err != nil { + return nil, nil, err + } + + var eventsProto []proto.Message + var eventsIndex []indexer.LogIndex + for index, event := range parsedEvents { + eventsProto = append(eventsProto, event) // Assuming event is already a proto.Message + + var topic0, topic1, topic2 *string + + if len(event.Topics) == 0 { + fmt.Println("No topics found for event: ", event) + } else { + topic0 = &event.Topics[0] // First topic + } + + // Assign topics based on availability + if len(event.Topics) > 1 { + topic1 = &event.Topics[1] // Second topic, if present + } + if len(event.Topics) > 2 { + topic2 = &event.Topics[2] // Third topic, if present + } + + eventsIndex = append(eventsIndex, indexer.LogIndex{ + Address: event.Address, + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + BlockTimestamp: blocksCahche[event.BlockNumber].BlockTimestamp, + TransactionHash: event.TransactionHash, + Selector: topic0, // First topic + Topic1: topic1, + Topic2: topic2, + RowID: uint64(index), + LogIndex: event.LogIndex, + Path: "", + }) + } + + return eventsProto, eventsIndex, nil + +} +func ToProtoSingleBlock(obj *seer_common.BlockJson) *XaiBlock { + return &XaiBlock{ + BlockNumber: obj.BlockNumber, + Difficulty: obj.Difficulty, + ExtraData: obj.ExtraData, + GasLimit: obj.GasLimit, + GasUsed: obj.GasUsed, + BaseFeePerGas: obj.BaseFeePerGas, + Hash: obj.Hash, + LogsBloom: obj.LogsBloom, + Miner: obj.Miner, + Nonce: obj.Nonce, + ParentHash: obj.ParentHash, + ReceiptsRoot: obj.ReceiptsRoot, + Sha3Uncles: obj.Sha3Uncles, + Size: obj.Size, + StateRoot: obj.StateRoot, + Timestamp: obj.Timestamp, + TotalDifficulty: obj.TotalDifficulty, + TransactionsRoot: obj.TransactionsRoot, + IndexedAt: obj.IndexedAt, + + MixHash: obj.MixHash, + SendCount: obj.SendCount, + SendRoot: obj.SendRoot, + L1BlockNumber: obj.L1BlockNumber, + } +} + +func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *XaiTransaction { + return &XaiTransaction{ + Hash: obj.Hash, + BlockNumber: obj.BlockNumber, + BlockHash: obj.BlockHash, + FromAddress: obj.FromAddress, + ToAddress: obj.ToAddress, + Gas: obj.Gas, + GasPrice: obj.GasPrice, + MaxFeePerGas: obj.MaxFeePerGas, + MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, + Input: obj.Input, + Nonce: obj.Nonce, + TransactionIndex: obj.TransactionIndex, + TransactionType: obj.TransactionType, + Value: obj.Value, + IndexedAt: obj.IndexedAt, + BlockTimestamp: obj.BlockTimestamp, + + ChainId: obj.ChainId, + V: obj.V, + R: obj.R, + S: obj.S, + + AccessList: obj.AccessList, + YParity: obj.YParity, + } +} + +func ToProtoSingleEventLog(obj *seer_common.EventJson) *XaiEventLog { + + return &XaiEventLog{ + Address: obj.Address, + Topics: obj.Topics, + Data: obj.Data, + BlockNumber: obj.BlockNumber, + TransactionHash: obj.TransactionHash, + LogIndex: obj.LogIndex, + BlockHash: obj.BlockHash, + Removed: obj.Removed, + } +} + +func (c *Client) DecodeProtoEventLogs(data []string) ([]*XaiEventLog, error) { + var events []*XaiEventLog + for _, d := range data { + var event XaiEventLog + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &event); err != nil { + return nil, err + } + events = append(events, &event) + } + return events, nil +} + +func (c *Client) DecodeProtoTransactions(data []string) ([]*XaiTransaction, error) { + var transactions []*XaiTransaction + for _, d := range data { + var transaction XaiTransaction + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &transaction); err != nil { + return nil, err + } + transactions = append(transactions, &transaction) + } + return transactions, nil +} + +func (c *Client) DecodeProtoBlocks(data []string) ([]*XaiBlock, error) { + var blocks []*XaiBlock + for _, d := range data { + var block XaiBlock + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &block); err != nil { + return nil, err + } + blocks = append(blocks, &block) + } + return blocks, nil +} + +func (c *Client) DecodeProtoEventsToLabels(events []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.EventLabel, error) { + + decodedEvents, err := c.DecodeProtoEventLogs(events) + + if err != nil { + return nil, err + } + + var labels []indexer.EventLabel + + for _, event := range decodedEvents { + + var topicSelector string + + if len(event.Topics) > 0 { + topicSelector = event.Topics[0][:10] + } else { + continue + } + + checksumAddress := common.HexToAddress(event.Address).Hex() + + // Get the ABI string + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][topicSelector]["abi"])) + if err != nil { + fmt.Println("Error initializing contract ABI: ", err) + return nil, err + } + + // Decode the event data + decodedArgs, err := seer_common.DecodeLogArgsToLabelData(&contractAbi, event.Topics, event.Data) + + if err != nil { + fmt.Println("Error decoding event data: ", err) + return nil, err + } + + // Convert decodedArgs map to JSON + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert event to label + eventLabel := indexer.EventLabel{ + Label: indexer.SeerCrawlerLabel, + LabelName: abiMap[checksumAddress][topicSelector]["abi_name"], + LabelType: "event", + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + Address: event.Address, + TransactionHash: event.TransactionHash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[event.BlockNumber], + LogIndex: event.LogIndex, + } + + labels = append(labels, eventLabel) + + } + + return labels, nil +} + +func (c *Client) DecodeProtoTransactionsToLabels(transactions []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.TransactionLabel, error) { + + decodedTransactions, err := c.DecodeProtoTransactions(transactions) + + if err != nil { + return nil, err + } + + var labels []indexer.TransactionLabel + + for _, transaction := range decodedTransactions { + + selector := transaction.Input[:10] + + // To checksum address + checksumAddress := common.HexToAddress(transaction.ToAddress).Hex() + + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][selector]["abi"])) + + if err != nil { + return nil, err + } + + inputData, err := hex.DecodeString(transaction.Input[2:]) + if err != nil { + fmt.Println("Error decoding input data: ", err) + return nil, err + } + + decodedArgs, err := seer_common.DecodeTransactionInputDataToInterface(&contractAbi, inputData) + + if err != nil { + fmt.Println("Error decoding transaction input data: ", err) + return nil, err + } + + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert transaction to label + transactionLabel := indexer.TransactionLabel{ + Address: transaction.ToAddress, + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + CallerAddress: transaction.FromAddress, + LabelName: abiMap[checksumAddress][selector]["abi_name"], + LabelType: "tx_call", + OriginAddress: transaction.FromAddress, + Label: indexer.SeerCrawlerLabel, + TransactionHash: transaction.Hash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[transaction.BlockNumber], + } + + labels = append(labels, transactionLabel) + + } + + return labels, nil +} diff --git a/blockchain/xai/xai_index_types.pb.go b/blockchain/xai/xai_index_types.pb.go new file mode 100644 index 0000000..b65aeea --- /dev/null +++ b/blockchain/xai/xai_index_types.pb.go @@ -0,0 +1,787 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.1 +// protoc v3.6.1 +// source: xai_index_types.proto + +package xai + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents a single transaction within a block +type XaiTransaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types +} + +func (x *XaiTransaction) Reset() { + *x = XaiTransaction{} + if protoimpl.UnsafeEnabled { + mi := &file_xai_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *XaiTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*XaiTransaction) ProtoMessage() {} + +func (x *XaiTransaction) ProtoReflect() protoreflect.Message { + mi := &file_xai_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use XaiTransaction.ProtoReflect.Descriptor instead. +func (*XaiTransaction) Descriptor() ([]byte, []int) { + return file_xai_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *XaiTransaction) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *XaiTransaction) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *XaiTransaction) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *XaiTransaction) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *XaiTransaction) GetGas() string { + if x != nil { + return x.Gas + } + return "" +} + +func (x *XaiTransaction) GetGasPrice() string { + if x != nil { + return x.GasPrice + } + return "" +} + +func (x *XaiTransaction) GetMaxFeePerGas() string { + if x != nil { + return x.MaxFeePerGas + } + return "" +} + +func (x *XaiTransaction) GetMaxPriorityFeePerGas() string { + if x != nil { + return x.MaxPriorityFeePerGas + } + return "" +} + +func (x *XaiTransaction) GetInput() string { + if x != nil { + return x.Input + } + return "" +} + +func (x *XaiTransaction) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *XaiTransaction) GetTransactionIndex() uint64 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +func (x *XaiTransaction) GetTransactionType() uint64 { + if x != nil { + return x.TransactionType + } + return 0 +} + +func (x *XaiTransaction) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *XaiTransaction) GetIndexedAt() uint64 { + if x != nil { + return x.IndexedAt + } + return 0 +} + +func (x *XaiTransaction) GetBlockTimestamp() uint64 { + if x != nil { + return x.BlockTimestamp + } + return 0 +} + +func (x *XaiTransaction) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *XaiTransaction) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *XaiTransaction) GetV() string { + if x != nil { + return x.V + } + return "" +} + +func (x *XaiTransaction) GetR() string { + if x != nil { + return x.R + } + return "" +} + +func (x *XaiTransaction) GetS() string { + if x != nil { + return x.S + } + return "" +} + +func (x *XaiTransaction) GetAccessList() []string { + if x != nil { + return x.AccessList + } + return nil +} + +func (x *XaiTransaction) GetYParity() string { + if x != nil { + return x.YParity + } + return "" +} + +// Represents a block in the blockchain +type XaiBlock struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number + Difficulty uint64 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty,omitempty"` // The difficulty of this block + ExtraData string `protobuf:"bytes,3,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"` // Extra data included in the block + GasLimit uint64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // The gas limit for this block + GasUsed uint64 `protobuf:"varint,5,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` // The total gas used by all transactions in this block + BaseFeePerGas string `protobuf:"bytes,6,opt,name=base_fee_per_gas,json=baseFeePerGas,proto3" json:"base_fee_per_gas,omitempty"` // The base fee per gas for this block + Hash string `protobuf:"bytes,7,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of this block + LogsBloom string `protobuf:"bytes,8,opt,name=logs_bloom,json=logsBloom,proto3" json:"logs_bloom,omitempty"` // The logs bloom filter for this block + Miner string `protobuf:"bytes,9,opt,name=miner,proto3" json:"miner,omitempty"` // The address of the miner who mined this block + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of this block + ParentHash string `protobuf:"bytes,11,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` // The hash of the parent block + ReceiptsRoot string `protobuf:"bytes,12,opt,name=receipts_root,json=receiptsRoot,proto3" json:"receipts_root,omitempty"` // The root hash of the receipts trie + Sha3Uncles string `protobuf:"bytes,13,opt,name=sha3_uncles,json=sha3Uncles,proto3" json:"sha3_uncles,omitempty"` // The SHA3 hash of the uncles data in this block + Size uint64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"` // The size of this block + StateRoot string `protobuf:"bytes,15,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` // The root hash of the state trie + Timestamp uint64 `protobuf:"varint,16,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + TotalDifficulty string `protobuf:"bytes,17,opt,name=total_difficulty,json=totalDifficulty,proto3" json:"total_difficulty,omitempty"` // The total difficulty of the chain until this block + TransactionsRoot string `protobuf:"bytes,18,opt,name=transactions_root,json=transactionsRoot,proto3" json:"transactions_root,omitempty"` // The root hash of the transactions trie + IndexedAt uint64 `protobuf:"varint,19,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the block was indexed by crawler + Transactions []*XaiTransaction `protobuf:"bytes,20,rep,name=transactions,proto3" json:"transactions,omitempty"` // The transactions included in this block + MixHash string `protobuf:"bytes,21,opt,name=mix_hash,json=mixHash,proto3" json:"mix_hash,omitempty"` // The timestamp of this block + SendCount string `protobuf:"bytes,22,opt,name=send_count,json=sendCount,proto3" json:"send_count,omitempty"` // The number of sends in this block + SendRoot string `protobuf:"bytes,23,opt,name=send_root,json=sendRoot,proto3" json:"send_root,omitempty"` // The root hash of the sends trie + L1BlockNumber uint64 `protobuf:"varint,24,opt,name=l1_block_number,json=l1BlockNumber,proto3" json:"l1_block_number,omitempty"` // The block number of the corresponding L1 block +} + +func (x *XaiBlock) Reset() { + *x = XaiBlock{} + if protoimpl.UnsafeEnabled { + mi := &file_xai_index_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *XaiBlock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*XaiBlock) ProtoMessage() {} + +func (x *XaiBlock) ProtoReflect() protoreflect.Message { + mi := &file_xai_index_types_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use XaiBlock.ProtoReflect.Descriptor instead. +func (*XaiBlock) Descriptor() ([]byte, []int) { + return file_xai_index_types_proto_rawDescGZIP(), []int{1} +} + +func (x *XaiBlock) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *XaiBlock) GetDifficulty() uint64 { + if x != nil { + return x.Difficulty + } + return 0 +} + +func (x *XaiBlock) GetExtraData() string { + if x != nil { + return x.ExtraData + } + return "" +} + +func (x *XaiBlock) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *XaiBlock) GetGasUsed() uint64 { + if x != nil { + return x.GasUsed + } + return 0 +} + +func (x *XaiBlock) GetBaseFeePerGas() string { + if x != nil { + return x.BaseFeePerGas + } + return "" +} + +func (x *XaiBlock) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *XaiBlock) GetLogsBloom() string { + if x != nil { + return x.LogsBloom + } + return "" +} + +func (x *XaiBlock) GetMiner() string { + if x != nil { + return x.Miner + } + return "" +} + +func (x *XaiBlock) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *XaiBlock) GetParentHash() string { + if x != nil { + return x.ParentHash + } + return "" +} + +func (x *XaiBlock) GetReceiptsRoot() string { + if x != nil { + return x.ReceiptsRoot + } + return "" +} + +func (x *XaiBlock) GetSha3Uncles() string { + if x != nil { + return x.Sha3Uncles + } + return "" +} + +func (x *XaiBlock) GetSize() uint64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *XaiBlock) GetStateRoot() string { + if x != nil { + return x.StateRoot + } + return "" +} + +func (x *XaiBlock) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *XaiBlock) GetTotalDifficulty() string { + if x != nil { + return x.TotalDifficulty + } + return "" +} + +func (x *XaiBlock) GetTransactionsRoot() string { + if x != nil { + return x.TransactionsRoot + } + return "" +} + +func (x *XaiBlock) GetIndexedAt() uint64 { + if x != nil { + return x.IndexedAt + } + return 0 +} + +func (x *XaiBlock) GetTransactions() []*XaiTransaction { + if x != nil { + return x.Transactions + } + return nil +} + +func (x *XaiBlock) GetMixHash() string { + if x != nil { + return x.MixHash + } + return "" +} + +func (x *XaiBlock) GetSendCount() string { + if x != nil { + return x.SendCount + } + return "" +} + +func (x *XaiBlock) GetSendRoot() string { + if x != nil { + return x.SendRoot + } + return "" +} + +func (x *XaiBlock) GetL1BlockNumber() uint64 { + if x != nil { + return x.L1BlockNumber + } + return 0 +} + +type XaiEventLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // The address of the contract that generated the log + Topics []string `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"` // Topics are indexed parameters during log generation + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // The data field from the log + BlockNumber uint64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number where this log was in + TransactionHash string `protobuf:"bytes,5,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` // The hash of the transaction that generated this log + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block where this log was in + Removed bool `protobuf:"varint,7,opt,name=removed,proto3" json:"removed,omitempty"` // True if the log was reverted due to a chain reorganization + LogIndex uint64 `protobuf:"varint,8,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // The index of the log in the block + TransactionIndex uint64 `protobuf:"varint,9,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block +} + +func (x *XaiEventLog) Reset() { + *x = XaiEventLog{} + if protoimpl.UnsafeEnabled { + mi := &file_xai_index_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *XaiEventLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*XaiEventLog) ProtoMessage() {} + +func (x *XaiEventLog) ProtoReflect() protoreflect.Message { + mi := &file_xai_index_types_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use XaiEventLog.ProtoReflect.Descriptor instead. +func (*XaiEventLog) Descriptor() ([]byte, []int) { + return file_xai_index_types_proto_rawDescGZIP(), []int{2} +} + +func (x *XaiEventLog) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *XaiEventLog) GetTopics() []string { + if x != nil { + return x.Topics + } + return nil +} + +func (x *XaiEventLog) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *XaiEventLog) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *XaiEventLog) GetTransactionHash() string { + if x != nil { + return x.TransactionHash + } + return "" +} + +func (x *XaiEventLog) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *XaiEventLog) GetRemoved() bool { + if x != nil { + return x.Removed + } + return false +} + +func (x *XaiEventLog) GetLogIndex() uint64 { + if x != nil { + return x.LogIndex + } + return 0 +} + +func (x *XaiEventLog) GetTransactionIndex() uint64 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +var File_xai_index_types_proto protoreflect.FileDescriptor + +var file_xai_index_types_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x78, 0x61, 0x69, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x05, 0x0a, 0x0e, 0x58, 0x61, 0x69, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, + 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, + 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, + 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, + 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, + 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, + 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, + 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, + 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, + 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, + 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, + 0x69, 0x74, 0x79, 0x22, 0x8f, 0x06, 0x0a, 0x08, 0x58, 0x61, 0x69, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, + 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, + 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, + 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, + 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, + 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, + 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, + 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, + 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, + 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, + 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, + 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, + 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x33, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x58, 0x61, 0x69, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x78, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x78, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x17, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, 0x0a, + 0x0f, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xa4, 0x02, 0x0a, 0x0b, 0x58, 0x61, 0x69, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, + 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x06, 0x5a, 0x04, + 0x2e, 0x78, 0x61, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xai_index_types_proto_rawDescOnce sync.Once + file_xai_index_types_proto_rawDescData = file_xai_index_types_proto_rawDesc +) + +func file_xai_index_types_proto_rawDescGZIP() []byte { + file_xai_index_types_proto_rawDescOnce.Do(func() { + file_xai_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_xai_index_types_proto_rawDescData) + }) + return file_xai_index_types_proto_rawDescData +} + +var file_xai_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_xai_index_types_proto_goTypes = []interface{}{ + (*XaiTransaction)(nil), // 0: XaiTransaction + (*XaiBlock)(nil), // 1: XaiBlock + (*XaiEventLog)(nil), // 2: XaiEventLog +} +var file_xai_index_types_proto_depIdxs = []int32{ + 0, // 0: XaiBlock.transactions:type_name -> XaiTransaction + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_xai_index_types_proto_init() } +func file_xai_index_types_proto_init() { + if File_xai_index_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xai_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*XaiTransaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xai_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*XaiBlock); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xai_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*XaiEventLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xai_index_types_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xai_index_types_proto_goTypes, + DependencyIndexes: file_xai_index_types_proto_depIdxs, + MessageInfos: file_xai_index_types_proto_msgTypes, + }.Build() + File_xai_index_types_proto = out.File + file_xai_index_types_proto_rawDesc = nil + file_xai_index_types_proto_goTypes = nil + file_xai_index_types_proto_depIdxs = nil +} diff --git a/blockchain/xai/xai_index_types.proto b/blockchain/xai/xai_index_types.proto new file mode 100644 index 0000000..86fb451 --- /dev/null +++ b/blockchain/xai/xai_index_types.proto @@ -0,0 +1,72 @@ +syntax = "proto3"; + +option go_package = ".xai"; + + +// Represents a single transaction within a block +message XaiTransaction { + string hash = 1; // The hash of the transaction + uint64 block_number = 2; // The block number the transaction is in + string from_address = 3; // The address the transaction is sent from + string to_address = 4; // The address the transaction is sent to + string gas = 5; // The gas limit of the transaction + string gas_price = 6; // The gas price of the transaction + string max_fee_per_gas = 7; // Used as a field to match potential EIP-1559 transaction types + string max_priority_fee_per_gas = 8; // Used as a field to match potential EIP-1559 transaction types + string input = 9; // The input data of the transaction + string nonce = 10; // The nonce of the transaction + uint64 transaction_index = 11; // The index of the transaction in the block + uint64 transaction_type = 12; // Field to match potential EIP-1559 transaction types + string value = 13; // The value of the transaction + uint64 indexed_at = 14; // When the transaction was indexed by crawler + uint64 block_timestamp = 15; // The timestamp of this block + string block_hash = 16; // The hash of the block the transaction is in + string chain_id = 17; // Used as a field to match potential EIP-1559 transaction types + string v = 18; // Used as a field to match potential EIP-1559 transaction types + string r = 19; // Used as a field to match potential EIP-1559 transaction types + string s = 20; // Used as a field to match potential EIP-1559 transaction types + + repeated string access_list = 21; + string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types +} + +// Represents a block in the blockchain +message XaiBlock { + uint64 block_number = 1; // The block number + uint64 difficulty = 2; // The difficulty of this block + string extra_data = 3; // Extra data included in the block + uint64 gas_limit = 4; // The gas limit for this block + uint64 gas_used = 5; // The total gas used by all transactions in this block + string base_fee_per_gas = 6; // The base fee per gas for this block + string hash = 7; // The hash of this block + string logs_bloom = 8; // The logs bloom filter for this block + string miner = 9; // The address of the miner who mined this block + string nonce = 10; // The nonce of this block + string parent_hash = 11; // The hash of the parent block + string receipts_root = 12; // The root hash of the receipts trie + string sha3_uncles = 13; // The SHA3 hash of the uncles data in this block + uint64 size = 14; // The size of this block + string state_root = 15; // The root hash of the state trie + uint64 timestamp = 16; + string total_difficulty = 17; // The total difficulty of the chain until this block + string transactions_root = 18; // The root hash of the transactions trie + uint64 indexed_at = 19; // When the block was indexed by crawler + repeated XaiTransaction transactions = 20; // The transactions included in this block + + string mix_hash = 21; // The timestamp of this block + string send_count = 22; // The number of sends in this block + string send_root = 23; // The root hash of the sends trie + uint64 l1_block_number = 24; // The block number of the corresponding L1 block +} + +message XaiEventLog { + string address = 1; // The address of the contract that generated the log + repeated string topics = 2; // Topics are indexed parameters during log generation + string data = 3; // The data field from the log + uint64 block_number = 4; // The block number where this log was in + string transaction_hash = 5; // The hash of the transaction that generated this log + string block_hash = 6; // The hash of the block where this log was in + bool removed = 7; // True if the log was reverted due to a chain reorganization + uint64 log_index = 8; // The index of the log in the block + uint64 transaction_index = 9; // The index of the transaction in the block +} \ No newline at end of file diff --git a/blockchain/xai_sepolia/xai_sepolia.go b/blockchain/xai_sepolia/xai_sepolia.go new file mode 100644 index 0000000..0924b7b --- /dev/null +++ b/blockchain/xai_sepolia/xai_sepolia.go @@ -0,0 +1,605 @@ +package xai_sepolia + +import ( + "context" + "encoding/base64" + "encoding/hex" + "encoding/json" + "fmt" + "math/big" + "strings" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rpc" + seer_common "github.com/moonstream-to/seer/blockchain/common" + "github.com/moonstream-to/seer/indexer" + "google.golang.org/protobuf/proto" +) + +func NewClient(url string) (*Client, error) { + rpcClient, err := rpc.DialContext(context.Background(), url) + if err != nil { + return nil, err + } + return &Client{rpcClient: rpcClient}, nil +} + +// Client is a wrapper around the Ethereum JSON-RPC client. + +type Client struct { + rpcClient *rpc.Client +} + +// Client common + +// ChainType returns the chain type. +func (c *Client) ChainType() string { + return "xai_sepolia" +} + +// Close closes the underlying RPC client. +func (c *Client) Close() { + c.rpcClient.Close() +} + +// GetLatestBlockNumber returns the latest block number. +func (c *Client) GetLatestBlockNumber() (*big.Int, error) { + var result string + if err := c.rpcClient.CallContext(context.Background(), &result, "eth_blockNumber"); err != nil { + return nil, err + } + + // Convert the hex string to a big.Int + blockNumber, ok := new(big.Int).SetString(result, 0) // The 0 base lets the function infer the base from the string prefix. + if !ok { + return nil, fmt.Errorf("invalid block number format: %s", result) + } + + return blockNumber, nil +} + +// BlockByNumber returns the block with the given number. +func (c *Client) GetBlockByNumber(ctx context.Context, number *big.Int) (*seer_common.BlockJson, error) { + + var rawResponse json.RawMessage // Use RawMessage to capture the entire JSON response + err := c.rpcClient.CallContext(ctx, &rawResponse, "eth_getBlockByNumber", "0x"+number.Text(16), true) + if err != nil { + fmt.Println("Error calling eth_getBlockByNumber: ", err) + return nil, err + } + + var response_json map[string]interface{} + + err = json.Unmarshal(rawResponse, &response_json) + + delete(response_json, "transactions") + + var block *seer_common.BlockJson + err = c.rpcClient.CallContext(ctx, &block, "eth_getBlockByNumber", "0x"+number.Text(16), true) // true to include transactions + return block, err +} + +// BlockByHash returns the block with the given hash. +func (c *Client) BlockByHash(ctx context.Context, hash common.Hash) (*seer_common.BlockJson, error) { + var block *seer_common.BlockJson + err := c.rpcClient.CallContext(ctx, &block, "eth_getBlockByHash", hash, true) // true to include transactions + return block, err +} + +// TransactionReceipt returns the receipt of a transaction by transaction hash. +func (c *Client) TransactionReceipt(ctx context.Context, hash common.Hash) (*types.Receipt, error) { + var receipt *types.Receipt + err := c.rpcClient.CallContext(ctx, &receipt, "eth_getTransactionReceipt", hash) + return receipt, err +} + +func (c *Client) ClientFilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]*seer_common.EventJson, error) { + var logs []*seer_common.EventJson + fromBlock := q.FromBlock + toBlock := q.ToBlock + batchStep := new(big.Int).Sub(toBlock, fromBlock) // Calculate initial batch step + + for { + // Calculate the next "lastBlock" within the batch step or adjust to "toBlock" if exceeding + nextBlock := new(big.Int).Add(fromBlock, batchStep) + if nextBlock.Cmp(toBlock) > 0 { + nextBlock = new(big.Int).Set(toBlock) + } + + var result []*seer_common.EventJson + err := c.rpcClient.CallContext(ctx, &result, "eth_getLogs", struct { + FromBlock string `json:"fromBlock"` + ToBlock string `json:"toBlock"` + Addresses []common.Address `json:"addresses"` + Topics [][]common.Hash `json:"topics"` + }{ + FromBlock: toHex(fromBlock), + ToBlock: toHex(nextBlock), + Addresses: q.Addresses, + Topics: q.Topics, + }) + + if err != nil { + if strings.Contains(err.Error(), "query returned more than 10000 results") { + // Halve the batch step if too many results and retry + batchStep.Div(batchStep, big.NewInt(2)) + if batchStep.Cmp(big.NewInt(1)) < 0 { + // If the batch step is too small we will skip that block + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + if fromBlock.Cmp(toBlock) > 0 { + break + } + continue + } + continue + } else { + // For any other error, return immediately + return nil, err + } + } + + // Append the results and adjust "fromBlock" for the next batch + logs = append(logs, result...) + fromBlock = new(big.Int).Add(nextBlock, big.NewInt(1)) + + // Break the loop if we've reached or exceeded "toBlock" + if fromBlock.Cmp(toBlock) > 0 { + break + } + } + + return logs, nil +} + +// fetchBlocks returns the blocks for a given range. +func (c *Client) fetchBlocks(ctx context.Context, from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + + for i := from; i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + return blocks, nil +} + +// Utility function to convert big.Int to its hexadecimal representation. +func toHex(number *big.Int) string { + return fmt.Sprintf("0x%x", number) +} + +func fromHex(hex string) *big.Int { + number := new(big.Int) + number.SetString(hex, 0) + return number +} + +// FetchBlocksInRange fetches blocks within a specified range. +// This could be useful for batch processing or analysis. +func (c *Client) FetchBlocksInRange(from, to *big.Int) ([]*seer_common.BlockJson, error) { + var blocks []*seer_common.BlockJson + ctx := context.Background() // For simplicity, using a background context; consider timeouts for production. + + for i := new(big.Int).Set(from); i.Cmp(to) <= 0; i.Add(i, big.NewInt(1)) { + block, err := c.GetBlockByNumber(ctx, i) + fmt.Println("Block number: ", i) + if err != nil { + return nil, err + } + blocks = append(blocks, block) + } + + return blocks, nil +} + +// ParseBlocksAndTransactions parses blocks and their transactions into custom data structures. +// This method showcases how to handle and transform detailed block and transaction data. +func (c *Client) ParseBlocksAndTransactions(from, to *big.Int) ([]*XaiSepoliaBlock, []*XaiSepoliaTransaction, error) { + blocksJson, err := c.FetchBlocksInRange(from, to) + if err != nil { + return nil, nil, err + } + + var parsedBlocks []*XaiSepoliaBlock + var parsedTransactions []*XaiSepoliaTransaction + for _, blockJson := range blocksJson { + // Convert BlockJson to Block and Transactions as required. + parsedBlock := ToProtoSingleBlock(blockJson) + + // Example: Parsing transactions within the block + for _, txJson := range blockJson.Transactions { + + txJson.BlockTimestamp = blockJson.Timestamp + + parsedTransaction := ToProtoSingleTransaction(&txJson) + parsedTransactions = append(parsedTransactions, parsedTransaction) + } + + parsedBlocks = append(parsedBlocks, parsedBlock) + } + + return parsedBlocks, parsedTransactions, nil +} + +func (c *Client) ParseEvents(from, to *big.Int, blocksCache map[uint64]indexer.BlockCache) ([]*XaiSepoliaEventLog, error) { + + logs, err := c.ClientFilterLogs(context.Background(), ethereum.FilterQuery{ + FromBlock: from, + ToBlock: to, + }) + + if err != nil { + fmt.Println("Error fetching logs: ", err) + return nil, err + } + + var parsedEvents []*XaiSepoliaEventLog + for _, log := range logs { + parsedEvent := ToProtoSingleEventLog(log) + parsedEvents = append(parsedEvents, parsedEvent) + } + + return parsedEvents, nil +} + +func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCache, error) { + parsedBlocks, parsedTransactions, err := c.ParseBlocksAndTransactions(from, to) + + if err != nil { + return nil, nil, nil, nil, nil, err + } + + blocksCache := make(map[uint64]indexer.BlockCache) + + var blocksProto []proto.Message + var blockIndex []indexer.BlockIndex + for index, block := range parsedBlocks { + blocksProto = append(blocksProto, block) // Assuming block is already a proto.Message + blocksCache[block.BlockNumber] = indexer.BlockCache{ + BlockNumber: block.BlockNumber, + BlockHash: block.Hash, + BlockTimestamp: block.Timestamp, + } // Assuming block.BlockNumber is int64 and block.Hash is string + blockIndex = append(blockIndex, indexer.NewBlockIndex("xai_sepolia", + block.BlockNumber, + block.Hash, + block.Timestamp, + block.ParentHash, + uint64(index), + "", + )) + } + + var transactionsProto []proto.Message + var transactionIndex []indexer.TransactionIndex + for index, transaction := range parsedTransactions { + transactionsProto = append(transactionsProto, transaction) // Assuming transaction is also a proto.Message + + selector := "0x" + + if len(transaction.Input) > 10 { + selector = transaction.Input[:10] + } + + transactionIndex = append(transactionIndex, indexer.TransactionIndex{ + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + BlockTimestamp: transaction.BlockTimestamp, + FromAddress: transaction.FromAddress, + ToAddress: transaction.ToAddress, + RowID: uint64(index), + Selector: selector, // First 10 characters of the input data 0x + 4 bytes of the function signature + TransactionHash: transaction.Hash, + TransactionIndex: transaction.TransactionIndex, + Type: transaction.TransactionType, + Path: "", + }) + } + + return blocksProto, transactionsProto, blockIndex, transactionIndex, blocksCache, nil +} + +func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]indexer.BlockCache) ([]proto.Message, []indexer.LogIndex, error) { + + parsedEvents, err := c.ParseEvents(from, to, blocksCahche) + + if err != nil { + return nil, nil, err + } + + var eventsProto []proto.Message + var eventsIndex []indexer.LogIndex + for index, event := range parsedEvents { + eventsProto = append(eventsProto, event) // Assuming event is already a proto.Message + + var topic0, topic1, topic2 *string + + if len(event.Topics) == 0 { + fmt.Println("No topics found for event: ", event) + } else { + topic0 = &event.Topics[0] // First topic + } + + // Assign topics based on availability + if len(event.Topics) > 1 { + topic1 = &event.Topics[1] // Second topic, if present + } + if len(event.Topics) > 2 { + topic2 = &event.Topics[2] // Third topic, if present + } + + eventsIndex = append(eventsIndex, indexer.LogIndex{ + Address: event.Address, + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + BlockTimestamp: blocksCahche[event.BlockNumber].BlockTimestamp, + TransactionHash: event.TransactionHash, + Selector: topic0, // First topic + Topic1: topic1, + Topic2: topic2, + RowID: uint64(index), + LogIndex: event.LogIndex, + Path: "", + }) + } + + return eventsProto, eventsIndex, nil + +} +func ToProtoSingleBlock(obj *seer_common.BlockJson) *XaiSepoliaBlock { + return &XaiSepoliaBlock{ + BlockNumber: obj.BlockNumber, + Difficulty: obj.Difficulty, + ExtraData: obj.ExtraData, + GasLimit: obj.GasLimit, + GasUsed: obj.GasUsed, + BaseFeePerGas: obj.BaseFeePerGas, + Hash: obj.Hash, + LogsBloom: obj.LogsBloom, + Miner: obj.Miner, + Nonce: obj.Nonce, + ParentHash: obj.ParentHash, + ReceiptsRoot: obj.ReceiptsRoot, + Sha3Uncles: obj.Sha3Uncles, + Size: obj.Size, + StateRoot: obj.StateRoot, + Timestamp: obj.Timestamp, + TotalDifficulty: obj.TotalDifficulty, + TransactionsRoot: obj.TransactionsRoot, + IndexedAt: obj.IndexedAt, + + MixHash: obj.MixHash, + SendCount: obj.SendCount, + SendRoot: obj.SendRoot, + L1BlockNumber: obj.L1BlockNumber, + } +} + +func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *XaiSepoliaTransaction { + return &XaiSepoliaTransaction{ + Hash: obj.Hash, + BlockNumber: obj.BlockNumber, + BlockHash: obj.BlockHash, + FromAddress: obj.FromAddress, + ToAddress: obj.ToAddress, + Gas: obj.Gas, + GasPrice: obj.GasPrice, + MaxFeePerGas: obj.MaxFeePerGas, + MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, + Input: obj.Input, + Nonce: obj.Nonce, + TransactionIndex: obj.TransactionIndex, + TransactionType: obj.TransactionType, + Value: obj.Value, + IndexedAt: obj.IndexedAt, + BlockTimestamp: obj.BlockTimestamp, + + ChainId: obj.ChainId, + V: obj.V, + R: obj.R, + S: obj.S, + + AccessList: obj.AccessList, + YParity: obj.YParity, + } +} + +func ToProtoSingleEventLog(obj *seer_common.EventJson) *XaiSepoliaEventLog { + + return &XaiSepoliaEventLog{ + Address: obj.Address, + Topics: obj.Topics, + Data: obj.Data, + BlockNumber: obj.BlockNumber, + TransactionHash: obj.TransactionHash, + LogIndex: obj.LogIndex, + BlockHash: obj.BlockHash, + Removed: obj.Removed, + } +} + +func (c *Client) DecodeProtoEventLogs(data []string) ([]*XaiSepoliaEventLog, error) { + var events []*XaiSepoliaEventLog + for _, d := range data { + var event XaiSepoliaEventLog + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &event); err != nil { + return nil, err + } + events = append(events, &event) + } + return events, nil +} + +func (c *Client) DecodeProtoTransactions(data []string) ([]*XaiSepoliaTransaction, error) { + var transactions []*XaiSepoliaTransaction + for _, d := range data { + var transaction XaiSepoliaTransaction + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &transaction); err != nil { + return nil, err + } + transactions = append(transactions, &transaction) + } + return transactions, nil +} + +func (c *Client) DecodeProtoBlocks(data []string) ([]*XaiSepoliaBlock, error) { + var blocks []*XaiSepoliaBlock + for _, d := range data { + var block XaiSepoliaBlock + base64Decoded, err := base64.StdEncoding.DecodeString(d) + if err != nil { + return nil, err + } + if err := proto.Unmarshal(base64Decoded, &block); err != nil { + return nil, err + } + blocks = append(blocks, &block) + } + return blocks, nil +} + +func (c *Client) DecodeProtoEventsToLabels(events []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.EventLabel, error) { + + decodedEvents, err := c.DecodeProtoEventLogs(events) + + if err != nil { + return nil, err + } + + var labels []indexer.EventLabel + + for _, event := range decodedEvents { + + var topicSelector string + + if len(event.Topics) > 0 { + topicSelector = event.Topics[0][:10] + } else { + continue + } + + checksumAddress := common.HexToAddress(event.Address).Hex() + + // Get the ABI string + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][topicSelector]["abi"])) + if err != nil { + fmt.Println("Error initializing contract ABI: ", err) + return nil, err + } + + // Decode the event data + decodedArgs, err := seer_common.DecodeLogArgsToLabelData(&contractAbi, event.Topics, event.Data) + + if err != nil { + fmt.Println("Error decoding event data: ", err) + return nil, err + } + + // Convert decodedArgs map to JSON + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert event to label + eventLabel := indexer.EventLabel{ + Label: indexer.SeerCrawlerLabel, + LabelName: abiMap[checksumAddress][topicSelector]["abi_name"], + LabelType: "event", + BlockNumber: event.BlockNumber, + BlockHash: event.BlockHash, + Address: event.Address, + TransactionHash: event.TransactionHash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[event.BlockNumber], + LogIndex: event.LogIndex, + } + + labels = append(labels, eventLabel) + + } + + return labels, nil +} + +func (c *Client) DecodeProtoTransactionsToLabels(transactions []string, blocksCache map[uint64]uint64, abiMap map[string]map[string]map[string]string) ([]indexer.TransactionLabel, error) { + + decodedTransactions, err := c.DecodeProtoTransactions(transactions) + + if err != nil { + return nil, err + } + + var labels []indexer.TransactionLabel + + for _, transaction := range decodedTransactions { + + selector := transaction.Input[:10] + + // To checksum address + checksumAddress := common.HexToAddress(transaction.ToAddress).Hex() + + contractAbi, err := abi.JSON(strings.NewReader(abiMap[checksumAddress][selector]["abi"])) + + if err != nil { + return nil, err + } + + inputData, err := hex.DecodeString(transaction.Input[2:]) + if err != nil { + fmt.Println("Error decoding input data: ", err) + return nil, err + } + + decodedArgs, err := seer_common.DecodeTransactionInputDataToInterface(&contractAbi, inputData) + + if err != nil { + fmt.Println("Error decoding transaction input data: ", err) + return nil, err + } + + labelDataBytes, err := json.Marshal(decodedArgs) + if err != nil { + return nil, err + } + + // Convert JSON byte slice to string + labelDataString := string(labelDataBytes) + + // Convert transaction to label + transactionLabel := indexer.TransactionLabel{ + Address: transaction.ToAddress, + BlockNumber: transaction.BlockNumber, + BlockHash: transaction.BlockHash, + CallerAddress: transaction.FromAddress, + LabelName: abiMap[checksumAddress][selector]["abi_name"], + LabelType: "tx_call", + OriginAddress: transaction.FromAddress, + Label: indexer.SeerCrawlerLabel, + TransactionHash: transaction.Hash, + LabelData: labelDataString, + BlockTimestamp: blocksCache[transaction.BlockNumber], + } + + labels = append(labels, transactionLabel) + + } + + return labels, nil +} diff --git a/blockchain/xai_sepolia/xai_sepolia_index_types.pb.go b/blockchain/xai_sepolia/xai_sepolia_index_types.pb.go new file mode 100644 index 0000000..4f49e3b --- /dev/null +++ b/blockchain/xai_sepolia/xai_sepolia_index_types.pb.go @@ -0,0 +1,790 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.1 +// protoc v3.6.1 +// source: xai_sepolia_index_types.proto + +package xai_sepolia + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents a single transaction within a block +type XaiSepoliaTransaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types +} + +func (x *XaiSepoliaTransaction) Reset() { + *x = XaiSepoliaTransaction{} + if protoimpl.UnsafeEnabled { + mi := &file_xai_sepolia_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *XaiSepoliaTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*XaiSepoliaTransaction) ProtoMessage() {} + +func (x *XaiSepoliaTransaction) ProtoReflect() protoreflect.Message { + mi := &file_xai_sepolia_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use XaiSepoliaTransaction.ProtoReflect.Descriptor instead. +func (*XaiSepoliaTransaction) Descriptor() ([]byte, []int) { + return file_xai_sepolia_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *XaiSepoliaTransaction) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *XaiSepoliaTransaction) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *XaiSepoliaTransaction) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *XaiSepoliaTransaction) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *XaiSepoliaTransaction) GetGas() string { + if x != nil { + return x.Gas + } + return "" +} + +func (x *XaiSepoliaTransaction) GetGasPrice() string { + if x != nil { + return x.GasPrice + } + return "" +} + +func (x *XaiSepoliaTransaction) GetMaxFeePerGas() string { + if x != nil { + return x.MaxFeePerGas + } + return "" +} + +func (x *XaiSepoliaTransaction) GetMaxPriorityFeePerGas() string { + if x != nil { + return x.MaxPriorityFeePerGas + } + return "" +} + +func (x *XaiSepoliaTransaction) GetInput() string { + if x != nil { + return x.Input + } + return "" +} + +func (x *XaiSepoliaTransaction) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *XaiSepoliaTransaction) GetTransactionIndex() uint64 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +func (x *XaiSepoliaTransaction) GetTransactionType() uint64 { + if x != nil { + return x.TransactionType + } + return 0 +} + +func (x *XaiSepoliaTransaction) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *XaiSepoliaTransaction) GetIndexedAt() uint64 { + if x != nil { + return x.IndexedAt + } + return 0 +} + +func (x *XaiSepoliaTransaction) GetBlockTimestamp() uint64 { + if x != nil { + return x.BlockTimestamp + } + return 0 +} + +func (x *XaiSepoliaTransaction) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *XaiSepoliaTransaction) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *XaiSepoliaTransaction) GetV() string { + if x != nil { + return x.V + } + return "" +} + +func (x *XaiSepoliaTransaction) GetR() string { + if x != nil { + return x.R + } + return "" +} + +func (x *XaiSepoliaTransaction) GetS() string { + if x != nil { + return x.S + } + return "" +} + +func (x *XaiSepoliaTransaction) GetAccessList() []string { + if x != nil { + return x.AccessList + } + return nil +} + +func (x *XaiSepoliaTransaction) GetYParity() string { + if x != nil { + return x.YParity + } + return "" +} + +// Represents a block in the blockchain +type XaiSepoliaBlock struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number + Difficulty uint64 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty,omitempty"` // The difficulty of this block + ExtraData string `protobuf:"bytes,3,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"` // Extra data included in the block + GasLimit uint64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // The gas limit for this block + GasUsed uint64 `protobuf:"varint,5,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` // The total gas used by all transactions in this block + BaseFeePerGas string `protobuf:"bytes,6,opt,name=base_fee_per_gas,json=baseFeePerGas,proto3" json:"base_fee_per_gas,omitempty"` // The base fee per gas for this block + Hash string `protobuf:"bytes,7,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of this block + LogsBloom string `protobuf:"bytes,8,opt,name=logs_bloom,json=logsBloom,proto3" json:"logs_bloom,omitempty"` // The logs bloom filter for this block + Miner string `protobuf:"bytes,9,opt,name=miner,proto3" json:"miner,omitempty"` // The address of the miner who mined this block + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of this block + ParentHash string `protobuf:"bytes,11,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` // The hash of the parent block + ReceiptsRoot string `protobuf:"bytes,12,opt,name=receipts_root,json=receiptsRoot,proto3" json:"receipts_root,omitempty"` // The root hash of the receipts trie + Sha3Uncles string `protobuf:"bytes,13,opt,name=sha3_uncles,json=sha3Uncles,proto3" json:"sha3_uncles,omitempty"` // The SHA3 hash of the uncles data in this block + Size uint64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"` // The size of this block + StateRoot string `protobuf:"bytes,15,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` // The root hash of the state trie + Timestamp uint64 `protobuf:"varint,16,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + TotalDifficulty string `protobuf:"bytes,17,opt,name=total_difficulty,json=totalDifficulty,proto3" json:"total_difficulty,omitempty"` // The total difficulty of the chain until this block + TransactionsRoot string `protobuf:"bytes,18,opt,name=transactions_root,json=transactionsRoot,proto3" json:"transactions_root,omitempty"` // The root hash of the transactions trie + IndexedAt uint64 `protobuf:"varint,19,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the block was indexed by crawler + Transactions []*XaiSepoliaTransaction `protobuf:"bytes,20,rep,name=transactions,proto3" json:"transactions,omitempty"` // The transactions included in this block + MixHash string `protobuf:"bytes,21,opt,name=mix_hash,json=mixHash,proto3" json:"mix_hash,omitempty"` // The timestamp of this block + SendCount string `protobuf:"bytes,22,opt,name=send_count,json=sendCount,proto3" json:"send_count,omitempty"` // The number of sends in this block + SendRoot string `protobuf:"bytes,23,opt,name=send_root,json=sendRoot,proto3" json:"send_root,omitempty"` // The root hash of the sends trie + L1BlockNumber uint64 `protobuf:"varint,24,opt,name=l1_block_number,json=l1BlockNumber,proto3" json:"l1_block_number,omitempty"` // The block number of the corresponding L1 block +} + +func (x *XaiSepoliaBlock) Reset() { + *x = XaiSepoliaBlock{} + if protoimpl.UnsafeEnabled { + mi := &file_xai_sepolia_index_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *XaiSepoliaBlock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*XaiSepoliaBlock) ProtoMessage() {} + +func (x *XaiSepoliaBlock) ProtoReflect() protoreflect.Message { + mi := &file_xai_sepolia_index_types_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use XaiSepoliaBlock.ProtoReflect.Descriptor instead. +func (*XaiSepoliaBlock) Descriptor() ([]byte, []int) { + return file_xai_sepolia_index_types_proto_rawDescGZIP(), []int{1} +} + +func (x *XaiSepoliaBlock) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *XaiSepoliaBlock) GetDifficulty() uint64 { + if x != nil { + return x.Difficulty + } + return 0 +} + +func (x *XaiSepoliaBlock) GetExtraData() string { + if x != nil { + return x.ExtraData + } + return "" +} + +func (x *XaiSepoliaBlock) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *XaiSepoliaBlock) GetGasUsed() uint64 { + if x != nil { + return x.GasUsed + } + return 0 +} + +func (x *XaiSepoliaBlock) GetBaseFeePerGas() string { + if x != nil { + return x.BaseFeePerGas + } + return "" +} + +func (x *XaiSepoliaBlock) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *XaiSepoliaBlock) GetLogsBloom() string { + if x != nil { + return x.LogsBloom + } + return "" +} + +func (x *XaiSepoliaBlock) GetMiner() string { + if x != nil { + return x.Miner + } + return "" +} + +func (x *XaiSepoliaBlock) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *XaiSepoliaBlock) GetParentHash() string { + if x != nil { + return x.ParentHash + } + return "" +} + +func (x *XaiSepoliaBlock) GetReceiptsRoot() string { + if x != nil { + return x.ReceiptsRoot + } + return "" +} + +func (x *XaiSepoliaBlock) GetSha3Uncles() string { + if x != nil { + return x.Sha3Uncles + } + return "" +} + +func (x *XaiSepoliaBlock) GetSize() uint64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *XaiSepoliaBlock) GetStateRoot() string { + if x != nil { + return x.StateRoot + } + return "" +} + +func (x *XaiSepoliaBlock) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *XaiSepoliaBlock) GetTotalDifficulty() string { + if x != nil { + return x.TotalDifficulty + } + return "" +} + +func (x *XaiSepoliaBlock) GetTransactionsRoot() string { + if x != nil { + return x.TransactionsRoot + } + return "" +} + +func (x *XaiSepoliaBlock) GetIndexedAt() uint64 { + if x != nil { + return x.IndexedAt + } + return 0 +} + +func (x *XaiSepoliaBlock) GetTransactions() []*XaiSepoliaTransaction { + if x != nil { + return x.Transactions + } + return nil +} + +func (x *XaiSepoliaBlock) GetMixHash() string { + if x != nil { + return x.MixHash + } + return "" +} + +func (x *XaiSepoliaBlock) GetSendCount() string { + if x != nil { + return x.SendCount + } + return "" +} + +func (x *XaiSepoliaBlock) GetSendRoot() string { + if x != nil { + return x.SendRoot + } + return "" +} + +func (x *XaiSepoliaBlock) GetL1BlockNumber() uint64 { + if x != nil { + return x.L1BlockNumber + } + return 0 +} + +type XaiSepoliaEventLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // The address of the contract that generated the log + Topics []string `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"` // Topics are indexed parameters during log generation + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // The data field from the log + BlockNumber uint64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number where this log was in + TransactionHash string `protobuf:"bytes,5,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` // The hash of the transaction that generated this log + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block where this log was in + Removed bool `protobuf:"varint,7,opt,name=removed,proto3" json:"removed,omitempty"` // True if the log was reverted due to a chain reorganization + LogIndex uint64 `protobuf:"varint,8,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // The index of the log in the block + TransactionIndex uint64 `protobuf:"varint,9,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block +} + +func (x *XaiSepoliaEventLog) Reset() { + *x = XaiSepoliaEventLog{} + if protoimpl.UnsafeEnabled { + mi := &file_xai_sepolia_index_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *XaiSepoliaEventLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*XaiSepoliaEventLog) ProtoMessage() {} + +func (x *XaiSepoliaEventLog) ProtoReflect() protoreflect.Message { + mi := &file_xai_sepolia_index_types_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use XaiSepoliaEventLog.ProtoReflect.Descriptor instead. +func (*XaiSepoliaEventLog) Descriptor() ([]byte, []int) { + return file_xai_sepolia_index_types_proto_rawDescGZIP(), []int{2} +} + +func (x *XaiSepoliaEventLog) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *XaiSepoliaEventLog) GetTopics() []string { + if x != nil { + return x.Topics + } + return nil +} + +func (x *XaiSepoliaEventLog) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *XaiSepoliaEventLog) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *XaiSepoliaEventLog) GetTransactionHash() string { + if x != nil { + return x.TransactionHash + } + return "" +} + +func (x *XaiSepoliaEventLog) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *XaiSepoliaEventLog) GetRemoved() bool { + if x != nil { + return x.Removed + } + return false +} + +func (x *XaiSepoliaEventLog) GetLogIndex() uint64 { + if x != nil { + return x.LogIndex + } + return 0 +} + +func (x *XaiSepoliaEventLog) GetTransactionIndex() uint64 { + if x != nil { + return x.TransactionIndex + } + return 0 +} + +var File_xai_sepolia_index_types_proto protoreflect.FileDescriptor + +var file_xai_sepolia_index_types_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x78, 0x61, 0x69, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xa0, 0x05, 0x0a, 0x15, 0x58, 0x61, 0x69, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, + 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, + 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, + 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, + 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, + 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, + 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, + 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, + 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, + 0x74, 0x79, 0x22, 0x9d, 0x06, 0x0a, 0x0f, 0x58, 0x61, 0x69, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, + 0x61, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, + 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, + 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, + 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, + 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, + 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, + 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, + 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, + 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, + 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, + 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, + 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, + 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, + 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, + 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, + 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, + 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x58, 0x61, 0x69, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, + 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x16, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, + 0x09, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x31, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x18, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x22, 0xab, 0x02, 0x0a, 0x12, 0x58, 0x61, 0x69, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, + 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, + 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x78, 0x61, 0x69, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xai_sepolia_index_types_proto_rawDescOnce sync.Once + file_xai_sepolia_index_types_proto_rawDescData = file_xai_sepolia_index_types_proto_rawDesc +) + +func file_xai_sepolia_index_types_proto_rawDescGZIP() []byte { + file_xai_sepolia_index_types_proto_rawDescOnce.Do(func() { + file_xai_sepolia_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_xai_sepolia_index_types_proto_rawDescData) + }) + return file_xai_sepolia_index_types_proto_rawDescData +} + +var file_xai_sepolia_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_xai_sepolia_index_types_proto_goTypes = []interface{}{ + (*XaiSepoliaTransaction)(nil), // 0: XaiSepoliaTransaction + (*XaiSepoliaBlock)(nil), // 1: XaiSepoliaBlock + (*XaiSepoliaEventLog)(nil), // 2: XaiSepoliaEventLog +} +var file_xai_sepolia_index_types_proto_depIdxs = []int32{ + 0, // 0: XaiSepoliaBlock.transactions:type_name -> XaiSepoliaTransaction + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_xai_sepolia_index_types_proto_init() } +func file_xai_sepolia_index_types_proto_init() { + if File_xai_sepolia_index_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xai_sepolia_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*XaiSepoliaTransaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xai_sepolia_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*XaiSepoliaBlock); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xai_sepolia_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*XaiSepoliaEventLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xai_sepolia_index_types_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xai_sepolia_index_types_proto_goTypes, + DependencyIndexes: file_xai_sepolia_index_types_proto_depIdxs, + MessageInfos: file_xai_sepolia_index_types_proto_msgTypes, + }.Build() + File_xai_sepolia_index_types_proto = out.File + file_xai_sepolia_index_types_proto_rawDesc = nil + file_xai_sepolia_index_types_proto_goTypes = nil + file_xai_sepolia_index_types_proto_depIdxs = nil +} diff --git a/blockchain/xai_sepolia/xai_sepolia_index_types.proto b/blockchain/xai_sepolia/xai_sepolia_index_types.proto new file mode 100644 index 0000000..0aef6a3 --- /dev/null +++ b/blockchain/xai_sepolia/xai_sepolia_index_types.proto @@ -0,0 +1,72 @@ +syntax = "proto3"; + +option go_package = ".xai_sepolia"; + + +// Represents a single transaction within a block +message XaiSepoliaTransaction { + string hash = 1; // The hash of the transaction + uint64 block_number = 2; // The block number the transaction is in + string from_address = 3; // The address the transaction is sent from + string to_address = 4; // The address the transaction is sent to + string gas = 5; // The gas limit of the transaction + string gas_price = 6; // The gas price of the transaction + string max_fee_per_gas = 7; // Used as a field to match potential EIP-1559 transaction types + string max_priority_fee_per_gas = 8; // Used as a field to match potential EIP-1559 transaction types + string input = 9; // The input data of the transaction + string nonce = 10; // The nonce of the transaction + uint64 transaction_index = 11; // The index of the transaction in the block + uint64 transaction_type = 12; // Field to match potential EIP-1559 transaction types + string value = 13; // The value of the transaction + uint64 indexed_at = 14; // When the transaction was indexed by crawler + uint64 block_timestamp = 15; // The timestamp of this block + string block_hash = 16; // The hash of the block the transaction is in + string chain_id = 17; // Used as a field to match potential EIP-1559 transaction types + string v = 18; // Used as a field to match potential EIP-1559 transaction types + string r = 19; // Used as a field to match potential EIP-1559 transaction types + string s = 20; // Used as a field to match potential EIP-1559 transaction types + + repeated string access_list = 21; + string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types +} + +// Represents a block in the blockchain +message XaiSepoliaBlock { + uint64 block_number = 1; // The block number + uint64 difficulty = 2; // The difficulty of this block + string extra_data = 3; // Extra data included in the block + uint64 gas_limit = 4; // The gas limit for this block + uint64 gas_used = 5; // The total gas used by all transactions in this block + string base_fee_per_gas = 6; // The base fee per gas for this block + string hash = 7; // The hash of this block + string logs_bloom = 8; // The logs bloom filter for this block + string miner = 9; // The address of the miner who mined this block + string nonce = 10; // The nonce of this block + string parent_hash = 11; // The hash of the parent block + string receipts_root = 12; // The root hash of the receipts trie + string sha3_uncles = 13; // The SHA3 hash of the uncles data in this block + uint64 size = 14; // The size of this block + string state_root = 15; // The root hash of the state trie + uint64 timestamp = 16; + string total_difficulty = 17; // The total difficulty of the chain until this block + string transactions_root = 18; // The root hash of the transactions trie + uint64 indexed_at = 19; // When the block was indexed by crawler + repeated XaiSepoliaTransaction transactions = 20; // The transactions included in this block + + string mix_hash = 21; // The timestamp of this block + string send_count = 22; // The number of sends in this block + string send_root = 23; // The root hash of the sends trie + uint64 l1_block_number = 24; // The block number of the corresponding L1 block +} + +message XaiSepoliaEventLog { + string address = 1; // The address of the contract that generated the log + repeated string topics = 2; // Topics are indexed parameters during log generation + string data = 3; // The data field from the log + uint64 block_number = 4; // The block number where this log was in + string transaction_hash = 5; // The hash of the transaction that generated this log + string block_hash = 6; // The hash of the block where this log was in + bool removed = 7; // True if the log was reverted due to a chain reorganization + uint64 log_index = 8; // The index of the log in the block + uint64 transaction_index = 9; // The index of the transaction in the block +} \ No newline at end of file diff --git a/crawler/settings.go b/crawler/settings.go index ef0b926..e09663b 100644 --- a/crawler/settings.go +++ b/crawler/settings.go @@ -30,10 +30,45 @@ func CheckVariablesForCrawler() error { if MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI == "" { return fmt.Errorf("MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI environment variable is required") } + MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI := os.Getenv("MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI") + if MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI == "" { + return fmt.Errorf("MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI environment variable is required") + } + MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI := os.Getenv("MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI") + if MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI == "" { + return fmt.Errorf("MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI environment variable is required") + } + MOONSTREAM_NODE_GAME7_ORBIT_ARBITRUM_SEPOLIA_A_EXTERNAL_URI := os.Getenv("MOONSTREAM_NODE_GAME7_ORBIT_ARBITRUM_SEPOLIA_A_EXTERNAL_URI") + if MOONSTREAM_NODE_GAME7_ORBIT_ARBITRUM_SEPOLIA_A_EXTERNAL_URI == "" { + return fmt.Errorf("MOONSTREAM_NODE_GAME7_ORBIT_ARBITRUM_SEPOLIA_A_EXTERNAL_URI environment variable is required") + } + MOONSTREAM_NODE_XAI_A_EXTERNAL_URI := os.Getenv("MOONSTREAM_NODE_XAI_A_EXTERNAL_URI") + if MOONSTREAM_NODE_XAI_A_EXTERNAL_URI == "" { + return fmt.Errorf("MOONSTREAM_NODE_XAI_A_EXTERNAL_URI environment variable is required") + } + MOONSTREAM_NODE_XAI_SEPOLIA_A_EXTERNAL_URI := os.Getenv("MOONSTREAM_NODE_XAI_SEPOLIA_A_EXTERNAL_URI") + if MOONSTREAM_NODE_XAI_SEPOLIA_A_EXTERNAL_URI == "" { + return fmt.Errorf("MOONSTREAM_NODE_XAI_SEPOLIA_A_EXTERNAL_URI environment variable is required") + } + MOONSTREAM_NODE_MANTLE_A_EXTERNAL_URI := os.Getenv("MOONSTREAM_NODE_MANTLE_A_EXTERNAL_URI") + if MOONSTREAM_NODE_MANTLE_A_EXTERNAL_URI == "" { + return fmt.Errorf("MOONSTREAM_NODE_MANTLE_A_EXTERNAL_URI environment variable is required") + } + MOONSTREAM_NODE_MANTLE_SEPOLIA_A_EXTERNAL_URI := os.Getenv("MOONSTREAM_NODE_MANTLE_SEPOLIA_A_EXTERNAL_URI") + if MOONSTREAM_NODE_MANTLE_SEPOLIA_A_EXTERNAL_URI == "" { + return fmt.Errorf("MOONSTREAM_NODE_MANTLE_SEPOLIA_A_EXTERNAL_URI environment variable is required") + } BlockchainURLs = map[string]string{ - "ethereum": MOONSTREAM_NODE_ETHEREUM_A_EXTERNAL_URI, - "polygon": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, + "ethereum": MOONSTREAM_NODE_ETHEREUM_A_EXTERNAL_URI, + "polygon": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, + "arbitrum_one": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, + "arbitrum_sepolia": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, + "game7_orbit_arbitrum_sepolia": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, + "xai": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, + "xai_sepolia": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, + "mantle": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, + "mantle_sepolia": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, } return nil diff --git a/sample.env b/sample.env index 37d7332..90be7e7 100644 --- a/sample.env +++ b/sample.env @@ -1,6 +1,13 @@ export MOONSTREAM_DB_V3_INDEXES_URI="sqlite://filepath/moonstreamdb_v3_indexes" export MOONSTREAM_NODE_ETHEREUM_A_EXTERNAL_URI="https://" export MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI="https://" +export MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI="https://" +export MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI="https://" +export MOONSTREAM_NODE_GAME7_ORBIT_ARBITRUM_SEPOLIA_A_EXTERNAL_URI="https://" +export MOONSTREAM_NODE_XAI_A_EXTERNAL_URI="https://" +export MOONSTREAM_NODE_XAI_SEPOLIA_A_EXTERNAL_URI="https://" +export MOONSTREAM_NODE_MANTLE_A_EXTERNAL_URI="https://" +export MOONSTREAM_NODE_MANTLE_SEPOLIA_A_EXTERNAL_URI="https://" export SEER_CRAWLER_INDEXER_LABEL="seer" diff --git a/storage/settings.go b/storage/settings.go index 451c0af..2aadeb2 100644 --- a/storage/settings.go +++ b/storage/settings.go @@ -60,6 +60,13 @@ func CheckVariablesForStorage() error { // Blockchains map for storage or database models var Blockchains = map[string]string{ - "ethereum": "ethereum_smartcontract", - "polygon": "polygon_smartcontract", + "ethereum": "ethereum_smartcontract", + "polygon": "polygon_smartcontract", + "arbitrum_one": "arbitrum_one_smartcontract", + "arbitrum_sepolia": "arbitrum_sepolia_smartcontract", + "game7_orbit_arbitrum_sepolia": "game7_orbit_arbitrum_sepolia_smartcontract", + "xai": "xai_smartcontract", + "xai_sepolia": "xai_sepolia_smartcontract", + "mantle": "mantle_smartcontract", + "mantle_sepolia": "mantle_sepolia_smartcontract", } From 42ceef5b5e59c605af3a73ba2d4745b05e652003 Mon Sep 17 00:00:00 2001 From: kompotkot Date: Mon, 3 Jun 2024 13:26:35 +0000 Subject: [PATCH 05/13] Updated readme --- blockchain/handlers.go | 16 ++++++++++++++++ crawler/README.md | 7 +------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/blockchain/handlers.go b/blockchain/handlers.go index 33fcc6d..723051b 100644 --- a/blockchain/handlers.go +++ b/blockchain/handlers.go @@ -11,6 +11,7 @@ import ( "github.com/moonstream-to/seer/blockchain/arbitrum_one" "github.com/moonstream-to/seer/blockchain/arbitrum_sepolia" "github.com/moonstream-to/seer/blockchain/ethereum" + "github.com/moonstream-to/seer/blockchain/game7_orbit_arbitrum_sepolia" "github.com/moonstream-to/seer/blockchain/polygon" "github.com/moonstream-to/seer/indexer" "google.golang.org/protobuf/proto" @@ -27,6 +28,21 @@ func wrapClient(url, chain string) (BlockchainClient, error) { client, err := arbitrum_one.NewClient(url) return client, err } else if chain == "arbitrum_sepolia" { + client, err := arbitrum_one.NewClient(url) + return client, err + } else if chain == "game7_orbit_arbitrum_sepolia" { + client, err := game7_orbit_arbitrum_sepolia.NewClient(url) + return client, err + } else if chain == "mantle" { + client, err := arbitrum_sepolia.NewClient(url) + return client, err + } else if chain == "mantle_sepolia" { + client, err := arbitrum_sepolia.NewClient(url) + return client, err + } else if chain == "xai" { + client, err := arbitrum_sepolia.NewClient(url) + return client, err + } else if chain == "xai_sepolia" { client, err := arbitrum_sepolia.NewClient(url) return client, err } else { diff --git a/crawler/README.md b/crawler/README.md index c059bb0..06b1426 100644 --- a/crawler/README.md +++ b/crawler/README.md @@ -26,11 +26,7 @@ export MOONSTREAM_DB_V3_INDEXES_URI="driver://user:pass@localhost/dbname" note: You need add the chain endpoint it will fetch the data from endpoints. -```bash -./seer crawler generate --chain polygon -``` - -Will generate the following files: +Blockchain structure: ```bash ├── blockchain @@ -38,7 +34,6 @@ Will generate the following files: │   │   ├── blocks_transactions_polygon.proto │   │   ├── blocks_transactions_polygon.pb.go │   │   ├── polygon.go -│   │   ├── types.go ``` ## Regenerate proto interface From 76b6e5a521181a6c73fa86e34d0df0ed9a37d582 Mon Sep 17 00:00:00 2001 From: kompotkot Date: Mon, 3 Jun 2024 13:27:13 +0000 Subject: [PATCH 06/13] Updated version --- version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index 6e24004..9b73776 100644 --- a/version/version.go +++ b/version/version.go @@ -1,3 +1,3 @@ package version -var SeerVersion string = "0.1.3" +var SeerVersion string = "0.1.4" From 891b800397954e4bd027489f9e6de016b8e476be Mon Sep 17 00:00:00 2001 From: kompotkot Date: Tue, 4 Jun 2024 09:10:57 +0000 Subject: [PATCH 07/13] Autogen bash script, fix bug with conversion of uint64 --- blockchain/arbitrum_one/arbitrum_one.go | 40 +- .../arbitrum_one_index_types.pb.go | 450 ++++++++++------- .../arbitrum_one_index_types.proto | 9 +- .../arbitrum_sepolia/arbitrum_sepolia.go | 40 +- .../arbitrum_sepolia_index_types.pb.go | 448 ++++++++++------- .../arbitrum_sepolia_index_types.proto | 9 +- blockchain/blockchain.go.tmpl | 40 +- blockchain/common/decoding.go | 36 +- blockchain/ethereum/ethereum.go | 38 +- .../ethereum/ethereum_index_types.pb.go | 429 +++++++++------- .../ethereum/ethereum_index_types.proto | 10 +- .../game7_orbit_arbitrum_sepolia.go | 40 +- ...7_orbit_arbitrum_sepolia_index_types.pb.go | 456 +++++++++++------- ...7_orbit_arbitrum_sepolia_index_types.proto | 9 +- blockchain/handlers.go | 14 +- blockchain/mantle/mantle.go | 38 +- blockchain/mantle/mantle_index_types.pb.go | 427 +++++++++------- blockchain/mantle/mantle_index_types.proto | 9 +- blockchain/mantle_sepolia/mantle_sepolia.go | 38 +- .../mantle_sepolia_index_types.pb.go | 436 ++++++++++------- .../mantle_sepolia_index_types.proto | 9 +- blockchain/polygon/polygon.go | 38 +- blockchain/polygon/polygon_index_types.pb.go | 352 ++++++++------ blockchain/polygon/polygon_index_types.proto | 9 +- blockchain/xai/xai.go | 40 +- blockchain/xai/xai_index_types.pb.go | 440 ++++++++++------- blockchain/xai/xai_index_types.proto | 9 +- blockchain/xai_sepolia/xai_sepolia.go | 40 +- .../xai_sepolia/xai_sepolia_index_types.pb.go | 445 ++++++++++------- .../xai_sepolia/xai_sepolia_index_types.proto | 9 +- crawler/README.md | 17 +- dev.sh | 10 + prepare_blockchains.sh | 23 + 33 files changed, 2676 insertions(+), 1781 deletions(-) create mode 100755 dev.sh create mode 100755 prepare_blockchains.sh diff --git a/blockchain/arbitrum_one/arbitrum_one.go b/blockchain/arbitrum_one/arbitrum_one.go index 9b33819..1012316 100644 --- a/blockchain/arbitrum_one/arbitrum_one.go +++ b/blockchain/arbitrum_one/arbitrum_one.go @@ -353,11 +353,11 @@ func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]i } func ToProtoSingleBlock(obj *seer_common.BlockJson) *ArbitrumOneBlock { return &ArbitrumOneBlock{ - BlockNumber: obj.BlockNumber, - Difficulty: obj.Difficulty, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), + Difficulty: fromHex(obj.Difficulty).Uint64(), ExtraData: obj.ExtraData, - GasLimit: obj.GasLimit, - GasUsed: obj.GasUsed, + GasLimit: fromHex(obj.GasLimit).Uint64(), + GasUsed: fromHex(obj.GasUsed).Uint64(), BaseFeePerGas: obj.BaseFeePerGas, Hash: obj.Hash, LogsBloom: obj.LogsBloom, @@ -366,24 +366,32 @@ func ToProtoSingleBlock(obj *seer_common.BlockJson) *ArbitrumOneBlock { ParentHash: obj.ParentHash, ReceiptsRoot: obj.ReceiptsRoot, Sha3Uncles: obj.Sha3Uncles, - Size: obj.Size, + Size: fromHex(obj.Size).Uint64(), StateRoot: obj.StateRoot, - Timestamp: obj.Timestamp, + Timestamp: fromHex(obj.Timestamp).Uint64(), TotalDifficulty: obj.TotalDifficulty, TransactionsRoot: obj.TransactionsRoot, - IndexedAt: obj.IndexedAt, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), MixHash: obj.MixHash, SendCount: obj.SendCount, SendRoot: obj.SendRoot, - L1BlockNumber: obj.L1BlockNumber, + L1BlockNumber: fromHex(obj.L1BlockNumber).Uint64(), } } func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *ArbitrumOneTransaction { + var accessList []*ArbitrumOneTransactionAccessList + for _, al := range obj.AccessList { + accessList = append(accessList, &ArbitrumOneTransactionAccessList{ + Address: al.Address, + StorageKeys: al.StorageKeys, + }) + } + return &ArbitrumOneTransaction{ Hash: obj.Hash, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), BlockHash: obj.BlockHash, FromAddress: obj.FromAddress, ToAddress: obj.ToAddress, @@ -393,18 +401,18 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *ArbitrumOneTran MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, Input: obj.Input, Nonce: obj.Nonce, - TransactionIndex: obj.TransactionIndex, - TransactionType: obj.TransactionType, + TransactionIndex: fromHex(obj.TransactionIndex).Uint64(), + TransactionType: fromHex(obj.TransactionType).Uint64(), Value: obj.Value, - IndexedAt: obj.IndexedAt, - BlockTimestamp: obj.BlockTimestamp, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), + BlockTimestamp: fromHex(obj.BlockTimestamp).Uint64(), ChainId: obj.ChainId, V: obj.V, R: obj.R, S: obj.S, - AccessList: obj.AccessList, + AccessList: accessList, YParity: obj.YParity, } } @@ -415,9 +423,9 @@ func ToProtoSingleEventLog(obj *seer_common.EventJson) *ArbitrumOneEventLog { Address: obj.Address, Topics: obj.Topics, Data: obj.Data, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), TransactionHash: obj.TransactionHash, - LogIndex: obj.LogIndex, + LogIndex: fromHex(obj.LogIndex).Uint64(), BlockHash: obj.BlockHash, Removed: obj.Removed, } diff --git a/blockchain/arbitrum_one/arbitrum_one_index_types.pb.go b/blockchain/arbitrum_one/arbitrum_one_index_types.pb.go index ebd0810..de1e0ee 100644 --- a/blockchain/arbitrum_one/arbitrum_one_index_types.pb.go +++ b/blockchain/arbitrum_one/arbitrum_one_index_types.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.34.1 // protoc v3.6.1 -// source: arbitrum_one_index_types.proto +// source: blockchain/arbitrum_one/arbitrum_one_index_types.proto package arbitrum_one @@ -20,40 +20,95 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type ArbitrumOneTransactionAccessList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storage_keys,omitempty"` +} + +func (x *ArbitrumOneTransactionAccessList) Reset() { + *x = ArbitrumOneTransactionAccessList{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArbitrumOneTransactionAccessList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArbitrumOneTransactionAccessList) ProtoMessage() {} + +func (x *ArbitrumOneTransactionAccessList) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArbitrumOneTransactionAccessList.ProtoReflect.Descriptor instead. +func (*ArbitrumOneTransactionAccessList) Descriptor() ([]byte, []int) { + return file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *ArbitrumOneTransactionAccessList) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *ArbitrumOneTransactionAccessList) GetStorageKeys() []string { + if x != nil { + return x.StorageKeys + } + return nil +} + // Represents a single transaction within a block type ArbitrumOneTransaction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction - BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in - FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from - ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to - Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction - GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction - MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types - MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types - Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction - Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction - TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block - TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types - Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction - IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler - BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block - BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in - ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types - V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types - R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types - S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types - AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` - YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []*ArbitrumOneTransactionAccessList `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types } func (x *ArbitrumOneTransaction) Reset() { *x = ArbitrumOneTransaction{} if protoimpl.UnsafeEnabled { - mi := &file_arbitrum_one_index_types_proto_msgTypes[0] + mi := &file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -66,7 +121,7 @@ func (x *ArbitrumOneTransaction) String() string { func (*ArbitrumOneTransaction) ProtoMessage() {} func (x *ArbitrumOneTransaction) ProtoReflect() protoreflect.Message { - mi := &file_arbitrum_one_index_types_proto_msgTypes[0] + mi := &file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79,7 +134,7 @@ func (x *ArbitrumOneTransaction) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbitrumOneTransaction.ProtoReflect.Descriptor instead. func (*ArbitrumOneTransaction) Descriptor() ([]byte, []int) { - return file_arbitrum_one_index_types_proto_rawDescGZIP(), []int{0} + return file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_rawDescGZIP(), []int{1} } func (x *ArbitrumOneTransaction) GetHash() string { @@ -222,7 +277,7 @@ func (x *ArbitrumOneTransaction) GetS() string { return "" } -func (x *ArbitrumOneTransaction) GetAccessList() []string { +func (x *ArbitrumOneTransaction) GetAccessList() []*ArbitrumOneTransactionAccessList { if x != nil { return x.AccessList } @@ -271,7 +326,7 @@ type ArbitrumOneBlock struct { func (x *ArbitrumOneBlock) Reset() { *x = ArbitrumOneBlock{} if protoimpl.UnsafeEnabled { - mi := &file_arbitrum_one_index_types_proto_msgTypes[1] + mi := &file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -284,7 +339,7 @@ func (x *ArbitrumOneBlock) String() string { func (*ArbitrumOneBlock) ProtoMessage() {} func (x *ArbitrumOneBlock) ProtoReflect() protoreflect.Message { - mi := &file_arbitrum_one_index_types_proto_msgTypes[1] + mi := &file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -297,7 +352,7 @@ func (x *ArbitrumOneBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbitrumOneBlock.ProtoReflect.Descriptor instead. func (*ArbitrumOneBlock) Descriptor() ([]byte, []int) { - return file_arbitrum_one_index_types_proto_rawDescGZIP(), []int{1} + return file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_rawDescGZIP(), []int{2} } func (x *ArbitrumOneBlock) GetBlockNumber() uint64 { @@ -487,7 +542,7 @@ type ArbitrumOneEventLog struct { func (x *ArbitrumOneEventLog) Reset() { *x = ArbitrumOneEventLog{} if protoimpl.UnsafeEnabled { - mi := &file_arbitrum_one_index_types_proto_msgTypes[2] + mi := &file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -500,7 +555,7 @@ func (x *ArbitrumOneEventLog) String() string { func (*ArbitrumOneEventLog) ProtoMessage() {} func (x *ArbitrumOneEventLog) ProtoReflect() protoreflect.Message { - mi := &file_arbitrum_one_index_types_proto_msgTypes[2] + mi := &file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -513,7 +568,7 @@ func (x *ArbitrumOneEventLog) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbitrumOneEventLog.ProtoReflect.Descriptor instead. func (*ArbitrumOneEventLog) Descriptor() ([]byte, []int) { - return file_arbitrum_one_index_types_proto_rawDescGZIP(), []int{2} + return file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_rawDescGZIP(), []int{3} } func (x *ArbitrumOneEventLog) GetAddress() string { @@ -579,160 +634,187 @@ func (x *ArbitrumOneEventLog) GetTransactionIndex() uint64 { return 0 } -var File_arbitrum_one_index_types_proto protoreflect.FileDescriptor - -var file_arbitrum_one_index_types_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x5f, 0x6f, 0x6e, 0x65, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xa1, 0x05, 0x0a, 0x16, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x4f, 0x6e, 0x65, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, - 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, - 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, - 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, - 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, - 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, - 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, - 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, - 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, - 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, - 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, - 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, - 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, - 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, - 0x72, 0x69, 0x74, 0x79, 0x22, 0x9f, 0x06, 0x0a, 0x10, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, - 0x6d, 0x4f, 0x6e, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, - 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, - 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, - 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, - 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, - 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, - 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, - 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, - 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, - 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, - 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, - 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, - 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, - 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, - 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, - 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, - 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3b, 0x0a, 0x0c, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x4f, 0x6e, 0x65, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x78, 0x5f, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x78, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x17, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, - 0x0a, 0x0f, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xac, 0x02, 0x0a, 0x13, 0x41, 0x72, 0x62, 0x69, 0x74, - 0x72, 0x75, 0x6d, 0x4f, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, - 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, - 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, - 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, - 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, - 0x75, 0x6d, 0x5f, 0x6f, 0x6e, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_blockchain_arbitrum_one_arbitrum_one_index_types_proto protoreflect.FileDescriptor + +var file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_rawDesc = []byte{ + 0x0a, 0x36, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x61, 0x72, 0x62, + 0x69, 0x74, 0x72, 0x75, 0x6d, 0x5f, 0x6f, 0x6e, 0x65, 0x2f, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, + 0x75, 0x6d, 0x5f, 0x6f, 0x6e, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a, 0x20, 0x41, 0x72, 0x62, 0x69, + 0x74, 0x72, 0x75, 0x6d, 0x4f, 0x6e, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xc4, 0x05, 0x0a, 0x16, 0x41, 0x72, + 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x4f, 0x6e, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, + 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, + 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, + 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, + 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, + 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, + 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, + 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, + 0x73, 0x12, 0x42, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, + 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, + 0x6d, 0x4f, 0x6e, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, + 0x22, 0x9f, 0x06, 0x0a, 0x10, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x4f, 0x6e, 0x65, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, + 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, + 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, + 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, + 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, + 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, + 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, + 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, + 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3b, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x41, + 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x4f, 0x6e, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, + 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x16, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, + 0x09, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x31, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x18, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x22, 0xac, 0x02, 0x0a, 0x13, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x4f, + 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, + 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, + 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6d, 0x6f, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2d, 0x74, 0x6f, 0x2f, 0x73, 0x65, + 0x65, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x61, 0x72, + 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x5f, 0x6f, 0x6e, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( - file_arbitrum_one_index_types_proto_rawDescOnce sync.Once - file_arbitrum_one_index_types_proto_rawDescData = file_arbitrum_one_index_types_proto_rawDesc + file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_rawDescOnce sync.Once + file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_rawDescData = file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_rawDesc ) -func file_arbitrum_one_index_types_proto_rawDescGZIP() []byte { - file_arbitrum_one_index_types_proto_rawDescOnce.Do(func() { - file_arbitrum_one_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_arbitrum_one_index_types_proto_rawDescData) +func file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_rawDescGZIP() []byte { + file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_rawDescOnce.Do(func() { + file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_rawDescData) }) - return file_arbitrum_one_index_types_proto_rawDescData + return file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_rawDescData } -var file_arbitrum_one_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_arbitrum_one_index_types_proto_goTypes = []interface{}{ - (*ArbitrumOneTransaction)(nil), // 0: ArbitrumOneTransaction - (*ArbitrumOneBlock)(nil), // 1: ArbitrumOneBlock - (*ArbitrumOneEventLog)(nil), // 2: ArbitrumOneEventLog +var file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_goTypes = []interface{}{ + (*ArbitrumOneTransactionAccessList)(nil), // 0: ArbitrumOneTransactionAccessList + (*ArbitrumOneTransaction)(nil), // 1: ArbitrumOneTransaction + (*ArbitrumOneBlock)(nil), // 2: ArbitrumOneBlock + (*ArbitrumOneEventLog)(nil), // 3: ArbitrumOneEventLog } -var file_arbitrum_one_index_types_proto_depIdxs = []int32{ - 0, // 0: ArbitrumOneBlock.transactions:type_name -> ArbitrumOneTransaction - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name +var file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_depIdxs = []int32{ + 0, // 0: ArbitrumOneTransaction.access_list:type_name -> ArbitrumOneTransactionAccessList + 1, // 1: ArbitrumOneBlock.transactions:type_name -> ArbitrumOneTransaction + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } -func init() { file_arbitrum_one_index_types_proto_init() } -func file_arbitrum_one_index_types_proto_init() { - if File_arbitrum_one_index_types_proto != nil { +func init() { file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_init() } +func file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_init() { + if File_blockchain_arbitrum_one_arbitrum_one_index_types_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_arbitrum_one_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArbitrumOneTransactionAccessList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ArbitrumOneTransaction); i { case 0: return &v.state @@ -744,7 +826,7 @@ func file_arbitrum_one_index_types_proto_init() { return nil } } - file_arbitrum_one_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ArbitrumOneBlock); i { case 0: return &v.state @@ -756,7 +838,7 @@ func file_arbitrum_one_index_types_proto_init() { return nil } } - file_arbitrum_one_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ArbitrumOneEventLog); i { case 0: return &v.state @@ -773,18 +855,18 @@ func file_arbitrum_one_index_types_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_arbitrum_one_index_types_proto_rawDesc, + RawDescriptor: file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_arbitrum_one_index_types_proto_goTypes, - DependencyIndexes: file_arbitrum_one_index_types_proto_depIdxs, - MessageInfos: file_arbitrum_one_index_types_proto_msgTypes, + GoTypes: file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_goTypes, + DependencyIndexes: file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_depIdxs, + MessageInfos: file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_msgTypes, }.Build() - File_arbitrum_one_index_types_proto = out.File - file_arbitrum_one_index_types_proto_rawDesc = nil - file_arbitrum_one_index_types_proto_goTypes = nil - file_arbitrum_one_index_types_proto_depIdxs = nil + File_blockchain_arbitrum_one_arbitrum_one_index_types_proto = out.File + file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_rawDesc = nil + file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_goTypes = nil + file_blockchain_arbitrum_one_arbitrum_one_index_types_proto_depIdxs = nil } diff --git a/blockchain/arbitrum_one/arbitrum_one_index_types.proto b/blockchain/arbitrum_one/arbitrum_one_index_types.proto index cf7efe6..66ebda6 100644 --- a/blockchain/arbitrum_one/arbitrum_one_index_types.proto +++ b/blockchain/arbitrum_one/arbitrum_one_index_types.proto @@ -1,8 +1,13 @@ syntax = "proto3"; -option go_package = ".arbitrum_one"; +option go_package = "github.com/moonstream-to/seer/blockchain/arbitrum_one"; +message ArbitrumOneTransactionAccessList { + string address = 1; + repeated string storage_keys = 2; +} + // Represents a single transaction within a block message ArbitrumOneTransaction { string hash = 1; // The hash of the transaction @@ -26,7 +31,7 @@ message ArbitrumOneTransaction { string r = 19; // Used as a field to match potential EIP-1559 transaction types string s = 20; // Used as a field to match potential EIP-1559 transaction types - repeated string access_list = 21; + repeated ArbitrumOneTransactionAccessList access_list = 21; string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types } diff --git a/blockchain/arbitrum_sepolia/arbitrum_sepolia.go b/blockchain/arbitrum_sepolia/arbitrum_sepolia.go index a1eac8b..cbda535 100644 --- a/blockchain/arbitrum_sepolia/arbitrum_sepolia.go +++ b/blockchain/arbitrum_sepolia/arbitrum_sepolia.go @@ -353,11 +353,11 @@ func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]i } func ToProtoSingleBlock(obj *seer_common.BlockJson) *ArbitrumSepoliaBlock { return &ArbitrumSepoliaBlock{ - BlockNumber: obj.BlockNumber, - Difficulty: obj.Difficulty, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), + Difficulty: fromHex(obj.Difficulty).Uint64(), ExtraData: obj.ExtraData, - GasLimit: obj.GasLimit, - GasUsed: obj.GasUsed, + GasLimit: fromHex(obj.GasLimit).Uint64(), + GasUsed: fromHex(obj.GasUsed).Uint64(), BaseFeePerGas: obj.BaseFeePerGas, Hash: obj.Hash, LogsBloom: obj.LogsBloom, @@ -366,24 +366,32 @@ func ToProtoSingleBlock(obj *seer_common.BlockJson) *ArbitrumSepoliaBlock { ParentHash: obj.ParentHash, ReceiptsRoot: obj.ReceiptsRoot, Sha3Uncles: obj.Sha3Uncles, - Size: obj.Size, + Size: fromHex(obj.Size).Uint64(), StateRoot: obj.StateRoot, - Timestamp: obj.Timestamp, + Timestamp: fromHex(obj.Timestamp).Uint64(), TotalDifficulty: obj.TotalDifficulty, TransactionsRoot: obj.TransactionsRoot, - IndexedAt: obj.IndexedAt, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), MixHash: obj.MixHash, SendCount: obj.SendCount, SendRoot: obj.SendRoot, - L1BlockNumber: obj.L1BlockNumber, + L1BlockNumber: fromHex(obj.L1BlockNumber).Uint64(), } } func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *ArbitrumSepoliaTransaction { + var accessList []*ArbitrumSepoliaTransactionAccessList + for _, al := range obj.AccessList { + accessList = append(accessList, &ArbitrumSepoliaTransactionAccessList{ + Address: al.Address, + StorageKeys: al.StorageKeys, + }) + } + return &ArbitrumSepoliaTransaction{ Hash: obj.Hash, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), BlockHash: obj.BlockHash, FromAddress: obj.FromAddress, ToAddress: obj.ToAddress, @@ -393,18 +401,18 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *ArbitrumSepolia MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, Input: obj.Input, Nonce: obj.Nonce, - TransactionIndex: obj.TransactionIndex, - TransactionType: obj.TransactionType, + TransactionIndex: fromHex(obj.TransactionIndex).Uint64(), + TransactionType: fromHex(obj.TransactionType).Uint64(), Value: obj.Value, - IndexedAt: obj.IndexedAt, - BlockTimestamp: obj.BlockTimestamp, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), + BlockTimestamp: fromHex(obj.BlockTimestamp).Uint64(), ChainId: obj.ChainId, V: obj.V, R: obj.R, S: obj.S, - AccessList: obj.AccessList, + AccessList: accessList, YParity: obj.YParity, } } @@ -415,9 +423,9 @@ func ToProtoSingleEventLog(obj *seer_common.EventJson) *ArbitrumSepoliaEventLog Address: obj.Address, Topics: obj.Topics, Data: obj.Data, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), TransactionHash: obj.TransactionHash, - LogIndex: obj.LogIndex, + LogIndex: fromHex(obj.LogIndex).Uint64(), BlockHash: obj.BlockHash, Removed: obj.Removed, } diff --git a/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.pb.go b/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.pb.go index 7e377d1..1723204 100644 --- a/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.pb.go +++ b/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.34.1 // protoc v3.6.1 -// source: arbitrum_sepolia_index_types.proto +// source: blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.proto package arbitrum_sepolia @@ -20,40 +20,95 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type ArbitrumSepoliaTransactionAccessList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storage_keys,omitempty"` +} + +func (x *ArbitrumSepoliaTransactionAccessList) Reset() { + *x = ArbitrumSepoliaTransactionAccessList{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArbitrumSepoliaTransactionAccessList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArbitrumSepoliaTransactionAccessList) ProtoMessage() {} + +func (x *ArbitrumSepoliaTransactionAccessList) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArbitrumSepoliaTransactionAccessList.ProtoReflect.Descriptor instead. +func (*ArbitrumSepoliaTransactionAccessList) Descriptor() ([]byte, []int) { + return file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *ArbitrumSepoliaTransactionAccessList) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *ArbitrumSepoliaTransactionAccessList) GetStorageKeys() []string { + if x != nil { + return x.StorageKeys + } + return nil +} + // Represents a single transaction within a block type ArbitrumSepoliaTransaction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction - BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in - FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from - ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to - Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction - GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction - MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types - MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types - Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction - Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction - TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block - TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types - Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction - IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler - BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block - BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in - ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types - V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types - R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types - S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types - AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` - YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []*ArbitrumSepoliaTransactionAccessList `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types } func (x *ArbitrumSepoliaTransaction) Reset() { *x = ArbitrumSepoliaTransaction{} if protoimpl.UnsafeEnabled { - mi := &file_arbitrum_sepolia_index_types_proto_msgTypes[0] + mi := &file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -66,7 +121,7 @@ func (x *ArbitrumSepoliaTransaction) String() string { func (*ArbitrumSepoliaTransaction) ProtoMessage() {} func (x *ArbitrumSepoliaTransaction) ProtoReflect() protoreflect.Message { - mi := &file_arbitrum_sepolia_index_types_proto_msgTypes[0] + mi := &file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79,7 +134,7 @@ func (x *ArbitrumSepoliaTransaction) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbitrumSepoliaTransaction.ProtoReflect.Descriptor instead. func (*ArbitrumSepoliaTransaction) Descriptor() ([]byte, []int) { - return file_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{0} + return file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{1} } func (x *ArbitrumSepoliaTransaction) GetHash() string { @@ -222,7 +277,7 @@ func (x *ArbitrumSepoliaTransaction) GetS() string { return "" } -func (x *ArbitrumSepoliaTransaction) GetAccessList() []string { +func (x *ArbitrumSepoliaTransaction) GetAccessList() []*ArbitrumSepoliaTransactionAccessList { if x != nil { return x.AccessList } @@ -271,7 +326,7 @@ type ArbitrumSepoliaBlock struct { func (x *ArbitrumSepoliaBlock) Reset() { *x = ArbitrumSepoliaBlock{} if protoimpl.UnsafeEnabled { - mi := &file_arbitrum_sepolia_index_types_proto_msgTypes[1] + mi := &file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -284,7 +339,7 @@ func (x *ArbitrumSepoliaBlock) String() string { func (*ArbitrumSepoliaBlock) ProtoMessage() {} func (x *ArbitrumSepoliaBlock) ProtoReflect() protoreflect.Message { - mi := &file_arbitrum_sepolia_index_types_proto_msgTypes[1] + mi := &file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -297,7 +352,7 @@ func (x *ArbitrumSepoliaBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbitrumSepoliaBlock.ProtoReflect.Descriptor instead. func (*ArbitrumSepoliaBlock) Descriptor() ([]byte, []int) { - return file_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{1} + return file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{2} } func (x *ArbitrumSepoliaBlock) GetBlockNumber() uint64 { @@ -487,7 +542,7 @@ type ArbitrumSepoliaEventLog struct { func (x *ArbitrumSepoliaEventLog) Reset() { *x = ArbitrumSepoliaEventLog{} if protoimpl.UnsafeEnabled { - mi := &file_arbitrum_sepolia_index_types_proto_msgTypes[2] + mi := &file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -500,7 +555,7 @@ func (x *ArbitrumSepoliaEventLog) String() string { func (*ArbitrumSepoliaEventLog) ProtoMessage() {} func (x *ArbitrumSepoliaEventLog) ProtoReflect() protoreflect.Message { - mi := &file_arbitrum_sepolia_index_types_proto_msgTypes[2] + mi := &file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -513,7 +568,7 @@ func (x *ArbitrumSepoliaEventLog) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbitrumSepoliaEventLog.ProtoReflect.Descriptor instead. func (*ArbitrumSepoliaEventLog) Descriptor() ([]byte, []int) { - return file_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{2} + return file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{3} } func (x *ArbitrumSepoliaEventLog) GetAddress() string { @@ -579,162 +634,189 @@ func (x *ArbitrumSepoliaEventLog) GetTransactionIndex() uint64 { return 0 } -var File_arbitrum_sepolia_index_types_proto protoreflect.FileDescriptor - -var file_arbitrum_sepolia_index_types_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, - 0x69, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5, 0x05, 0x0a, 0x1a, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, +var File_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto protoreflect.FileDescriptor + +var file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_rawDesc = []byte{ + 0x0a, 0x3e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x61, 0x72, 0x62, + 0x69, 0x74, 0x72, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x2f, 0x61, 0x72, + 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x63, 0x0a, 0x24, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, + 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6b, 0x65, + 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xcc, 0x05, 0x0a, 0x1a, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, + 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, + 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, + 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, + 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, + 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, + 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, + 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, + 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, + 0x73, 0x12, 0x46, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, + 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, - 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, - 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, - 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, - 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, - 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, - 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, - 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, - 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0xa7, 0x06, 0x0a, - 0x14, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, - 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, - 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, - 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, - 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, - 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, - 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, - 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, - 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, - 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, - 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, - 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, - 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, - 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, - 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x41, - 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x78, 0x5f, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x78, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x17, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, - 0x0a, 0x0f, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xb0, 0x02, 0x0a, 0x17, 0x41, 0x72, 0x62, 0x69, 0x74, - 0x72, 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, - 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, - 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, - 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, - 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x61, 0x72, + 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0a, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, + 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, + 0x72, 0x69, 0x74, 0x79, 0x22, 0xa7, 0x06, 0x0a, 0x14, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, + 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, + 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, + 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, + 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, + 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, + 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, + 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, + 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, + 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, + 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, + 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, + 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, + 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, + 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3f, + 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, + 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x15, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6d, 0x69, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, + 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6e, + 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, + 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xb0, + 0x02, 0x0a, 0x17, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, + 0x69, 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, + 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, + 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6d, 0x6f, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2d, 0x74, 0x6f, 0x2f, 0x73, 0x65, + 0x65, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_arbitrum_sepolia_index_types_proto_rawDescOnce sync.Once - file_arbitrum_sepolia_index_types_proto_rawDescData = file_arbitrum_sepolia_index_types_proto_rawDesc + file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_rawDescOnce sync.Once + file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_rawDescData = file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_rawDesc ) -func file_arbitrum_sepolia_index_types_proto_rawDescGZIP() []byte { - file_arbitrum_sepolia_index_types_proto_rawDescOnce.Do(func() { - file_arbitrum_sepolia_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_arbitrum_sepolia_index_types_proto_rawDescData) +func file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_rawDescGZIP() []byte { + file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_rawDescOnce.Do(func() { + file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_rawDescData) }) - return file_arbitrum_sepolia_index_types_proto_rawDescData + return file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_rawDescData } -var file_arbitrum_sepolia_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_arbitrum_sepolia_index_types_proto_goTypes = []interface{}{ - (*ArbitrumSepoliaTransaction)(nil), // 0: ArbitrumSepoliaTransaction - (*ArbitrumSepoliaBlock)(nil), // 1: ArbitrumSepoliaBlock - (*ArbitrumSepoliaEventLog)(nil), // 2: ArbitrumSepoliaEventLog +var file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_goTypes = []interface{}{ + (*ArbitrumSepoliaTransactionAccessList)(nil), // 0: ArbitrumSepoliaTransactionAccessList + (*ArbitrumSepoliaTransaction)(nil), // 1: ArbitrumSepoliaTransaction + (*ArbitrumSepoliaBlock)(nil), // 2: ArbitrumSepoliaBlock + (*ArbitrumSepoliaEventLog)(nil), // 3: ArbitrumSepoliaEventLog } -var file_arbitrum_sepolia_index_types_proto_depIdxs = []int32{ - 0, // 0: ArbitrumSepoliaBlock.transactions:type_name -> ArbitrumSepoliaTransaction - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name +var file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_depIdxs = []int32{ + 0, // 0: ArbitrumSepoliaTransaction.access_list:type_name -> ArbitrumSepoliaTransactionAccessList + 1, // 1: ArbitrumSepoliaBlock.transactions:type_name -> ArbitrumSepoliaTransaction + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } -func init() { file_arbitrum_sepolia_index_types_proto_init() } -func file_arbitrum_sepolia_index_types_proto_init() { - if File_arbitrum_sepolia_index_types_proto != nil { +func init() { file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_init() } +func file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_init() { + if File_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_arbitrum_sepolia_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArbitrumSepoliaTransactionAccessList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ArbitrumSepoliaTransaction); i { case 0: return &v.state @@ -746,7 +828,7 @@ func file_arbitrum_sepolia_index_types_proto_init() { return nil } } - file_arbitrum_sepolia_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ArbitrumSepoliaBlock); i { case 0: return &v.state @@ -758,7 +840,7 @@ func file_arbitrum_sepolia_index_types_proto_init() { return nil } } - file_arbitrum_sepolia_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ArbitrumSepoliaEventLog); i { case 0: return &v.state @@ -775,18 +857,18 @@ func file_arbitrum_sepolia_index_types_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_arbitrum_sepolia_index_types_proto_rawDesc, + RawDescriptor: file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_arbitrum_sepolia_index_types_proto_goTypes, - DependencyIndexes: file_arbitrum_sepolia_index_types_proto_depIdxs, - MessageInfos: file_arbitrum_sepolia_index_types_proto_msgTypes, + GoTypes: file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_goTypes, + DependencyIndexes: file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_depIdxs, + MessageInfos: file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_msgTypes, }.Build() - File_arbitrum_sepolia_index_types_proto = out.File - file_arbitrum_sepolia_index_types_proto_rawDesc = nil - file_arbitrum_sepolia_index_types_proto_goTypes = nil - file_arbitrum_sepolia_index_types_proto_depIdxs = nil + File_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto = out.File + file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_rawDesc = nil + file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_goTypes = nil + file_blockchain_arbitrum_sepolia_arbitrum_sepolia_index_types_proto_depIdxs = nil } diff --git a/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.proto b/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.proto index 62ae5ae..dc8d3eb 100644 --- a/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.proto +++ b/blockchain/arbitrum_sepolia/arbitrum_sepolia_index_types.proto @@ -1,8 +1,13 @@ syntax = "proto3"; -option go_package = ".arbitrum_sepolia"; +option go_package = "github.com/moonstream-to/seer/blockchain/arbitrum_sepolia"; +message ArbitrumSepoliaTransactionAccessList { + string address = 1; + repeated string storage_keys = 2; +} + // Represents a single transaction within a block message ArbitrumSepoliaTransaction { string hash = 1; // The hash of the transaction @@ -26,7 +31,7 @@ message ArbitrumSepoliaTransaction { string r = 19; // Used as a field to match potential EIP-1559 transaction types string s = 20; // Used as a field to match potential EIP-1559 transaction types - repeated string access_list = 21; + repeated ArbitrumSepoliaTransactionAccessList access_list = 21; string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types } diff --git a/blockchain/blockchain.go.tmpl b/blockchain/blockchain.go.tmpl index 5a724ec..1b8ffb9 100644 --- a/blockchain/blockchain.go.tmpl +++ b/blockchain/blockchain.go.tmpl @@ -353,11 +353,11 @@ func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]i } func ToProtoSingleBlock(obj *seer_common.BlockJson) *{{.BlockchainName}}Block { return &{{.BlockchainName}}Block{ - BlockNumber: obj.BlockNumber, - Difficulty: obj.Difficulty, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), + Difficulty: fromHex(obj.Difficulty).Uint64(), ExtraData: obj.ExtraData, - GasLimit: obj.GasLimit, - GasUsed: obj.GasUsed, + GasLimit: fromHex(obj.GasLimit).Uint64(), + GasUsed: fromHex(obj.GasUsed).Uint64(), BaseFeePerGas: obj.BaseFeePerGas, Hash: obj.Hash, LogsBloom: obj.LogsBloom, @@ -366,24 +366,32 @@ func ToProtoSingleBlock(obj *seer_common.BlockJson) *{{.BlockchainName}}Block { ParentHash: obj.ParentHash, ReceiptsRoot: obj.ReceiptsRoot, Sha3Uncles: obj.Sha3Uncles, - Size: obj.Size, + Size: fromHex(obj.Size).Uint64(), StateRoot: obj.StateRoot, - Timestamp: obj.Timestamp, + Timestamp: fromHex(obj.Timestamp).Uint64(), TotalDifficulty: obj.TotalDifficulty, TransactionsRoot: obj.TransactionsRoot, - IndexedAt: obj.IndexedAt, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), {{if .IsSideChain -}} MixHash: obj.MixHash, {{end}} {{if .IsSideChain -}} SendCount: obj.SendCount, {{end}} {{if .IsSideChain -}} SendRoot: obj.SendRoot, {{end}} - {{if .IsSideChain -}} L1BlockNumber: obj.L1BlockNumber, {{end}} + {{if .IsSideChain -}} L1BlockNumber: fromHex(obj.L1BlockNumber).Uint64(), {{end}} } } func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *{{.BlockchainName}}Transaction { + var accessList []*{{.BlockchainName}}TransactionAccessList + for _, al := range obj.AccessList { + accessList = append(accessList, &{{.BlockchainName}}TransactionAccessList{ + Address: al.Address, + StorageKeys: al.StorageKeys, + }) + } + return &{{.BlockchainName}}Transaction{ Hash: obj.Hash, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), BlockHash: obj.BlockHash, FromAddress: obj.FromAddress, ToAddress: obj.ToAddress, @@ -393,18 +401,18 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *{{.BlockchainNa MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, Input: obj.Input, Nonce: obj.Nonce, - TransactionIndex: obj.TransactionIndex, - TransactionType: obj.TransactionType, + TransactionIndex: fromHex(obj.TransactionIndex).Uint64(), + TransactionType: fromHex(obj.TransactionType).Uint64(), Value: obj.Value, - IndexedAt: obj.IndexedAt, - BlockTimestamp: obj.BlockTimestamp, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), + BlockTimestamp: fromHex(obj.BlockTimestamp).Uint64(), ChainId: obj.ChainId, V: obj.V, R: obj.R, S: obj.S, - AccessList: obj.AccessList, + AccessList: accessList, YParity: obj.YParity, } } @@ -415,9 +423,9 @@ func ToProtoSingleEventLog(obj *seer_common.EventJson) *{{.BlockchainName}}Event Address: obj.Address, Topics: obj.Topics, Data: obj.Data, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), TransactionHash: obj.TransactionHash, - LogIndex: obj.LogIndex, + LogIndex: fromHex(obj.LogIndex).Uint64(), BlockHash: obj.BlockHash, Removed: obj.Removed, } diff --git a/blockchain/common/decoding.go b/blockchain/common/decoding.go index cbb0ff9..1c34bfc 100644 --- a/blockchain/common/decoding.go +++ b/blockchain/common/decoding.go @@ -14,37 +14,37 @@ import ( ) type BlockJson struct { - Difficulty uint64 `json:"difficulty"` + Difficulty string `json:"difficulty"` ExtraData string `json:"extraData"` - GasLimit uint64 `json:"gasLimit"` - GasUsed uint64 `json:"gasUsed"` + 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 uint64 `json:"number"` + BlockNumber string `json:"number"` ParentHash string `json:"parentHash"` ReceiptsRoot string `json:"receiptsRoot"` Sha3Uncles string `json:"sha3Uncles"` StateRoot string `json:"stateRoot"` - Timestamp uint64 `json:"timestamp"` + Timestamp string `json:"timestamp"` TotalDifficulty string `json:"totalDifficulty"` TransactionsRoot string `json:"transactionsRoot"` - Size uint64 `json:"size"` + Size string `json:"size"` BaseFeePerGas string `json:"baseFeePerGas"` - IndexedAt uint64 `json:"indexed_at"` + IndexedAt string `json:"indexed_at"` MixHash string `json:"mixHash,omitempty"` SendCount string `json:"sendCount,omitempty"` SendRoot string `json:"sendRoot,omitempty"` - L1BlockNumber uint64 `json:"l1BlockNumber,omitempty"` + L1BlockNumber string `json:"l1BlockNumber,omitempty"` Transactions []TransactionJson `json:"transactions,omitempty"` } type TransactionJson struct { BlockHash string `json:"blockHash"` - BlockNumber uint64 `json:"blockNumber"` + BlockNumber string `json:"blockNumber"` ChainId string `json:"chainId"` FromAddress string `json:"from"` Gas string `json:"gas"` @@ -58,14 +58,14 @@ type TransactionJson struct { R string `json:"r"` S string `json:"s"` ToAddress string `json:"to"` - TransactionIndex uint64 `json:"transactionIndex"` - TransactionType uint64 `json:"type"` + TransactionIndex string `json:"transactionIndex"` + TransactionType string `json:"type"` Value string `json:"value"` - IndexedAt uint64 `json:"indexed_at"` - BlockTimestamp uint64 `json:"block_timestamp"` + IndexedAt string `json:"indexed_at"` + BlockTimestamp string `json:"block_timestamp"` - AccessList []string `json:"accessList,omitempty"` // TODO(kompotkot): Use AccessList struct - YParity string `json:"yParity,omitempty"` + AccessList []AccessList `json:"accessList,omitempty"` + YParity string `json:"yParity,omitempty"` } type AccessList struct { @@ -78,12 +78,12 @@ type EventJson struct { Address string `json:"address"` Topics []string `json:"topics"` Data string `json:"data"` - BlockNumber uint64 `json:"blockNumber"` + BlockNumber string `json:"blockNumber"` TransactionHash string `json:"transactionHash"` BlockHash string `json:"blockHash"` Removed bool `json:"removed"` - LogIndex uint64 `json:"logIndex"` - TransactionIndex uint64 `json:"transactionIndex"` + LogIndex string `json:"logIndex"` + TransactionIndex string `json:"transactionIndex"` } type QueryFilter struct { diff --git a/blockchain/ethereum/ethereum.go b/blockchain/ethereum/ethereum.go index 9dfe7da..d35877b 100644 --- a/blockchain/ethereum/ethereum.go +++ b/blockchain/ethereum/ethereum.go @@ -353,11 +353,11 @@ func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]i } func ToProtoSingleBlock(obj *seer_common.BlockJson) *EthereumBlock { return &EthereumBlock{ - BlockNumber: obj.BlockNumber, - Difficulty: obj.Difficulty, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), + Difficulty: fromHex(obj.Difficulty).Uint64(), ExtraData: obj.ExtraData, - GasLimit: obj.GasLimit, - GasUsed: obj.GasUsed, + GasLimit: fromHex(obj.GasLimit).Uint64(), + GasUsed: fromHex(obj.GasUsed).Uint64(), BaseFeePerGas: obj.BaseFeePerGas, Hash: obj.Hash, LogsBloom: obj.LogsBloom, @@ -366,19 +366,27 @@ func ToProtoSingleBlock(obj *seer_common.BlockJson) *EthereumBlock { ParentHash: obj.ParentHash, ReceiptsRoot: obj.ReceiptsRoot, Sha3Uncles: obj.Sha3Uncles, - Size: obj.Size, + Size: fromHex(obj.Size).Uint64(), StateRoot: obj.StateRoot, - Timestamp: obj.Timestamp, + Timestamp: fromHex(obj.Timestamp).Uint64(), TotalDifficulty: obj.TotalDifficulty, TransactionsRoot: obj.TransactionsRoot, - IndexedAt: obj.IndexedAt, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), } } func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *EthereumTransaction { + var accessList []*EthereumTransactionAccessList + for _, al := range obj.AccessList { + accessList = append(accessList, &EthereumTransactionAccessList{ + Address: al.Address, + StorageKeys: al.StorageKeys, + }) + } + return &EthereumTransaction{ Hash: obj.Hash, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), BlockHash: obj.BlockHash, FromAddress: obj.FromAddress, ToAddress: obj.ToAddress, @@ -388,18 +396,18 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *EthereumTransac MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, Input: obj.Input, Nonce: obj.Nonce, - TransactionIndex: obj.TransactionIndex, - TransactionType: obj.TransactionType, + TransactionIndex: fromHex(obj.TransactionIndex).Uint64(), + TransactionType: fromHex(obj.TransactionType).Uint64(), Value: obj.Value, - IndexedAt: obj.IndexedAt, - BlockTimestamp: obj.BlockTimestamp, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), + BlockTimestamp: fromHex(obj.BlockTimestamp).Uint64(), ChainId: obj.ChainId, V: obj.V, R: obj.R, S: obj.S, - AccessList: obj.AccessList, + AccessList: accessList, YParity: obj.YParity, } } @@ -410,9 +418,9 @@ func ToProtoSingleEventLog(obj *seer_common.EventJson) *EthereumEventLog { Address: obj.Address, Topics: obj.Topics, Data: obj.Data, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), TransactionHash: obj.TransactionHash, - LogIndex: obj.LogIndex, + LogIndex: fromHex(obj.LogIndex).Uint64(), BlockHash: obj.BlockHash, Removed: obj.Removed, } diff --git a/blockchain/ethereum/ethereum_index_types.pb.go b/blockchain/ethereum/ethereum_index_types.pb.go index 4c57aee..844e115 100644 --- a/blockchain/ethereum/ethereum_index_types.pb.go +++ b/blockchain/ethereum/ethereum_index_types.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.34.1 // protoc v3.6.1 -// source: ethereum_index_types.proto +// source: blockchain/ethereum/ethereum_index_types.proto package ethereum @@ -20,40 +20,95 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type EthereumTransactionAccessList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storage_keys,omitempty"` +} + +func (x *EthereumTransactionAccessList) Reset() { + *x = EthereumTransactionAccessList{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_ethereum_ethereum_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EthereumTransactionAccessList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumTransactionAccessList) ProtoMessage() {} + +func (x *EthereumTransactionAccessList) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_ethereum_ethereum_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumTransactionAccessList.ProtoReflect.Descriptor instead. +func (*EthereumTransactionAccessList) Descriptor() ([]byte, []int) { + return file_blockchain_ethereum_ethereum_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *EthereumTransactionAccessList) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *EthereumTransactionAccessList) GetStorageKeys() []string { + if x != nil { + return x.StorageKeys + } + return nil +} + // Represents a single transaction within a block type EthereumTransaction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` - ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` - Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // using string to handle big numeric values - GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` - MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` - MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` - Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // could be a long text - Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` - TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` - TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` - Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // using string to handle big numeric values - IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // using uint64 to represent timestamp - BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // using uint64 to represent timestam - BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Added field for block hash - ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types - V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types - R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types - S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types - AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` - YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // using string to handle big numeric values + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // could be a long text + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // using string to handle big numeric values + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // using uint64 to represent timestamp + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // using uint64 to represent timestam + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Added field for block hash + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []*EthereumTransactionAccessList `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types } func (x *EthereumTransaction) Reset() { *x = EthereumTransaction{} if protoimpl.UnsafeEnabled { - mi := &file_ethereum_index_types_proto_msgTypes[0] + mi := &file_blockchain_ethereum_ethereum_index_types_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -66,7 +121,7 @@ func (x *EthereumTransaction) String() string { func (*EthereumTransaction) ProtoMessage() {} func (x *EthereumTransaction) ProtoReflect() protoreflect.Message { - mi := &file_ethereum_index_types_proto_msgTypes[0] + mi := &file_blockchain_ethereum_ethereum_index_types_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79,7 +134,7 @@ func (x *EthereumTransaction) ProtoReflect() protoreflect.Message { // Deprecated: Use EthereumTransaction.ProtoReflect.Descriptor instead. func (*EthereumTransaction) Descriptor() ([]byte, []int) { - return file_ethereum_index_types_proto_rawDescGZIP(), []int{0} + return file_blockchain_ethereum_ethereum_index_types_proto_rawDescGZIP(), []int{1} } func (x *EthereumTransaction) GetHash() string { @@ -222,7 +277,7 @@ func (x *EthereumTransaction) GetS() string { return "" } -func (x *EthereumTransaction) GetAccessList() []string { +func (x *EthereumTransaction) GetAccessList() []*EthereumTransactionAccessList { if x != nil { return x.AccessList } @@ -267,7 +322,7 @@ type EthereumBlock struct { func (x *EthereumBlock) Reset() { *x = EthereumBlock{} if protoimpl.UnsafeEnabled { - mi := &file_ethereum_index_types_proto_msgTypes[1] + mi := &file_blockchain_ethereum_ethereum_index_types_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -280,7 +335,7 @@ func (x *EthereumBlock) String() string { func (*EthereumBlock) ProtoMessage() {} func (x *EthereumBlock) ProtoReflect() protoreflect.Message { - mi := &file_ethereum_index_types_proto_msgTypes[1] + mi := &file_blockchain_ethereum_ethereum_index_types_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -293,7 +348,7 @@ func (x *EthereumBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use EthereumBlock.ProtoReflect.Descriptor instead. func (*EthereumBlock) Descriptor() ([]byte, []int) { - return file_ethereum_index_types_proto_rawDescGZIP(), []int{1} + return file_blockchain_ethereum_ethereum_index_types_proto_rawDescGZIP(), []int{2} } func (x *EthereumBlock) GetBlockNumber() uint64 { @@ -455,7 +510,7 @@ type EthereumEventLog struct { func (x *EthereumEventLog) Reset() { *x = EthereumEventLog{} if protoimpl.UnsafeEnabled { - mi := &file_ethereum_index_types_proto_msgTypes[2] + mi := &file_blockchain_ethereum_ethereum_index_types_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -468,7 +523,7 @@ func (x *EthereumEventLog) String() string { func (*EthereumEventLog) ProtoMessage() {} func (x *EthereumEventLog) ProtoReflect() protoreflect.Message { - mi := &file_ethereum_index_types_proto_msgTypes[2] + mi := &file_blockchain_ethereum_ethereum_index_types_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -481,7 +536,7 @@ func (x *EthereumEventLog) ProtoReflect() protoreflect.Message { // Deprecated: Use EthereumEventLog.ProtoReflect.Descriptor instead. func (*EthereumEventLog) Descriptor() ([]byte, []int) { - return file_ethereum_index_types_proto_rawDescGZIP(), []int{2} + return file_blockchain_ethereum_ethereum_index_types_proto_rawDescGZIP(), []int{3} } func (x *EthereumEventLog) GetAddress() string { @@ -547,151 +602,177 @@ func (x *EthereumEventLog) GetTransactionIndex() uint64 { return 0 } -var File_ethereum_index_types_proto protoreflect.FileDescriptor - -var file_ethereum_index_types_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9e, 0x05, 0x0a, - 0x13, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, - 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, - 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, - 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, - 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, - 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, - 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, - 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, - 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, - 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0x9a, 0x05, - 0x0a, 0x0d, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, - 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, - 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, - 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, - 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, - 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, - 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, - 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, - 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, - 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, - 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, - 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, - 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, - 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa9, 0x02, 0x0a, 0x10, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, - 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, - 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, - 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, +var File_blockchain_ethereum_ethereum_index_types_proto protoreflect.FileDescriptor + +var file_blockchain_ethereum_ethereum_index_types_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x5c, 0x0a, 0x1d, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xbe, + 0x05, 0x0a, 0x13, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, + 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, + 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, + 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, + 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, + 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, + 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, + 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x01, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, + 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, + 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, + 0x9a, 0x05, 0x0a, 0x0d, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, + 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, + 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, + 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, + 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, + 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, + 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, + 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, + 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, + 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa9, 0x02, 0x0a, + 0x10, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, + 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, + 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, + 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, + 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x6f, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x2d, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x65, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_ethereum_index_types_proto_rawDescOnce sync.Once - file_ethereum_index_types_proto_rawDescData = file_ethereum_index_types_proto_rawDesc + file_blockchain_ethereum_ethereum_index_types_proto_rawDescOnce sync.Once + file_blockchain_ethereum_ethereum_index_types_proto_rawDescData = file_blockchain_ethereum_ethereum_index_types_proto_rawDesc ) -func file_ethereum_index_types_proto_rawDescGZIP() []byte { - file_ethereum_index_types_proto_rawDescOnce.Do(func() { - file_ethereum_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_ethereum_index_types_proto_rawDescData) +func file_blockchain_ethereum_ethereum_index_types_proto_rawDescGZIP() []byte { + file_blockchain_ethereum_ethereum_index_types_proto_rawDescOnce.Do(func() { + file_blockchain_ethereum_ethereum_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_blockchain_ethereum_ethereum_index_types_proto_rawDescData) }) - return file_ethereum_index_types_proto_rawDescData + return file_blockchain_ethereum_ethereum_index_types_proto_rawDescData } -var file_ethereum_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_ethereum_index_types_proto_goTypes = []interface{}{ - (*EthereumTransaction)(nil), // 0: EthereumTransaction - (*EthereumBlock)(nil), // 1: EthereumBlock - (*EthereumEventLog)(nil), // 2: EthereumEventLog +var file_blockchain_ethereum_ethereum_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_blockchain_ethereum_ethereum_index_types_proto_goTypes = []interface{}{ + (*EthereumTransactionAccessList)(nil), // 0: EthereumTransactionAccessList + (*EthereumTransaction)(nil), // 1: EthereumTransaction + (*EthereumBlock)(nil), // 2: EthereumBlock + (*EthereumEventLog)(nil), // 3: EthereumEventLog } -var file_ethereum_index_types_proto_depIdxs = []int32{ - 0, // 0: EthereumBlock.transactions:type_name -> EthereumTransaction - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name +var file_blockchain_ethereum_ethereum_index_types_proto_depIdxs = []int32{ + 0, // 0: EthereumTransaction.access_list:type_name -> EthereumTransactionAccessList + 1, // 1: EthereumBlock.transactions:type_name -> EthereumTransaction + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } -func init() { file_ethereum_index_types_proto_init() } -func file_ethereum_index_types_proto_init() { - if File_ethereum_index_types_proto != nil { +func init() { file_blockchain_ethereum_ethereum_index_types_proto_init() } +func file_blockchain_ethereum_ethereum_index_types_proto_init() { + if File_blockchain_ethereum_ethereum_index_types_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_ethereum_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_ethereum_ethereum_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EthereumTransactionAccessList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_ethereum_ethereum_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EthereumTransaction); i { case 0: return &v.state @@ -703,7 +784,7 @@ func file_ethereum_index_types_proto_init() { return nil } } - file_ethereum_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_ethereum_ethereum_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EthereumBlock); i { case 0: return &v.state @@ -715,7 +796,7 @@ func file_ethereum_index_types_proto_init() { return nil } } - file_ethereum_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_ethereum_ethereum_index_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EthereumEventLog); i { case 0: return &v.state @@ -732,18 +813,18 @@ func file_ethereum_index_types_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ethereum_index_types_proto_rawDesc, + RawDescriptor: file_blockchain_ethereum_ethereum_index_types_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_ethereum_index_types_proto_goTypes, - DependencyIndexes: file_ethereum_index_types_proto_depIdxs, - MessageInfos: file_ethereum_index_types_proto_msgTypes, + GoTypes: file_blockchain_ethereum_ethereum_index_types_proto_goTypes, + DependencyIndexes: file_blockchain_ethereum_ethereum_index_types_proto_depIdxs, + MessageInfos: file_blockchain_ethereum_ethereum_index_types_proto_msgTypes, }.Build() - File_ethereum_index_types_proto = out.File - file_ethereum_index_types_proto_rawDesc = nil - file_ethereum_index_types_proto_goTypes = nil - file_ethereum_index_types_proto_depIdxs = nil + File_blockchain_ethereum_ethereum_index_types_proto = out.File + file_blockchain_ethereum_ethereum_index_types_proto_rawDesc = nil + file_blockchain_ethereum_ethereum_index_types_proto_goTypes = nil + file_blockchain_ethereum_ethereum_index_types_proto_depIdxs = nil } diff --git a/blockchain/ethereum/ethereum_index_types.proto b/blockchain/ethereum/ethereum_index_types.proto index 8ba62df..38c5e56 100644 --- a/blockchain/ethereum/ethereum_index_types.proto +++ b/blockchain/ethereum/ethereum_index_types.proto @@ -1,8 +1,13 @@ syntax = "proto3"; -option go_package = ".ethereum"; +option go_package = "github.com/moonstream-to/seer/blockchain/ethereum"; +message EthereumTransactionAccessList { + string address = 1; + repeated string storage_keys = 2; +} + // Represents a single transaction within a block message EthereumTransaction { string hash = 1; @@ -26,7 +31,7 @@ message EthereumTransaction { string r = 19; // Used as a field to match potential EIP-1559 transaction types string s = 20; // Used as a field to match potential EIP-1559 transaction types - repeated string access_list = 21; + repeated EthereumTransactionAccessList access_list = 21; string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types } @@ -54,7 +59,6 @@ message EthereumBlock { repeated EthereumTransaction transactions = 20; } - message EthereumEventLog { string address = 1; // The address of the contract that generated the log repeated string topics = 2; // Topics are indexed parameters during log generation diff --git a/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia.go b/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia.go index 4d3d210..a464747 100644 --- a/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia.go +++ b/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia.go @@ -353,11 +353,11 @@ func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]i } func ToProtoSingleBlock(obj *seer_common.BlockJson) *Game7OrbitArbitrumSepoliaBlock { return &Game7OrbitArbitrumSepoliaBlock{ - BlockNumber: obj.BlockNumber, - Difficulty: obj.Difficulty, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), + Difficulty: fromHex(obj.Difficulty).Uint64(), ExtraData: obj.ExtraData, - GasLimit: obj.GasLimit, - GasUsed: obj.GasUsed, + GasLimit: fromHex(obj.GasLimit).Uint64(), + GasUsed: fromHex(obj.GasUsed).Uint64(), BaseFeePerGas: obj.BaseFeePerGas, Hash: obj.Hash, LogsBloom: obj.LogsBloom, @@ -366,24 +366,32 @@ func ToProtoSingleBlock(obj *seer_common.BlockJson) *Game7OrbitArbitrumSepoliaBl ParentHash: obj.ParentHash, ReceiptsRoot: obj.ReceiptsRoot, Sha3Uncles: obj.Sha3Uncles, - Size: obj.Size, + Size: fromHex(obj.Size).Uint64(), StateRoot: obj.StateRoot, - Timestamp: obj.Timestamp, + Timestamp: fromHex(obj.Timestamp).Uint64(), TotalDifficulty: obj.TotalDifficulty, TransactionsRoot: obj.TransactionsRoot, - IndexedAt: obj.IndexedAt, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), MixHash: obj.MixHash, SendCount: obj.SendCount, SendRoot: obj.SendRoot, - L1BlockNumber: obj.L1BlockNumber, + L1BlockNumber: fromHex(obj.L1BlockNumber).Uint64(), } } func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *Game7OrbitArbitrumSepoliaTransaction { + var accessList []*Game7OrbitArbitrumSepoliaTransactionAccessList + for _, al := range obj.AccessList { + accessList = append(accessList, &Game7OrbitArbitrumSepoliaTransactionAccessList{ + Address: al.Address, + StorageKeys: al.StorageKeys, + }) + } + return &Game7OrbitArbitrumSepoliaTransaction{ Hash: obj.Hash, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), BlockHash: obj.BlockHash, FromAddress: obj.FromAddress, ToAddress: obj.ToAddress, @@ -393,18 +401,18 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *Game7OrbitArbit MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, Input: obj.Input, Nonce: obj.Nonce, - TransactionIndex: obj.TransactionIndex, - TransactionType: obj.TransactionType, + TransactionIndex: fromHex(obj.TransactionIndex).Uint64(), + TransactionType: fromHex(obj.TransactionType).Uint64(), Value: obj.Value, - IndexedAt: obj.IndexedAt, - BlockTimestamp: obj.BlockTimestamp, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), + BlockTimestamp: fromHex(obj.BlockTimestamp).Uint64(), ChainId: obj.ChainId, V: obj.V, R: obj.R, S: obj.S, - AccessList: obj.AccessList, + AccessList: accessList, YParity: obj.YParity, } } @@ -415,9 +423,9 @@ func ToProtoSingleEventLog(obj *seer_common.EventJson) *Game7OrbitArbitrumSepoli Address: obj.Address, Topics: obj.Topics, Data: obj.Data, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), TransactionHash: obj.TransactionHash, - LogIndex: obj.LogIndex, + LogIndex: fromHex(obj.LogIndex).Uint64(), BlockHash: obj.BlockHash, Removed: obj.Removed, } diff --git a/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.pb.go b/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.pb.go index c65621d..e98a947 100644 --- a/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.pb.go +++ b/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.34.1 // protoc v3.6.1 -// source: game7_orbit_arbitrum_sepolia_index_types.proto +// source: blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.proto package game7_orbit_arbitrum_sepolia @@ -20,40 +20,95 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type Game7OrbitArbitrumSepoliaTransactionAccessList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storage_keys,omitempty"` +} + +func (x *Game7OrbitArbitrumSepoliaTransactionAccessList) Reset() { + *x = Game7OrbitArbitrumSepoliaTransactionAccessList{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Game7OrbitArbitrumSepoliaTransactionAccessList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Game7OrbitArbitrumSepoliaTransactionAccessList) ProtoMessage() {} + +func (x *Game7OrbitArbitrumSepoliaTransactionAccessList) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Game7OrbitArbitrumSepoliaTransactionAccessList.ProtoReflect.Descriptor instead. +func (*Game7OrbitArbitrumSepoliaTransactionAccessList) Descriptor() ([]byte, []int) { + return file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *Game7OrbitArbitrumSepoliaTransactionAccessList) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *Game7OrbitArbitrumSepoliaTransactionAccessList) GetStorageKeys() []string { + if x != nil { + return x.StorageKeys + } + return nil +} + // Represents a single transaction within a block type Game7OrbitArbitrumSepoliaTransaction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction - BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in - FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from - ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to - Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction - GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction - MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types - MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types - Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction - Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction - TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block - TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types - Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction - IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler - BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block - BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in - ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types - V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types - R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types - S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types - AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` - YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []*Game7OrbitArbitrumSepoliaTransactionAccessList `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types } func (x *Game7OrbitArbitrumSepoliaTransaction) Reset() { *x = Game7OrbitArbitrumSepoliaTransaction{} if protoimpl.UnsafeEnabled { - mi := &file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[0] + mi := &file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -66,7 +121,7 @@ func (x *Game7OrbitArbitrumSepoliaTransaction) String() string { func (*Game7OrbitArbitrumSepoliaTransaction) ProtoMessage() {} func (x *Game7OrbitArbitrumSepoliaTransaction) ProtoReflect() protoreflect.Message { - mi := &file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[0] + mi := &file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79,7 +134,7 @@ func (x *Game7OrbitArbitrumSepoliaTransaction) ProtoReflect() protoreflect.Messa // Deprecated: Use Game7OrbitArbitrumSepoliaTransaction.ProtoReflect.Descriptor instead. func (*Game7OrbitArbitrumSepoliaTransaction) Descriptor() ([]byte, []int) { - return file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{0} + return file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{1} } func (x *Game7OrbitArbitrumSepoliaTransaction) GetHash() string { @@ -222,7 +277,7 @@ func (x *Game7OrbitArbitrumSepoliaTransaction) GetS() string { return "" } -func (x *Game7OrbitArbitrumSepoliaTransaction) GetAccessList() []string { +func (x *Game7OrbitArbitrumSepoliaTransaction) GetAccessList() []*Game7OrbitArbitrumSepoliaTransactionAccessList { if x != nil { return x.AccessList } @@ -271,7 +326,7 @@ type Game7OrbitArbitrumSepoliaBlock struct { func (x *Game7OrbitArbitrumSepoliaBlock) Reset() { *x = Game7OrbitArbitrumSepoliaBlock{} if protoimpl.UnsafeEnabled { - mi := &file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[1] + mi := &file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -284,7 +339,7 @@ func (x *Game7OrbitArbitrumSepoliaBlock) String() string { func (*Game7OrbitArbitrumSepoliaBlock) ProtoMessage() {} func (x *Game7OrbitArbitrumSepoliaBlock) ProtoReflect() protoreflect.Message { - mi := &file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[1] + mi := &file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -297,7 +352,7 @@ func (x *Game7OrbitArbitrumSepoliaBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use Game7OrbitArbitrumSepoliaBlock.ProtoReflect.Descriptor instead. func (*Game7OrbitArbitrumSepoliaBlock) Descriptor() ([]byte, []int) { - return file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{1} + return file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{2} } func (x *Game7OrbitArbitrumSepoliaBlock) GetBlockNumber() uint64 { @@ -487,7 +542,7 @@ type Game7OrbitArbitrumSepoliaEventLog struct { func (x *Game7OrbitArbitrumSepoliaEventLog) Reset() { *x = Game7OrbitArbitrumSepoliaEventLog{} if protoimpl.UnsafeEnabled { - mi := &file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[2] + mi := &file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -500,7 +555,7 @@ func (x *Game7OrbitArbitrumSepoliaEventLog) String() string { func (*Game7OrbitArbitrumSepoliaEventLog) ProtoMessage() {} func (x *Game7OrbitArbitrumSepoliaEventLog) ProtoReflect() protoreflect.Message { - mi := &file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[2] + mi := &file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -513,7 +568,7 @@ func (x *Game7OrbitArbitrumSepoliaEventLog) ProtoReflect() protoreflect.Message // Deprecated: Use Game7OrbitArbitrumSepoliaEventLog.ProtoReflect.Descriptor instead. func (*Game7OrbitArbitrumSepoliaEventLog) Descriptor() ([]byte, []int) { - return file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{2} + return file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescGZIP(), []int{3} } func (x *Game7OrbitArbitrumSepoliaEventLog) GetAddress() string { @@ -579,166 +634,197 @@ func (x *Game7OrbitArbitrumSepoliaEventLog) GetTransactionIndex() uint64 { return 0 } -var File_game7_orbit_arbitrum_sepolia_index_types_proto protoreflect.FileDescriptor - -var file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x37, 0x5f, 0x6f, 0x72, 0x62, 0x69, 0x74, 0x5f, 0x61, 0x72, - 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xaf, 0x05, 0x0a, 0x24, 0x47, 0x61, 0x6d, 0x65, 0x37, 0x4f, 0x72, 0x62, 0x69, 0x74, 0x41, +var File_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto protoreflect.FileDescriptor + +var file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_rawDesc = []byte{ + 0x0a, 0x56, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x67, 0x61, 0x6d, + 0x65, 0x37, 0x5f, 0x6f, 0x72, 0x62, 0x69, 0x74, 0x5f, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, + 0x6d, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x37, 0x5f, + 0x6f, 0x72, 0x62, 0x69, 0x74, 0x5f, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x5f, 0x73, + 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6d, 0x0a, 0x2e, 0x47, 0x61, 0x6d, 0x65, + 0x37, 0x4f, 0x72, 0x62, 0x69, 0x74, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, 0x65, + 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, + 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xe0, 0x05, 0x0a, 0x24, 0x47, 0x61, 0x6d, 0x65, + 0x37, 0x4f, 0x72, 0x62, 0x69, 0x74, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, 0x65, + 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, + 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, + 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, + 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, + 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, + 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, + 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, + 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, + 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x50, 0x0a, + 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x37, 0x4f, 0x72, 0x62, 0x69, 0x74, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, - 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0xbb, 0x06, 0x0a, 0x1e, 0x47, + 0x61, 0x6d, 0x65, 0x37, 0x4f, 0x72, 0x62, 0x69, 0x74, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, + 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, + 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, - 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, - 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, - 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, - 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, - 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, - 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, - 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, - 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, - 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, - 0x74, 0x79, 0x22, 0xbb, 0x06, 0x0a, 0x1e, 0x47, 0x61, 0x6d, 0x65, 0x37, 0x4f, 0x72, 0x62, 0x69, + 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, + 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, + 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, + 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, + 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, + 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, + 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, + 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, + 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, + 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, + 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, + 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, + 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x49, + 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x37, 0x4f, 0x72, 0x62, 0x69, 0x74, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, - 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, - 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, - 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, - 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, - 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, - 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, - 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, - 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, - 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, - 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, - 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, - 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, - 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, - 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x49, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x47, - 0x61, 0x6d, 0x65, 0x37, 0x4f, 0x72, 0x62, 0x69, 0x74, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, - 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x15, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, - 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, - 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x73, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x31, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x22, 0xba, 0x02, 0x0a, 0x21, 0x47, 0x61, 0x6d, 0x65, 0x37, 0x4f, 0x72, 0x62, 0x69, 0x74, 0x41, - 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x1f, 0x5a, - 0x1d, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x37, 0x5f, 0x6f, 0x72, 0x62, 0x69, 0x74, 0x5f, 0x61, 0x72, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x78, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x78, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, + 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xba, 0x02, 0x0a, 0x21, 0x47, 0x61, 0x6d, + 0x65, 0x37, 0x4f, 0x72, 0x62, 0x69, 0x74, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x53, + 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, + 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x47, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x6f, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2d, 0x74, + 0x6f, 0x2f, 0x73, 0x65, 0x65, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x37, 0x5f, 0x6f, 0x72, 0x62, 0x69, 0x74, 0x5f, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescOnce sync.Once - file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescData = file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDesc + file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescOnce sync.Once + file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescData = file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_rawDesc ) -func file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescGZIP() []byte { - file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescOnce.Do(func() { - file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescData) +func file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescGZIP() []byte { + file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescOnce.Do(func() { + file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescData) }) - return file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescData + return file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_rawDescData } -var file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_game7_orbit_arbitrum_sepolia_index_types_proto_goTypes = []interface{}{ - (*Game7OrbitArbitrumSepoliaTransaction)(nil), // 0: Game7OrbitArbitrumSepoliaTransaction - (*Game7OrbitArbitrumSepoliaBlock)(nil), // 1: Game7OrbitArbitrumSepoliaBlock - (*Game7OrbitArbitrumSepoliaEventLog)(nil), // 2: Game7OrbitArbitrumSepoliaEventLog +var file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_goTypes = []interface{}{ + (*Game7OrbitArbitrumSepoliaTransactionAccessList)(nil), // 0: Game7OrbitArbitrumSepoliaTransactionAccessList + (*Game7OrbitArbitrumSepoliaTransaction)(nil), // 1: Game7OrbitArbitrumSepoliaTransaction + (*Game7OrbitArbitrumSepoliaBlock)(nil), // 2: Game7OrbitArbitrumSepoliaBlock + (*Game7OrbitArbitrumSepoliaEventLog)(nil), // 3: Game7OrbitArbitrumSepoliaEventLog } -var file_game7_orbit_arbitrum_sepolia_index_types_proto_depIdxs = []int32{ - 0, // 0: Game7OrbitArbitrumSepoliaBlock.transactions:type_name -> Game7OrbitArbitrumSepoliaTransaction - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name +var file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_depIdxs = []int32{ + 0, // 0: Game7OrbitArbitrumSepoliaTransaction.access_list:type_name -> Game7OrbitArbitrumSepoliaTransactionAccessList + 1, // 1: Game7OrbitArbitrumSepoliaBlock.transactions:type_name -> Game7OrbitArbitrumSepoliaTransaction + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } -func init() { file_game7_orbit_arbitrum_sepolia_index_types_proto_init() } -func file_game7_orbit_arbitrum_sepolia_index_types_proto_init() { - if File_game7_orbit_arbitrum_sepolia_index_types_proto != nil { +func init() { + file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_init() +} +func file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_init() { + if File_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Game7OrbitArbitrumSepoliaTransactionAccessList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Game7OrbitArbitrumSepoliaTransaction); i { case 0: return &v.state @@ -750,7 +836,7 @@ func file_game7_orbit_arbitrum_sepolia_index_types_proto_init() { return nil } } - file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Game7OrbitArbitrumSepoliaBlock); i { case 0: return &v.state @@ -762,7 +848,7 @@ func file_game7_orbit_arbitrum_sepolia_index_types_proto_init() { return nil } } - file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Game7OrbitArbitrumSepoliaEventLog); i { case 0: return &v.state @@ -779,18 +865,18 @@ func file_game7_orbit_arbitrum_sepolia_index_types_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDesc, + RawDescriptor: file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_game7_orbit_arbitrum_sepolia_index_types_proto_goTypes, - DependencyIndexes: file_game7_orbit_arbitrum_sepolia_index_types_proto_depIdxs, - MessageInfos: file_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes, + GoTypes: file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_goTypes, + DependencyIndexes: file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_depIdxs, + MessageInfos: file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_msgTypes, }.Build() - File_game7_orbit_arbitrum_sepolia_index_types_proto = out.File - file_game7_orbit_arbitrum_sepolia_index_types_proto_rawDesc = nil - file_game7_orbit_arbitrum_sepolia_index_types_proto_goTypes = nil - file_game7_orbit_arbitrum_sepolia_index_types_proto_depIdxs = nil + File_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto = out.File + file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_rawDesc = nil + file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_goTypes = nil + file_blockchain_game7_orbit_arbitrum_sepolia_game7_orbit_arbitrum_sepolia_index_types_proto_depIdxs = nil } diff --git a/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.proto b/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.proto index 164e1ba..f9895a6 100644 --- a/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.proto +++ b/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia_index_types.proto @@ -1,8 +1,13 @@ syntax = "proto3"; -option go_package = ".game7_orbit_arbitrum_sepolia"; +option go_package = "github.com/moonstream-to/seer/blockchain/game7_orbit_arbitrum_sepolia"; +message Game7OrbitArbitrumSepoliaTransactionAccessList { + string address = 1; + repeated string storage_keys = 2; +} + // Represents a single transaction within a block message Game7OrbitArbitrumSepoliaTransaction { string hash = 1; // The hash of the transaction @@ -26,7 +31,7 @@ message Game7OrbitArbitrumSepoliaTransaction { string r = 19; // Used as a field to match potential EIP-1559 transaction types string s = 20; // Used as a field to match potential EIP-1559 transaction types - repeated string access_list = 21; + repeated Game7OrbitArbitrumSepoliaTransactionAccessList access_list = 21; string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types } diff --git a/blockchain/handlers.go b/blockchain/handlers.go index 723051b..905e64d 100644 --- a/blockchain/handlers.go +++ b/blockchain/handlers.go @@ -12,7 +12,11 @@ import ( "github.com/moonstream-to/seer/blockchain/arbitrum_sepolia" "github.com/moonstream-to/seer/blockchain/ethereum" "github.com/moonstream-to/seer/blockchain/game7_orbit_arbitrum_sepolia" + "github.com/moonstream-to/seer/blockchain/mantle" + "github.com/moonstream-to/seer/blockchain/mantle_sepolia" "github.com/moonstream-to/seer/blockchain/polygon" + "github.com/moonstream-to/seer/blockchain/xai" + "github.com/moonstream-to/seer/blockchain/xai_sepolia" "github.com/moonstream-to/seer/indexer" "google.golang.org/protobuf/proto" ) @@ -28,22 +32,22 @@ func wrapClient(url, chain string) (BlockchainClient, error) { client, err := arbitrum_one.NewClient(url) return client, err } else if chain == "arbitrum_sepolia" { - client, err := arbitrum_one.NewClient(url) + client, err := arbitrum_sepolia.NewClient(url) return client, err } else if chain == "game7_orbit_arbitrum_sepolia" { client, err := game7_orbit_arbitrum_sepolia.NewClient(url) return client, err } else if chain == "mantle" { - client, err := arbitrum_sepolia.NewClient(url) + client, err := mantle.NewClient(url) return client, err } else if chain == "mantle_sepolia" { - client, err := arbitrum_sepolia.NewClient(url) + client, err := mantle_sepolia.NewClient(url) return client, err } else if chain == "xai" { - client, err := arbitrum_sepolia.NewClient(url) + client, err := xai.NewClient(url) return client, err } else if chain == "xai_sepolia" { - client, err := arbitrum_sepolia.NewClient(url) + client, err := xai_sepolia.NewClient(url) return client, err } else { return nil, errors.New("unsupported chain type") diff --git a/blockchain/mantle/mantle.go b/blockchain/mantle/mantle.go index 280d067..1473a70 100644 --- a/blockchain/mantle/mantle.go +++ b/blockchain/mantle/mantle.go @@ -353,11 +353,11 @@ func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]i } func ToProtoSingleBlock(obj *seer_common.BlockJson) *MantleBlock { return &MantleBlock{ - BlockNumber: obj.BlockNumber, - Difficulty: obj.Difficulty, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), + Difficulty: fromHex(obj.Difficulty).Uint64(), ExtraData: obj.ExtraData, - GasLimit: obj.GasLimit, - GasUsed: obj.GasUsed, + GasLimit: fromHex(obj.GasLimit).Uint64(), + GasUsed: fromHex(obj.GasUsed).Uint64(), BaseFeePerGas: obj.BaseFeePerGas, Hash: obj.Hash, LogsBloom: obj.LogsBloom, @@ -366,19 +366,27 @@ func ToProtoSingleBlock(obj *seer_common.BlockJson) *MantleBlock { ParentHash: obj.ParentHash, ReceiptsRoot: obj.ReceiptsRoot, Sha3Uncles: obj.Sha3Uncles, - Size: obj.Size, + Size: fromHex(obj.Size).Uint64(), StateRoot: obj.StateRoot, - Timestamp: obj.Timestamp, + Timestamp: fromHex(obj.Timestamp).Uint64(), TotalDifficulty: obj.TotalDifficulty, TransactionsRoot: obj.TransactionsRoot, - IndexedAt: obj.IndexedAt, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), } } func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *MantleTransaction { + var accessList []*MantleTransactionAccessList + for _, al := range obj.AccessList { + accessList = append(accessList, &MantleTransactionAccessList{ + Address: al.Address, + StorageKeys: al.StorageKeys, + }) + } + return &MantleTransaction{ Hash: obj.Hash, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), BlockHash: obj.BlockHash, FromAddress: obj.FromAddress, ToAddress: obj.ToAddress, @@ -388,18 +396,18 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *MantleTransacti MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, Input: obj.Input, Nonce: obj.Nonce, - TransactionIndex: obj.TransactionIndex, - TransactionType: obj.TransactionType, + TransactionIndex: fromHex(obj.TransactionIndex).Uint64(), + TransactionType: fromHex(obj.TransactionType).Uint64(), Value: obj.Value, - IndexedAt: obj.IndexedAt, - BlockTimestamp: obj.BlockTimestamp, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), + BlockTimestamp: fromHex(obj.BlockTimestamp).Uint64(), ChainId: obj.ChainId, V: obj.V, R: obj.R, S: obj.S, - AccessList: obj.AccessList, + AccessList: accessList, YParity: obj.YParity, } } @@ -410,9 +418,9 @@ func ToProtoSingleEventLog(obj *seer_common.EventJson) *MantleEventLog { Address: obj.Address, Topics: obj.Topics, Data: obj.Data, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), TransactionHash: obj.TransactionHash, - LogIndex: obj.LogIndex, + LogIndex: fromHex(obj.LogIndex).Uint64(), BlockHash: obj.BlockHash, Removed: obj.Removed, } diff --git a/blockchain/mantle/mantle_index_types.pb.go b/blockchain/mantle/mantle_index_types.pb.go index 7089b6e..7888f39 100644 --- a/blockchain/mantle/mantle_index_types.pb.go +++ b/blockchain/mantle/mantle_index_types.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.34.1 // protoc v3.6.1 -// source: mantle_index_types.proto +// source: blockchain/mantle/mantle_index_types.proto package mantle @@ -20,40 +20,95 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type MantleTransactionAccessList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storage_keys,omitempty"` +} + +func (x *MantleTransactionAccessList) Reset() { + *x = MantleTransactionAccessList{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_mantle_mantle_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MantleTransactionAccessList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MantleTransactionAccessList) ProtoMessage() {} + +func (x *MantleTransactionAccessList) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_mantle_mantle_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MantleTransactionAccessList.ProtoReflect.Descriptor instead. +func (*MantleTransactionAccessList) Descriptor() ([]byte, []int) { + return file_blockchain_mantle_mantle_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *MantleTransactionAccessList) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *MantleTransactionAccessList) GetStorageKeys() []string { + if x != nil { + return x.StorageKeys + } + return nil +} + // Represents a single transaction within a block type MantleTransaction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction - BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in - FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from - ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to - Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction - GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction - MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types - MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types - Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction - Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction - TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block - TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types - Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction - IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler - BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block - BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in - ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types - V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types - R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types - S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types - AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` - YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []*MantleTransactionAccessList `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types } func (x *MantleTransaction) Reset() { *x = MantleTransaction{} if protoimpl.UnsafeEnabled { - mi := &file_mantle_index_types_proto_msgTypes[0] + mi := &file_blockchain_mantle_mantle_index_types_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -66,7 +121,7 @@ func (x *MantleTransaction) String() string { func (*MantleTransaction) ProtoMessage() {} func (x *MantleTransaction) ProtoReflect() protoreflect.Message { - mi := &file_mantle_index_types_proto_msgTypes[0] + mi := &file_blockchain_mantle_mantle_index_types_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79,7 +134,7 @@ func (x *MantleTransaction) ProtoReflect() protoreflect.Message { // Deprecated: Use MantleTransaction.ProtoReflect.Descriptor instead. func (*MantleTransaction) Descriptor() ([]byte, []int) { - return file_mantle_index_types_proto_rawDescGZIP(), []int{0} + return file_blockchain_mantle_mantle_index_types_proto_rawDescGZIP(), []int{1} } func (x *MantleTransaction) GetHash() string { @@ -222,7 +277,7 @@ func (x *MantleTransaction) GetS() string { return "" } -func (x *MantleTransaction) GetAccessList() []string { +func (x *MantleTransaction) GetAccessList() []*MantleTransactionAccessList { if x != nil { return x.AccessList } @@ -267,7 +322,7 @@ type MantleBlock struct { func (x *MantleBlock) Reset() { *x = MantleBlock{} if protoimpl.UnsafeEnabled { - mi := &file_mantle_index_types_proto_msgTypes[1] + mi := &file_blockchain_mantle_mantle_index_types_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -280,7 +335,7 @@ func (x *MantleBlock) String() string { func (*MantleBlock) ProtoMessage() {} func (x *MantleBlock) ProtoReflect() protoreflect.Message { - mi := &file_mantle_index_types_proto_msgTypes[1] + mi := &file_blockchain_mantle_mantle_index_types_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -293,7 +348,7 @@ func (x *MantleBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use MantleBlock.ProtoReflect.Descriptor instead. func (*MantleBlock) Descriptor() ([]byte, []int) { - return file_mantle_index_types_proto_rawDescGZIP(), []int{1} + return file_blockchain_mantle_mantle_index_types_proto_rawDescGZIP(), []int{2} } func (x *MantleBlock) GetBlockNumber() uint64 { @@ -455,7 +510,7 @@ type MantleEventLog struct { func (x *MantleEventLog) Reset() { *x = MantleEventLog{} if protoimpl.UnsafeEnabled { - mi := &file_mantle_index_types_proto_msgTypes[2] + mi := &file_blockchain_mantle_mantle_index_types_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -468,7 +523,7 @@ func (x *MantleEventLog) String() string { func (*MantleEventLog) ProtoMessage() {} func (x *MantleEventLog) ProtoReflect() protoreflect.Message { - mi := &file_mantle_index_types_proto_msgTypes[2] + mi := &file_blockchain_mantle_mantle_index_types_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -481,7 +536,7 @@ func (x *MantleEventLog) ProtoReflect() protoreflect.Message { // Deprecated: Use MantleEventLog.ProtoReflect.Descriptor instead. func (*MantleEventLog) Descriptor() ([]byte, []int) { - return file_mantle_index_types_proto_rawDescGZIP(), []int{2} + return file_blockchain_mantle_mantle_index_types_proto_rawDescGZIP(), []int{3} } func (x *MantleEventLog) GetAddress() string { @@ -547,150 +602,176 @@ func (x *MantleEventLog) GetTransactionIndex() uint64 { return 0 } -var File_mantle_index_types_proto protoreflect.FileDescriptor - -var file_mantle_index_types_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x6d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x05, 0x0a, 0x11, 0x4d, +var File_blockchain_mantle_mantle_index_types_proto protoreflect.FileDescriptor + +var file_blockchain_mantle_mantle_index_types_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x6d, 0x61, 0x6e, + 0x74, 0x6c, 0x65, 0x2f, 0x6d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x1b, + 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xba, 0x05, 0x0a, 0x11, 0x4d, 0x61, 0x6e, + 0x74, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, + 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, + 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, + 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, + 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, + 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, + 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, + 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, + 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, + 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, + 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, + 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, + 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, + 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, + 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0a, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, + 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, + 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0x96, 0x05, 0x0a, 0x0b, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, + 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, + 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, + 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, + 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, + 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, + 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, + 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, + 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, - 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, - 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, - 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, - 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, - 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, - 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, - 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, - 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x1f, 0x0a, - 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, - 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0x96, 0x05, 0x0a, 0x0b, 0x4d, 0x61, - 0x6e, 0x74, 0x6c, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, - 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, - 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, - 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, - 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, - 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, - 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, - 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, - 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, - 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, - 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, - 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, - 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, - 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, - 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, - 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, - 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, - 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x09, 0x5a, 0x07, - 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, + 0x02, 0x0a, 0x0e, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, + 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, + 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, + 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, + 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x6f, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x2d, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x65, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x6d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( - file_mantle_index_types_proto_rawDescOnce sync.Once - file_mantle_index_types_proto_rawDescData = file_mantle_index_types_proto_rawDesc + file_blockchain_mantle_mantle_index_types_proto_rawDescOnce sync.Once + file_blockchain_mantle_mantle_index_types_proto_rawDescData = file_blockchain_mantle_mantle_index_types_proto_rawDesc ) -func file_mantle_index_types_proto_rawDescGZIP() []byte { - file_mantle_index_types_proto_rawDescOnce.Do(func() { - file_mantle_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_mantle_index_types_proto_rawDescData) +func file_blockchain_mantle_mantle_index_types_proto_rawDescGZIP() []byte { + file_blockchain_mantle_mantle_index_types_proto_rawDescOnce.Do(func() { + file_blockchain_mantle_mantle_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_blockchain_mantle_mantle_index_types_proto_rawDescData) }) - return file_mantle_index_types_proto_rawDescData + return file_blockchain_mantle_mantle_index_types_proto_rawDescData } -var file_mantle_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_mantle_index_types_proto_goTypes = []interface{}{ - (*MantleTransaction)(nil), // 0: MantleTransaction - (*MantleBlock)(nil), // 1: MantleBlock - (*MantleEventLog)(nil), // 2: MantleEventLog +var file_blockchain_mantle_mantle_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_blockchain_mantle_mantle_index_types_proto_goTypes = []interface{}{ + (*MantleTransactionAccessList)(nil), // 0: MantleTransactionAccessList + (*MantleTransaction)(nil), // 1: MantleTransaction + (*MantleBlock)(nil), // 2: MantleBlock + (*MantleEventLog)(nil), // 3: MantleEventLog } -var file_mantle_index_types_proto_depIdxs = []int32{ - 0, // 0: MantleBlock.transactions:type_name -> MantleTransaction - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name +var file_blockchain_mantle_mantle_index_types_proto_depIdxs = []int32{ + 0, // 0: MantleTransaction.access_list:type_name -> MantleTransactionAccessList + 1, // 1: MantleBlock.transactions:type_name -> MantleTransaction + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } -func init() { file_mantle_index_types_proto_init() } -func file_mantle_index_types_proto_init() { - if File_mantle_index_types_proto != nil { +func init() { file_blockchain_mantle_mantle_index_types_proto_init() } +func file_blockchain_mantle_mantle_index_types_proto_init() { + if File_blockchain_mantle_mantle_index_types_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_mantle_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_mantle_mantle_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MantleTransactionAccessList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_mantle_mantle_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MantleTransaction); i { case 0: return &v.state @@ -702,7 +783,7 @@ func file_mantle_index_types_proto_init() { return nil } } - file_mantle_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_mantle_mantle_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MantleBlock); i { case 0: return &v.state @@ -714,7 +795,7 @@ func file_mantle_index_types_proto_init() { return nil } } - file_mantle_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_mantle_mantle_index_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MantleEventLog); i { case 0: return &v.state @@ -731,18 +812,18 @@ func file_mantle_index_types_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_mantle_index_types_proto_rawDesc, + RawDescriptor: file_blockchain_mantle_mantle_index_types_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_mantle_index_types_proto_goTypes, - DependencyIndexes: file_mantle_index_types_proto_depIdxs, - MessageInfos: file_mantle_index_types_proto_msgTypes, + GoTypes: file_blockchain_mantle_mantle_index_types_proto_goTypes, + DependencyIndexes: file_blockchain_mantle_mantle_index_types_proto_depIdxs, + MessageInfos: file_blockchain_mantle_mantle_index_types_proto_msgTypes, }.Build() - File_mantle_index_types_proto = out.File - file_mantle_index_types_proto_rawDesc = nil - file_mantle_index_types_proto_goTypes = nil - file_mantle_index_types_proto_depIdxs = nil + File_blockchain_mantle_mantle_index_types_proto = out.File + file_blockchain_mantle_mantle_index_types_proto_rawDesc = nil + file_blockchain_mantle_mantle_index_types_proto_goTypes = nil + file_blockchain_mantle_mantle_index_types_proto_depIdxs = nil } diff --git a/blockchain/mantle/mantle_index_types.proto b/blockchain/mantle/mantle_index_types.proto index 98a52ba..26a3de0 100644 --- a/blockchain/mantle/mantle_index_types.proto +++ b/blockchain/mantle/mantle_index_types.proto @@ -1,8 +1,13 @@ syntax = "proto3"; -option go_package = ".mantle"; +option go_package = "github.com/moonstream-to/seer/blockchain/mantle"; +message MantleTransactionAccessList { + string address = 1; + repeated string storage_keys = 2; +} + // Represents a single transaction within a block message MantleTransaction { string hash = 1; // The hash of the transaction @@ -26,7 +31,7 @@ message MantleTransaction { string r = 19; // Used as a field to match potential EIP-1559 transaction types string s = 20; // Used as a field to match potential EIP-1559 transaction types - repeated string access_list = 21; + repeated MantleTransactionAccessList access_list = 21; string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types } diff --git a/blockchain/mantle_sepolia/mantle_sepolia.go b/blockchain/mantle_sepolia/mantle_sepolia.go index 16c37c4..212ba77 100644 --- a/blockchain/mantle_sepolia/mantle_sepolia.go +++ b/blockchain/mantle_sepolia/mantle_sepolia.go @@ -353,11 +353,11 @@ func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]i } func ToProtoSingleBlock(obj *seer_common.BlockJson) *MantleSepoliaBlock { return &MantleSepoliaBlock{ - BlockNumber: obj.BlockNumber, - Difficulty: obj.Difficulty, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), + Difficulty: fromHex(obj.Difficulty).Uint64(), ExtraData: obj.ExtraData, - GasLimit: obj.GasLimit, - GasUsed: obj.GasUsed, + GasLimit: fromHex(obj.GasLimit).Uint64(), + GasUsed: fromHex(obj.GasUsed).Uint64(), BaseFeePerGas: obj.BaseFeePerGas, Hash: obj.Hash, LogsBloom: obj.LogsBloom, @@ -366,19 +366,27 @@ func ToProtoSingleBlock(obj *seer_common.BlockJson) *MantleSepoliaBlock { ParentHash: obj.ParentHash, ReceiptsRoot: obj.ReceiptsRoot, Sha3Uncles: obj.Sha3Uncles, - Size: obj.Size, + Size: fromHex(obj.Size).Uint64(), StateRoot: obj.StateRoot, - Timestamp: obj.Timestamp, + Timestamp: fromHex(obj.Timestamp).Uint64(), TotalDifficulty: obj.TotalDifficulty, TransactionsRoot: obj.TransactionsRoot, - IndexedAt: obj.IndexedAt, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), } } func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *MantleSepoliaTransaction { + var accessList []*MantleSepoliaTransactionAccessList + for _, al := range obj.AccessList { + accessList = append(accessList, &MantleSepoliaTransactionAccessList{ + Address: al.Address, + StorageKeys: al.StorageKeys, + }) + } + return &MantleSepoliaTransaction{ Hash: obj.Hash, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), BlockHash: obj.BlockHash, FromAddress: obj.FromAddress, ToAddress: obj.ToAddress, @@ -388,18 +396,18 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *MantleSepoliaTr MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, Input: obj.Input, Nonce: obj.Nonce, - TransactionIndex: obj.TransactionIndex, - TransactionType: obj.TransactionType, + TransactionIndex: fromHex(obj.TransactionIndex).Uint64(), + TransactionType: fromHex(obj.TransactionType).Uint64(), Value: obj.Value, - IndexedAt: obj.IndexedAt, - BlockTimestamp: obj.BlockTimestamp, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), + BlockTimestamp: fromHex(obj.BlockTimestamp).Uint64(), ChainId: obj.ChainId, V: obj.V, R: obj.R, S: obj.S, - AccessList: obj.AccessList, + AccessList: accessList, YParity: obj.YParity, } } @@ -410,9 +418,9 @@ func ToProtoSingleEventLog(obj *seer_common.EventJson) *MantleSepoliaEventLog { Address: obj.Address, Topics: obj.Topics, Data: obj.Data, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), TransactionHash: obj.TransactionHash, - LogIndex: obj.LogIndex, + LogIndex: fromHex(obj.LogIndex).Uint64(), BlockHash: obj.BlockHash, Removed: obj.Removed, } diff --git a/blockchain/mantle_sepolia/mantle_sepolia_index_types.pb.go b/blockchain/mantle_sepolia/mantle_sepolia_index_types.pb.go index 2bd7377..4ba39d7 100644 --- a/blockchain/mantle_sepolia/mantle_sepolia_index_types.pb.go +++ b/blockchain/mantle_sepolia/mantle_sepolia_index_types.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.34.1 // protoc v3.6.1 -// source: mantle_sepolia_index_types.proto +// source: blockchain/mantle_sepolia/mantle_sepolia_index_types.proto package mantle_sepolia @@ -20,40 +20,95 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type MantleSepoliaTransactionAccessList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storage_keys,omitempty"` +} + +func (x *MantleSepoliaTransactionAccessList) Reset() { + *x = MantleSepoliaTransactionAccessList{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MantleSepoliaTransactionAccessList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MantleSepoliaTransactionAccessList) ProtoMessage() {} + +func (x *MantleSepoliaTransactionAccessList) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MantleSepoliaTransactionAccessList.ProtoReflect.Descriptor instead. +func (*MantleSepoliaTransactionAccessList) Descriptor() ([]byte, []int) { + return file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *MantleSepoliaTransactionAccessList) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *MantleSepoliaTransactionAccessList) GetStorageKeys() []string { + if x != nil { + return x.StorageKeys + } + return nil +} + // Represents a single transaction within a block type MantleSepoliaTransaction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction - BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in - FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from - ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to - Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction - GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction - MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types - MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types - Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction - Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction - TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block - TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types - Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction - IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler - BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block - BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in - ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types - V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types - R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types - S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types - AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` - YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []*MantleSepoliaTransactionAccessList `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types } func (x *MantleSepoliaTransaction) Reset() { *x = MantleSepoliaTransaction{} if protoimpl.UnsafeEnabled { - mi := &file_mantle_sepolia_index_types_proto_msgTypes[0] + mi := &file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -66,7 +121,7 @@ func (x *MantleSepoliaTransaction) String() string { func (*MantleSepoliaTransaction) ProtoMessage() {} func (x *MantleSepoliaTransaction) ProtoReflect() protoreflect.Message { - mi := &file_mantle_sepolia_index_types_proto_msgTypes[0] + mi := &file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79,7 +134,7 @@ func (x *MantleSepoliaTransaction) ProtoReflect() protoreflect.Message { // Deprecated: Use MantleSepoliaTransaction.ProtoReflect.Descriptor instead. func (*MantleSepoliaTransaction) Descriptor() ([]byte, []int) { - return file_mantle_sepolia_index_types_proto_rawDescGZIP(), []int{0} + return file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_rawDescGZIP(), []int{1} } func (x *MantleSepoliaTransaction) GetHash() string { @@ -222,7 +277,7 @@ func (x *MantleSepoliaTransaction) GetS() string { return "" } -func (x *MantleSepoliaTransaction) GetAccessList() []string { +func (x *MantleSepoliaTransaction) GetAccessList() []*MantleSepoliaTransactionAccessList { if x != nil { return x.AccessList } @@ -267,7 +322,7 @@ type MantleSepoliaBlock struct { func (x *MantleSepoliaBlock) Reset() { *x = MantleSepoliaBlock{} if protoimpl.UnsafeEnabled { - mi := &file_mantle_sepolia_index_types_proto_msgTypes[1] + mi := &file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -280,7 +335,7 @@ func (x *MantleSepoliaBlock) String() string { func (*MantleSepoliaBlock) ProtoMessage() {} func (x *MantleSepoliaBlock) ProtoReflect() protoreflect.Message { - mi := &file_mantle_sepolia_index_types_proto_msgTypes[1] + mi := &file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -293,7 +348,7 @@ func (x *MantleSepoliaBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use MantleSepoliaBlock.ProtoReflect.Descriptor instead. func (*MantleSepoliaBlock) Descriptor() ([]byte, []int) { - return file_mantle_sepolia_index_types_proto_rawDescGZIP(), []int{1} + return file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_rawDescGZIP(), []int{2} } func (x *MantleSepoliaBlock) GetBlockNumber() uint64 { @@ -455,7 +510,7 @@ type MantleSepoliaEventLog struct { func (x *MantleSepoliaEventLog) Reset() { *x = MantleSepoliaEventLog{} if protoimpl.UnsafeEnabled { - mi := &file_mantle_sepolia_index_types_proto_msgTypes[2] + mi := &file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -468,7 +523,7 @@ func (x *MantleSepoliaEventLog) String() string { func (*MantleSepoliaEventLog) ProtoMessage() {} func (x *MantleSepoliaEventLog) ProtoReflect() protoreflect.Message { - mi := &file_mantle_sepolia_index_types_proto_msgTypes[2] + mi := &file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -481,7 +536,7 @@ func (x *MantleSepoliaEventLog) ProtoReflect() protoreflect.Message { // Deprecated: Use MantleSepoliaEventLog.ProtoReflect.Descriptor instead. func (*MantleSepoliaEventLog) Descriptor() ([]byte, []int) { - return file_mantle_sepolia_index_types_proto_rawDescGZIP(), []int{2} + return file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_rawDescGZIP(), []int{3} } func (x *MantleSepoliaEventLog) GetAddress() string { @@ -547,153 +602,180 @@ func (x *MantleSepoliaEventLog) GetTransactionIndex() uint64 { return 0 } -var File_mantle_sepolia_index_types_proto protoreflect.FileDescriptor - -var file_mantle_sepolia_index_types_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x6d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, - 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xa3, 0x05, 0x0a, 0x18, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x53, 0x65, 0x70, - 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, - 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, - 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, - 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, - 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, - 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x66, - 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x36, - 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, - 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, - 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, - 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76, - 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x0c, - 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x1f, 0x0a, 0x0b, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, - 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0xa4, 0x05, 0x0a, 0x12, 0x4d, 0x61, 0x6e, - 0x74, 0x6c, 0x65, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, - 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, - 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, - 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, - 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, - 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, - 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, - 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, - 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, - 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, - 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, - 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, - 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, - 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x3d, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x53, - 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0xae, 0x02, 0x0a, 0x15, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, - 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, - 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x42, 0x11, 0x5a, 0x0f, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x70, 0x6f, - 0x6c, 0x69, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto protoreflect.FileDescriptor + +var file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x6d, 0x61, 0x6e, + 0x74, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x2f, 0x6d, 0x61, 0x6e, 0x74, + 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x61, 0x0a, 0x22, + 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x22, + 0xc8, 0x05, 0x0a, 0x18, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, + 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, + 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, + 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, + 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, + 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, + 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, + 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, + 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, + 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, + 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, + 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, + 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, + 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x44, 0x0a, 0x0b, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0xa4, 0x05, 0x0a, 0x12, 0x4d, + 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, + 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, + 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, + 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, + 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, + 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, + 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, + 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, + 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, + 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x4d, 0x61, 0x6e, 0x74, 0x6c, + 0x65, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0xae, 0x02, 0x0a, 0x15, 0x4d, 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x53, 0x65, 0x70, 0x6f, + 0x6c, 0x69, 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, + 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6d, 0x6f, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2d, 0x74, 0x6f, 0x2f, 0x73, + 0x65, 0x65, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x6d, + 0x61, 0x6e, 0x74, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_mantle_sepolia_index_types_proto_rawDescOnce sync.Once - file_mantle_sepolia_index_types_proto_rawDescData = file_mantle_sepolia_index_types_proto_rawDesc + file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_rawDescOnce sync.Once + file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_rawDescData = file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_rawDesc ) -func file_mantle_sepolia_index_types_proto_rawDescGZIP() []byte { - file_mantle_sepolia_index_types_proto_rawDescOnce.Do(func() { - file_mantle_sepolia_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_mantle_sepolia_index_types_proto_rawDescData) +func file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_rawDescGZIP() []byte { + file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_rawDescOnce.Do(func() { + file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_rawDescData) }) - return file_mantle_sepolia_index_types_proto_rawDescData + return file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_rawDescData } -var file_mantle_sepolia_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_mantle_sepolia_index_types_proto_goTypes = []interface{}{ - (*MantleSepoliaTransaction)(nil), // 0: MantleSepoliaTransaction - (*MantleSepoliaBlock)(nil), // 1: MantleSepoliaBlock - (*MantleSepoliaEventLog)(nil), // 2: MantleSepoliaEventLog +var file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_goTypes = []interface{}{ + (*MantleSepoliaTransactionAccessList)(nil), // 0: MantleSepoliaTransactionAccessList + (*MantleSepoliaTransaction)(nil), // 1: MantleSepoliaTransaction + (*MantleSepoliaBlock)(nil), // 2: MantleSepoliaBlock + (*MantleSepoliaEventLog)(nil), // 3: MantleSepoliaEventLog } -var file_mantle_sepolia_index_types_proto_depIdxs = []int32{ - 0, // 0: MantleSepoliaBlock.transactions:type_name -> MantleSepoliaTransaction - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name +var file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_depIdxs = []int32{ + 0, // 0: MantleSepoliaTransaction.access_list:type_name -> MantleSepoliaTransactionAccessList + 1, // 1: MantleSepoliaBlock.transactions:type_name -> MantleSepoliaTransaction + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } -func init() { file_mantle_sepolia_index_types_proto_init() } -func file_mantle_sepolia_index_types_proto_init() { - if File_mantle_sepolia_index_types_proto != nil { +func init() { file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_init() } +func file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_init() { + if File_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_mantle_sepolia_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MantleSepoliaTransactionAccessList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MantleSepoliaTransaction); i { case 0: return &v.state @@ -705,7 +787,7 @@ func file_mantle_sepolia_index_types_proto_init() { return nil } } - file_mantle_sepolia_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MantleSepoliaBlock); i { case 0: return &v.state @@ -717,7 +799,7 @@ func file_mantle_sepolia_index_types_proto_init() { return nil } } - file_mantle_sepolia_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MantleSepoliaEventLog); i { case 0: return &v.state @@ -734,18 +816,18 @@ func file_mantle_sepolia_index_types_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_mantle_sepolia_index_types_proto_rawDesc, + RawDescriptor: file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_mantle_sepolia_index_types_proto_goTypes, - DependencyIndexes: file_mantle_sepolia_index_types_proto_depIdxs, - MessageInfos: file_mantle_sepolia_index_types_proto_msgTypes, + GoTypes: file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_goTypes, + DependencyIndexes: file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_depIdxs, + MessageInfos: file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_msgTypes, }.Build() - File_mantle_sepolia_index_types_proto = out.File - file_mantle_sepolia_index_types_proto_rawDesc = nil - file_mantle_sepolia_index_types_proto_goTypes = nil - file_mantle_sepolia_index_types_proto_depIdxs = nil + File_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto = out.File + file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_rawDesc = nil + file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_goTypes = nil + file_blockchain_mantle_sepolia_mantle_sepolia_index_types_proto_depIdxs = nil } diff --git a/blockchain/mantle_sepolia/mantle_sepolia_index_types.proto b/blockchain/mantle_sepolia/mantle_sepolia_index_types.proto index 900e44e..aad1b03 100644 --- a/blockchain/mantle_sepolia/mantle_sepolia_index_types.proto +++ b/blockchain/mantle_sepolia/mantle_sepolia_index_types.proto @@ -1,8 +1,13 @@ syntax = "proto3"; -option go_package = ".mantle_sepolia"; +option go_package = "github.com/moonstream-to/seer/blockchain/mantle_sepolia"; +message MantleSepoliaTransactionAccessList { + string address = 1; + repeated string storage_keys = 2; +} + // Represents a single transaction within a block message MantleSepoliaTransaction { string hash = 1; // The hash of the transaction @@ -26,7 +31,7 @@ message MantleSepoliaTransaction { string r = 19; // Used as a field to match potential EIP-1559 transaction types string s = 20; // Used as a field to match potential EIP-1559 transaction types - repeated string access_list = 21; + repeated MantleSepoliaTransactionAccessList access_list = 21; string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types } diff --git a/blockchain/polygon/polygon.go b/blockchain/polygon/polygon.go index e21177c..3804ffa 100644 --- a/blockchain/polygon/polygon.go +++ b/blockchain/polygon/polygon.go @@ -353,11 +353,11 @@ func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]i } func ToProtoSingleBlock(obj *seer_common.BlockJson) *PolygonBlock { return &PolygonBlock{ - BlockNumber: obj.BlockNumber, - Difficulty: obj.Difficulty, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), + Difficulty: fromHex(obj.Difficulty).Uint64(), ExtraData: obj.ExtraData, - GasLimit: obj.GasLimit, - GasUsed: obj.GasUsed, + GasLimit: fromHex(obj.GasLimit).Uint64(), + GasUsed: fromHex(obj.GasUsed).Uint64(), BaseFeePerGas: obj.BaseFeePerGas, Hash: obj.Hash, LogsBloom: obj.LogsBloom, @@ -366,19 +366,27 @@ func ToProtoSingleBlock(obj *seer_common.BlockJson) *PolygonBlock { ParentHash: obj.ParentHash, ReceiptsRoot: obj.ReceiptsRoot, Sha3Uncles: obj.Sha3Uncles, - Size: obj.Size, + Size: fromHex(obj.Size).Uint64(), StateRoot: obj.StateRoot, - Timestamp: obj.Timestamp, + Timestamp: fromHex(obj.Timestamp).Uint64(), TotalDifficulty: obj.TotalDifficulty, TransactionsRoot: obj.TransactionsRoot, - IndexedAt: obj.IndexedAt, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), } } func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *PolygonTransaction { + var accessList []*PolygonTransactionAccessList + for _, al := range obj.AccessList { + accessList = append(accessList, &PolygonTransactionAccessList{ + Address: al.Address, + StorageKeys: al.StorageKeys, + }) + } + return &PolygonTransaction{ Hash: obj.Hash, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), BlockHash: obj.BlockHash, FromAddress: obj.FromAddress, ToAddress: obj.ToAddress, @@ -388,18 +396,18 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *PolygonTransact MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, Input: obj.Input, Nonce: obj.Nonce, - TransactionIndex: obj.TransactionIndex, - TransactionType: obj.TransactionType, + TransactionIndex: fromHex(obj.TransactionIndex).Uint64(), + TransactionType: fromHex(obj.TransactionType).Uint64(), Value: obj.Value, - IndexedAt: obj.IndexedAt, - BlockTimestamp: obj.BlockTimestamp, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), + BlockTimestamp: fromHex(obj.BlockTimestamp).Uint64(), ChainId: obj.ChainId, V: obj.V, R: obj.R, S: obj.S, - AccessList: obj.AccessList, + AccessList: accessList, YParity: obj.YParity, } } @@ -410,9 +418,9 @@ func ToProtoSingleEventLog(obj *seer_common.EventJson) *PolygonEventLog { Address: obj.Address, Topics: obj.Topics, Data: obj.Data, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), TransactionHash: obj.TransactionHash, - LogIndex: obj.LogIndex, + LogIndex: fromHex(obj.LogIndex).Uint64(), BlockHash: obj.BlockHash, Removed: obj.Removed, } diff --git a/blockchain/polygon/polygon_index_types.pb.go b/blockchain/polygon/polygon_index_types.pb.go index 64148c2..b14e638 100644 --- a/blockchain/polygon/polygon_index_types.pb.go +++ b/blockchain/polygon/polygon_index_types.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.34.1 // protoc v3.6.1 -// source: polygon_index_types.proto +// source: blockchain/polygon/polygon_index_types.proto package polygon @@ -20,40 +20,95 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type PolygonTransactionAccessList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storage_keys,omitempty"` +} + +func (x *PolygonTransactionAccessList) Reset() { + *x = PolygonTransactionAccessList{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_polygon_polygon_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PolygonTransactionAccessList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PolygonTransactionAccessList) ProtoMessage() {} + +func (x *PolygonTransactionAccessList) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_polygon_polygon_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PolygonTransactionAccessList.ProtoReflect.Descriptor instead. +func (*PolygonTransactionAccessList) Descriptor() ([]byte, []int) { + return file_blockchain_polygon_polygon_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *PolygonTransactionAccessList) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *PolygonTransactionAccessList) GetStorageKeys() []string { + if x != nil { + return x.StorageKeys + } + return nil +} + // Represents a single transaction within a block type PolygonTransaction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` - ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` - Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // using string to handle big numeric values - GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` - MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` - MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` - Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // could be a long text - Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` - TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` - TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` - Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // using string to handle big numeric values - IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // using uint64 to represent timestamp - BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // using uint64 to represent timestam - BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Added field for block hash - ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types - V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types - R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types - S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types - AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` - YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // using string to handle big numeric values + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // could be a long text + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // using string to handle big numeric values + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // using uint64 to represent timestamp + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // using uint64 to represent timestam + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Added field for block hash + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []*PolygonTransactionAccessList `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types } func (x *PolygonTransaction) Reset() { *x = PolygonTransaction{} if protoimpl.UnsafeEnabled { - mi := &file_polygon_index_types_proto_msgTypes[0] + mi := &file_blockchain_polygon_polygon_index_types_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -66,7 +121,7 @@ func (x *PolygonTransaction) String() string { func (*PolygonTransaction) ProtoMessage() {} func (x *PolygonTransaction) ProtoReflect() protoreflect.Message { - mi := &file_polygon_index_types_proto_msgTypes[0] + mi := &file_blockchain_polygon_polygon_index_types_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79,7 +134,7 @@ func (x *PolygonTransaction) ProtoReflect() protoreflect.Message { // Deprecated: Use PolygonTransaction.ProtoReflect.Descriptor instead. func (*PolygonTransaction) Descriptor() ([]byte, []int) { - return file_polygon_index_types_proto_rawDescGZIP(), []int{0} + return file_blockchain_polygon_polygon_index_types_proto_rawDescGZIP(), []int{1} } func (x *PolygonTransaction) GetHash() string { @@ -222,7 +277,7 @@ func (x *PolygonTransaction) GetS() string { return "" } -func (x *PolygonTransaction) GetAccessList() []string { +func (x *PolygonTransaction) GetAccessList() []*PolygonTransactionAccessList { if x != nil { return x.AccessList } @@ -267,7 +322,7 @@ type PolygonBlock struct { func (x *PolygonBlock) Reset() { *x = PolygonBlock{} if protoimpl.UnsafeEnabled { - mi := &file_polygon_index_types_proto_msgTypes[1] + mi := &file_blockchain_polygon_polygon_index_types_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -280,7 +335,7 @@ func (x *PolygonBlock) String() string { func (*PolygonBlock) ProtoMessage() {} func (x *PolygonBlock) ProtoReflect() protoreflect.Message { - mi := &file_polygon_index_types_proto_msgTypes[1] + mi := &file_blockchain_polygon_polygon_index_types_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -293,7 +348,7 @@ func (x *PolygonBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use PolygonBlock.ProtoReflect.Descriptor instead. func (*PolygonBlock) Descriptor() ([]byte, []int) { - return file_polygon_index_types_proto_rawDescGZIP(), []int{1} + return file_blockchain_polygon_polygon_index_types_proto_rawDescGZIP(), []int{2} } func (x *PolygonBlock) GetBlockNumber() uint64 { @@ -455,7 +510,7 @@ type PolygonEventLog struct { func (x *PolygonEventLog) Reset() { *x = PolygonEventLog{} if protoimpl.UnsafeEnabled { - mi := &file_polygon_index_types_proto_msgTypes[2] + mi := &file_blockchain_polygon_polygon_index_types_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -468,7 +523,7 @@ func (x *PolygonEventLog) String() string { func (*PolygonEventLog) ProtoMessage() {} func (x *PolygonEventLog) ProtoReflect() protoreflect.Message { - mi := &file_polygon_index_types_proto_msgTypes[2] + mi := &file_blockchain_polygon_polygon_index_types_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -481,7 +536,7 @@ func (x *PolygonEventLog) ProtoReflect() protoreflect.Message { // Deprecated: Use PolygonEventLog.ProtoReflect.Descriptor instead. func (*PolygonEventLog) Descriptor() ([]byte, []int) { - return file_polygon_index_types_proto_rawDescGZIP(), []int{2} + return file_blockchain_polygon_polygon_index_types_proto_rawDescGZIP(), []int{3} } func (x *PolygonEventLog) GetAddress() string { @@ -547,11 +602,18 @@ func (x *PolygonEventLog) GetTransactionIndex() uint64 { return 0 } -var File_polygon_index_types_proto protoreflect.FileDescriptor +var File_blockchain_polygon_polygon_index_types_proto protoreflect.FileDescriptor -var file_polygon_index_types_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x70, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x05, 0x0a, 0x12, +var file_blockchain_polygon_polygon_index_types_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x6f, 0x6c, + 0x79, 0x67, 0x6f, 0x6e, 0x2f, 0x70, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5b, + 0x0a, 0x1c, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xbc, 0x05, 0x0a, 0x12, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, @@ -590,108 +652,126 @@ var file_polygon_index_types_proto_rawDesc = []byte{ 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, - 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0x98, 0x05, 0x0a, 0x0c, - 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, - 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, - 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, - 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, - 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, - 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, - 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, - 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, - 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, - 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, - 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, - 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, - 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, - 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, - 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x37, 0x0a, - 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa8, 0x02, 0x0a, 0x0f, 0x50, 0x6f, 0x6c, 0x79, 0x67, - 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, - 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, - 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x70, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x3e, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0x98, 0x05, 0x0a, 0x0c, 0x50, + 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, + 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, + 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, + 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, + 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, + 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, + 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, + 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, + 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, + 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, + 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, + 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, + 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, + 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, + 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x37, 0x0a, 0x0c, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa8, 0x02, 0x0a, 0x0f, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, + 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, + 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, + 0x6f, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2d, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x65, + 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x6f, 0x6c, + 0x79, 0x67, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_polygon_index_types_proto_rawDescOnce sync.Once - file_polygon_index_types_proto_rawDescData = file_polygon_index_types_proto_rawDesc + file_blockchain_polygon_polygon_index_types_proto_rawDescOnce sync.Once + file_blockchain_polygon_polygon_index_types_proto_rawDescData = file_blockchain_polygon_polygon_index_types_proto_rawDesc ) -func file_polygon_index_types_proto_rawDescGZIP() []byte { - file_polygon_index_types_proto_rawDescOnce.Do(func() { - file_polygon_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_polygon_index_types_proto_rawDescData) +func file_blockchain_polygon_polygon_index_types_proto_rawDescGZIP() []byte { + file_blockchain_polygon_polygon_index_types_proto_rawDescOnce.Do(func() { + file_blockchain_polygon_polygon_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_blockchain_polygon_polygon_index_types_proto_rawDescData) }) - return file_polygon_index_types_proto_rawDescData + return file_blockchain_polygon_polygon_index_types_proto_rawDescData } -var file_polygon_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_polygon_index_types_proto_goTypes = []interface{}{ - (*PolygonTransaction)(nil), // 0: PolygonTransaction - (*PolygonBlock)(nil), // 1: PolygonBlock - (*PolygonEventLog)(nil), // 2: PolygonEventLog +var file_blockchain_polygon_polygon_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_blockchain_polygon_polygon_index_types_proto_goTypes = []interface{}{ + (*PolygonTransactionAccessList)(nil), // 0: PolygonTransactionAccessList + (*PolygonTransaction)(nil), // 1: PolygonTransaction + (*PolygonBlock)(nil), // 2: PolygonBlock + (*PolygonEventLog)(nil), // 3: PolygonEventLog } -var file_polygon_index_types_proto_depIdxs = []int32{ - 0, // 0: PolygonBlock.transactions:type_name -> PolygonTransaction - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name +var file_blockchain_polygon_polygon_index_types_proto_depIdxs = []int32{ + 0, // 0: PolygonTransaction.access_list:type_name -> PolygonTransactionAccessList + 1, // 1: PolygonBlock.transactions:type_name -> PolygonTransaction + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } -func init() { file_polygon_index_types_proto_init() } -func file_polygon_index_types_proto_init() { - if File_polygon_index_types_proto != nil { +func init() { file_blockchain_polygon_polygon_index_types_proto_init() } +func file_blockchain_polygon_polygon_index_types_proto_init() { + if File_blockchain_polygon_polygon_index_types_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_polygon_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_polygon_polygon_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PolygonTransactionAccessList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_polygon_polygon_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PolygonTransaction); i { case 0: return &v.state @@ -703,7 +783,7 @@ func file_polygon_index_types_proto_init() { return nil } } - file_polygon_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_polygon_polygon_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PolygonBlock); i { case 0: return &v.state @@ -715,7 +795,7 @@ func file_polygon_index_types_proto_init() { return nil } } - file_polygon_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_polygon_polygon_index_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PolygonEventLog); i { case 0: return &v.state @@ -732,18 +812,18 @@ func file_polygon_index_types_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_polygon_index_types_proto_rawDesc, + RawDescriptor: file_blockchain_polygon_polygon_index_types_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_polygon_index_types_proto_goTypes, - DependencyIndexes: file_polygon_index_types_proto_depIdxs, - MessageInfos: file_polygon_index_types_proto_msgTypes, + GoTypes: file_blockchain_polygon_polygon_index_types_proto_goTypes, + DependencyIndexes: file_blockchain_polygon_polygon_index_types_proto_depIdxs, + MessageInfos: file_blockchain_polygon_polygon_index_types_proto_msgTypes, }.Build() - File_polygon_index_types_proto = out.File - file_polygon_index_types_proto_rawDesc = nil - file_polygon_index_types_proto_goTypes = nil - file_polygon_index_types_proto_depIdxs = nil + File_blockchain_polygon_polygon_index_types_proto = out.File + file_blockchain_polygon_polygon_index_types_proto_rawDesc = nil + file_blockchain_polygon_polygon_index_types_proto_goTypes = nil + file_blockchain_polygon_polygon_index_types_proto_depIdxs = nil } diff --git a/blockchain/polygon/polygon_index_types.proto b/blockchain/polygon/polygon_index_types.proto index df58b1e..124e7a9 100644 --- a/blockchain/polygon/polygon_index_types.proto +++ b/blockchain/polygon/polygon_index_types.proto @@ -1,8 +1,13 @@ syntax = "proto3"; -option go_package = ".polygon"; +option go_package = "github.com/moonstream-to/seer/blockchain/polygon"; +message PolygonTransactionAccessList { + string address = 1; + repeated string storage_keys = 2; +} + // Represents a single transaction within a block message PolygonTransaction { string hash = 1; @@ -26,7 +31,7 @@ message PolygonTransaction { string r = 19; // Used as a field to match potential EIP-1559 transaction types string s = 20; // Used as a field to match potential EIP-1559 transaction types - repeated string access_list = 21; + repeated PolygonTransactionAccessList access_list = 21; string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types } diff --git a/blockchain/xai/xai.go b/blockchain/xai/xai.go index 6458828..bf2e6e0 100644 --- a/blockchain/xai/xai.go +++ b/blockchain/xai/xai.go @@ -353,11 +353,11 @@ func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]i } func ToProtoSingleBlock(obj *seer_common.BlockJson) *XaiBlock { return &XaiBlock{ - BlockNumber: obj.BlockNumber, - Difficulty: obj.Difficulty, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), + Difficulty: fromHex(obj.Difficulty).Uint64(), ExtraData: obj.ExtraData, - GasLimit: obj.GasLimit, - GasUsed: obj.GasUsed, + GasLimit: fromHex(obj.GasLimit).Uint64(), + GasUsed: fromHex(obj.GasUsed).Uint64(), BaseFeePerGas: obj.BaseFeePerGas, Hash: obj.Hash, LogsBloom: obj.LogsBloom, @@ -366,24 +366,32 @@ func ToProtoSingleBlock(obj *seer_common.BlockJson) *XaiBlock { ParentHash: obj.ParentHash, ReceiptsRoot: obj.ReceiptsRoot, Sha3Uncles: obj.Sha3Uncles, - Size: obj.Size, + Size: fromHex(obj.Size).Uint64(), StateRoot: obj.StateRoot, - Timestamp: obj.Timestamp, + Timestamp: fromHex(obj.Timestamp).Uint64(), TotalDifficulty: obj.TotalDifficulty, TransactionsRoot: obj.TransactionsRoot, - IndexedAt: obj.IndexedAt, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), MixHash: obj.MixHash, SendCount: obj.SendCount, SendRoot: obj.SendRoot, - L1BlockNumber: obj.L1BlockNumber, + L1BlockNumber: fromHex(obj.L1BlockNumber).Uint64(), } } func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *XaiTransaction { + var accessList []*XaiTransactionAccessList + for _, al := range obj.AccessList { + accessList = append(accessList, &XaiTransactionAccessList{ + Address: al.Address, + StorageKeys: al.StorageKeys, + }) + } + return &XaiTransaction{ Hash: obj.Hash, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), BlockHash: obj.BlockHash, FromAddress: obj.FromAddress, ToAddress: obj.ToAddress, @@ -393,18 +401,18 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *XaiTransaction MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, Input: obj.Input, Nonce: obj.Nonce, - TransactionIndex: obj.TransactionIndex, - TransactionType: obj.TransactionType, + TransactionIndex: fromHex(obj.TransactionIndex).Uint64(), + TransactionType: fromHex(obj.TransactionType).Uint64(), Value: obj.Value, - IndexedAt: obj.IndexedAt, - BlockTimestamp: obj.BlockTimestamp, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), + BlockTimestamp: fromHex(obj.BlockTimestamp).Uint64(), ChainId: obj.ChainId, V: obj.V, R: obj.R, S: obj.S, - AccessList: obj.AccessList, + AccessList: accessList, YParity: obj.YParity, } } @@ -415,9 +423,9 @@ func ToProtoSingleEventLog(obj *seer_common.EventJson) *XaiEventLog { Address: obj.Address, Topics: obj.Topics, Data: obj.Data, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), TransactionHash: obj.TransactionHash, - LogIndex: obj.LogIndex, + LogIndex: fromHex(obj.LogIndex).Uint64(), BlockHash: obj.BlockHash, Removed: obj.Removed, } diff --git a/blockchain/xai/xai_index_types.pb.go b/blockchain/xai/xai_index_types.pb.go index b65aeea..731d57f 100644 --- a/blockchain/xai/xai_index_types.pb.go +++ b/blockchain/xai/xai_index_types.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.34.1 // protoc v3.6.1 -// source: xai_index_types.proto +// source: blockchain/xai/xai_index_types.proto package xai @@ -20,40 +20,95 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type XaiTransactionAccessList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storage_keys,omitempty"` +} + +func (x *XaiTransactionAccessList) Reset() { + *x = XaiTransactionAccessList{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_xai_xai_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *XaiTransactionAccessList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*XaiTransactionAccessList) ProtoMessage() {} + +func (x *XaiTransactionAccessList) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_xai_xai_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use XaiTransactionAccessList.ProtoReflect.Descriptor instead. +func (*XaiTransactionAccessList) Descriptor() ([]byte, []int) { + return file_blockchain_xai_xai_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *XaiTransactionAccessList) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *XaiTransactionAccessList) GetStorageKeys() []string { + if x != nil { + return x.StorageKeys + } + return nil +} + // Represents a single transaction within a block type XaiTransaction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction - BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in - FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from - ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to - Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction - GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction - MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types - MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types - Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction - Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction - TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block - TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types - Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction - IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler - BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block - BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in - ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types - V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types - R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types - S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types - AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` - YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []*XaiTransactionAccessList `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types } func (x *XaiTransaction) Reset() { *x = XaiTransaction{} if protoimpl.UnsafeEnabled { - mi := &file_xai_index_types_proto_msgTypes[0] + mi := &file_blockchain_xai_xai_index_types_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -66,7 +121,7 @@ func (x *XaiTransaction) String() string { func (*XaiTransaction) ProtoMessage() {} func (x *XaiTransaction) ProtoReflect() protoreflect.Message { - mi := &file_xai_index_types_proto_msgTypes[0] + mi := &file_blockchain_xai_xai_index_types_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79,7 +134,7 @@ func (x *XaiTransaction) ProtoReflect() protoreflect.Message { // Deprecated: Use XaiTransaction.ProtoReflect.Descriptor instead. func (*XaiTransaction) Descriptor() ([]byte, []int) { - return file_xai_index_types_proto_rawDescGZIP(), []int{0} + return file_blockchain_xai_xai_index_types_proto_rawDescGZIP(), []int{1} } func (x *XaiTransaction) GetHash() string { @@ -222,7 +277,7 @@ func (x *XaiTransaction) GetS() string { return "" } -func (x *XaiTransaction) GetAccessList() []string { +func (x *XaiTransaction) GetAccessList() []*XaiTransactionAccessList { if x != nil { return x.AccessList } @@ -271,7 +326,7 @@ type XaiBlock struct { func (x *XaiBlock) Reset() { *x = XaiBlock{} if protoimpl.UnsafeEnabled { - mi := &file_xai_index_types_proto_msgTypes[1] + mi := &file_blockchain_xai_xai_index_types_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -284,7 +339,7 @@ func (x *XaiBlock) String() string { func (*XaiBlock) ProtoMessage() {} func (x *XaiBlock) ProtoReflect() protoreflect.Message { - mi := &file_xai_index_types_proto_msgTypes[1] + mi := &file_blockchain_xai_xai_index_types_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -297,7 +352,7 @@ func (x *XaiBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use XaiBlock.ProtoReflect.Descriptor instead. func (*XaiBlock) Descriptor() ([]byte, []int) { - return file_xai_index_types_proto_rawDescGZIP(), []int{1} + return file_blockchain_xai_xai_index_types_proto_rawDescGZIP(), []int{2} } func (x *XaiBlock) GetBlockNumber() uint64 { @@ -487,7 +542,7 @@ type XaiEventLog struct { func (x *XaiEventLog) Reset() { *x = XaiEventLog{} if protoimpl.UnsafeEnabled { - mi := &file_xai_index_types_proto_msgTypes[2] + mi := &file_blockchain_xai_xai_index_types_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -500,7 +555,7 @@ func (x *XaiEventLog) String() string { func (*XaiEventLog) ProtoMessage() {} func (x *XaiEventLog) ProtoReflect() protoreflect.Message { - mi := &file_xai_index_types_proto_msgTypes[2] + mi := &file_blockchain_xai_xai_index_types_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -513,7 +568,7 @@ func (x *XaiEventLog) ProtoReflect() protoreflect.Message { // Deprecated: Use XaiEventLog.ProtoReflect.Descriptor instead. func (*XaiEventLog) Descriptor() ([]byte, []int) { - return file_xai_index_types_proto_rawDescGZIP(), []int{2} + return file_blockchain_xai_xai_index_types_proto_rawDescGZIP(), []int{3} } func (x *XaiEventLog) GetAddress() string { @@ -579,157 +634,182 @@ func (x *XaiEventLog) GetTransactionIndex() uint64 { return 0 } -var File_xai_index_types_proto protoreflect.FileDescriptor - -var file_xai_index_types_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x78, 0x61, 0x69, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x05, 0x0a, 0x0e, 0x58, 0x61, 0x69, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, - 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, +var File_blockchain_xai_xai_index_types_proto protoreflect.FileDescriptor + +var file_blockchain_xai_xai_index_types_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x78, 0x61, 0x69, + 0x2f, 0x78, 0x61, 0x69, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x18, 0x58, 0x61, 0x69, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x22, + 0xb4, 0x05, 0x0a, 0x0e, 0x58, 0x61, 0x69, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, + 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, + 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, + 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, + 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, + 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, + 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, + 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, + 0x3a, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x58, 0x61, 0x69, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, + 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, + 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0x8f, 0x06, 0x0a, 0x08, 0x58, 0x61, 0x69, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, + 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, + 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, + 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, + 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, + 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, + 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, + 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, + 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, + 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, + 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, + 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x33, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x58, 0x61, 0x69, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x78, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x78, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, + 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xa4, 0x02, 0x0a, 0x0b, 0x58, 0x61, 0x69, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, + 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, - 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, - 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, - 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, - 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, - 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, - 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, - 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, - 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, - 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, - 0x69, 0x74, 0x79, 0x22, 0x8f, 0x06, 0x0a, 0x08, 0x58, 0x61, 0x69, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, - 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, - 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, - 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, - 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, - 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, - 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, - 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, - 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, - 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, - 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, - 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, - 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, - 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x33, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x58, 0x61, 0x69, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x78, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x78, 0x48, 0x61, 0x73, - 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x17, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, 0x0a, - 0x0f, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xa4, 0x02, 0x0a, 0x0b, 0x58, 0x61, 0x69, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, - 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x06, 0x5a, 0x04, - 0x2e, 0x78, 0x61, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, + 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x6f, + 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2d, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x65, 0x72, + 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x78, 0x61, 0x69, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_xai_index_types_proto_rawDescOnce sync.Once - file_xai_index_types_proto_rawDescData = file_xai_index_types_proto_rawDesc + file_blockchain_xai_xai_index_types_proto_rawDescOnce sync.Once + file_blockchain_xai_xai_index_types_proto_rawDescData = file_blockchain_xai_xai_index_types_proto_rawDesc ) -func file_xai_index_types_proto_rawDescGZIP() []byte { - file_xai_index_types_proto_rawDescOnce.Do(func() { - file_xai_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_xai_index_types_proto_rawDescData) +func file_blockchain_xai_xai_index_types_proto_rawDescGZIP() []byte { + file_blockchain_xai_xai_index_types_proto_rawDescOnce.Do(func() { + file_blockchain_xai_xai_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_blockchain_xai_xai_index_types_proto_rawDescData) }) - return file_xai_index_types_proto_rawDescData + return file_blockchain_xai_xai_index_types_proto_rawDescData } -var file_xai_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_xai_index_types_proto_goTypes = []interface{}{ - (*XaiTransaction)(nil), // 0: XaiTransaction - (*XaiBlock)(nil), // 1: XaiBlock - (*XaiEventLog)(nil), // 2: XaiEventLog +var file_blockchain_xai_xai_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_blockchain_xai_xai_index_types_proto_goTypes = []interface{}{ + (*XaiTransactionAccessList)(nil), // 0: XaiTransactionAccessList + (*XaiTransaction)(nil), // 1: XaiTransaction + (*XaiBlock)(nil), // 2: XaiBlock + (*XaiEventLog)(nil), // 3: XaiEventLog } -var file_xai_index_types_proto_depIdxs = []int32{ - 0, // 0: XaiBlock.transactions:type_name -> XaiTransaction - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name +var file_blockchain_xai_xai_index_types_proto_depIdxs = []int32{ + 0, // 0: XaiTransaction.access_list:type_name -> XaiTransactionAccessList + 1, // 1: XaiBlock.transactions:type_name -> XaiTransaction + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } -func init() { file_xai_index_types_proto_init() } -func file_xai_index_types_proto_init() { - if File_xai_index_types_proto != nil { +func init() { file_blockchain_xai_xai_index_types_proto_init() } +func file_blockchain_xai_xai_index_types_proto_init() { + if File_blockchain_xai_xai_index_types_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_xai_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_xai_xai_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*XaiTransactionAccessList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_xai_xai_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*XaiTransaction); i { case 0: return &v.state @@ -741,7 +821,7 @@ func file_xai_index_types_proto_init() { return nil } } - file_xai_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_xai_xai_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*XaiBlock); i { case 0: return &v.state @@ -753,7 +833,7 @@ func file_xai_index_types_proto_init() { return nil } } - file_xai_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_xai_xai_index_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*XaiEventLog); i { case 0: return &v.state @@ -770,18 +850,18 @@ func file_xai_index_types_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xai_index_types_proto_rawDesc, + RawDescriptor: file_blockchain_xai_xai_index_types_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_xai_index_types_proto_goTypes, - DependencyIndexes: file_xai_index_types_proto_depIdxs, - MessageInfos: file_xai_index_types_proto_msgTypes, + GoTypes: file_blockchain_xai_xai_index_types_proto_goTypes, + DependencyIndexes: file_blockchain_xai_xai_index_types_proto_depIdxs, + MessageInfos: file_blockchain_xai_xai_index_types_proto_msgTypes, }.Build() - File_xai_index_types_proto = out.File - file_xai_index_types_proto_rawDesc = nil - file_xai_index_types_proto_goTypes = nil - file_xai_index_types_proto_depIdxs = nil + File_blockchain_xai_xai_index_types_proto = out.File + file_blockchain_xai_xai_index_types_proto_rawDesc = nil + file_blockchain_xai_xai_index_types_proto_goTypes = nil + file_blockchain_xai_xai_index_types_proto_depIdxs = nil } diff --git a/blockchain/xai/xai_index_types.proto b/blockchain/xai/xai_index_types.proto index 86fb451..2089b9c 100644 --- a/blockchain/xai/xai_index_types.proto +++ b/blockchain/xai/xai_index_types.proto @@ -1,8 +1,13 @@ syntax = "proto3"; -option go_package = ".xai"; +option go_package = "github.com/moonstream-to/seer/blockchain/xai"; +message XaiTransactionAccessList { + string address = 1; + repeated string storage_keys = 2; +} + // Represents a single transaction within a block message XaiTransaction { string hash = 1; // The hash of the transaction @@ -26,7 +31,7 @@ message XaiTransaction { string r = 19; // Used as a field to match potential EIP-1559 transaction types string s = 20; // Used as a field to match potential EIP-1559 transaction types - repeated string access_list = 21; + repeated XaiTransactionAccessList access_list = 21; string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types } diff --git a/blockchain/xai_sepolia/xai_sepolia.go b/blockchain/xai_sepolia/xai_sepolia.go index 0924b7b..4a177b5 100644 --- a/blockchain/xai_sepolia/xai_sepolia.go +++ b/blockchain/xai_sepolia/xai_sepolia.go @@ -353,11 +353,11 @@ func (c *Client) FetchAsProtoEvents(from, to *big.Int, blocksCahche map[uint64]i } func ToProtoSingleBlock(obj *seer_common.BlockJson) *XaiSepoliaBlock { return &XaiSepoliaBlock{ - BlockNumber: obj.BlockNumber, - Difficulty: obj.Difficulty, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), + Difficulty: fromHex(obj.Difficulty).Uint64(), ExtraData: obj.ExtraData, - GasLimit: obj.GasLimit, - GasUsed: obj.GasUsed, + GasLimit: fromHex(obj.GasLimit).Uint64(), + GasUsed: fromHex(obj.GasUsed).Uint64(), BaseFeePerGas: obj.BaseFeePerGas, Hash: obj.Hash, LogsBloom: obj.LogsBloom, @@ -366,24 +366,32 @@ func ToProtoSingleBlock(obj *seer_common.BlockJson) *XaiSepoliaBlock { ParentHash: obj.ParentHash, ReceiptsRoot: obj.ReceiptsRoot, Sha3Uncles: obj.Sha3Uncles, - Size: obj.Size, + Size: fromHex(obj.Size).Uint64(), StateRoot: obj.StateRoot, - Timestamp: obj.Timestamp, + Timestamp: fromHex(obj.Timestamp).Uint64(), TotalDifficulty: obj.TotalDifficulty, TransactionsRoot: obj.TransactionsRoot, - IndexedAt: obj.IndexedAt, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), MixHash: obj.MixHash, SendCount: obj.SendCount, SendRoot: obj.SendRoot, - L1BlockNumber: obj.L1BlockNumber, + L1BlockNumber: fromHex(obj.L1BlockNumber).Uint64(), } } func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *XaiSepoliaTransaction { + var accessList []*XaiSepoliaTransactionAccessList + for _, al := range obj.AccessList { + accessList = append(accessList, &XaiSepoliaTransactionAccessList{ + Address: al.Address, + StorageKeys: al.StorageKeys, + }) + } + return &XaiSepoliaTransaction{ Hash: obj.Hash, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), BlockHash: obj.BlockHash, FromAddress: obj.FromAddress, ToAddress: obj.ToAddress, @@ -393,18 +401,18 @@ func ToProtoSingleTransaction(obj *seer_common.TransactionJson) *XaiSepoliaTrans MaxPriorityFeePerGas: obj.MaxPriorityFeePerGas, Input: obj.Input, Nonce: obj.Nonce, - TransactionIndex: obj.TransactionIndex, - TransactionType: obj.TransactionType, + TransactionIndex: fromHex(obj.TransactionIndex).Uint64(), + TransactionType: fromHex(obj.TransactionType).Uint64(), Value: obj.Value, - IndexedAt: obj.IndexedAt, - BlockTimestamp: obj.BlockTimestamp, + IndexedAt: fromHex(obj.IndexedAt).Uint64(), + BlockTimestamp: fromHex(obj.BlockTimestamp).Uint64(), ChainId: obj.ChainId, V: obj.V, R: obj.R, S: obj.S, - AccessList: obj.AccessList, + AccessList: accessList, YParity: obj.YParity, } } @@ -415,9 +423,9 @@ func ToProtoSingleEventLog(obj *seer_common.EventJson) *XaiSepoliaEventLog { Address: obj.Address, Topics: obj.Topics, Data: obj.Data, - BlockNumber: obj.BlockNumber, + BlockNumber: fromHex(obj.BlockNumber).Uint64(), TransactionHash: obj.TransactionHash, - LogIndex: obj.LogIndex, + LogIndex: fromHex(obj.LogIndex).Uint64(), BlockHash: obj.BlockHash, Removed: obj.Removed, } diff --git a/blockchain/xai_sepolia/xai_sepolia_index_types.pb.go b/blockchain/xai_sepolia/xai_sepolia_index_types.pb.go index 4f49e3b..0c41d3e 100644 --- a/blockchain/xai_sepolia/xai_sepolia_index_types.pb.go +++ b/blockchain/xai_sepolia/xai_sepolia_index_types.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.34.1 // protoc v3.6.1 -// source: xai_sepolia_index_types.proto +// source: blockchain/xai_sepolia/xai_sepolia_index_types.proto package xai_sepolia @@ -20,40 +20,95 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type XaiSepoliaTransactionAccessList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storage_keys,omitempty"` +} + +func (x *XaiSepoliaTransactionAccessList) Reset() { + *x = XaiSepoliaTransactionAccessList{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *XaiSepoliaTransactionAccessList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*XaiSepoliaTransactionAccessList) ProtoMessage() {} + +func (x *XaiSepoliaTransactionAccessList) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use XaiSepoliaTransactionAccessList.ProtoReflect.Descriptor instead. +func (*XaiSepoliaTransactionAccessList) Descriptor() ([]byte, []int) { + return file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_rawDescGZIP(), []int{0} +} + +func (x *XaiSepoliaTransactionAccessList) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *XaiSepoliaTransactionAccessList) GetStorageKeys() []string { + if x != nil { + return x.StorageKeys + } + return nil +} + // Represents a single transaction within a block type XaiSepoliaTransaction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction - BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in - FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from - ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to - Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction - GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction - MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types - MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types - Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction - Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction - TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block - TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types - Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction - IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler - BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block - BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in - ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types - V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types - R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types - S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types - AccessList []string `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` - YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The hash of the transaction + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // The block number the transaction is in + FromAddress string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The address the transaction is sent from + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // The address the transaction is sent to + Gas string `protobuf:"bytes,5,opt,name=gas,proto3" json:"gas,omitempty"` // The gas limit of the transaction + GasPrice string `protobuf:"bytes,6,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // The gas price of the transaction + MaxFeePerGas string `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + MaxPriorityFeePerGas string `protobuf:"bytes,8,opt,name=max_priority_fee_per_gas,json=maxPriorityFeePerGas,proto3" json:"max_priority_fee_per_gas,omitempty"` // Used as a field to match potential EIP-1559 transaction types + Input string `protobuf:"bytes,9,opt,name=input,proto3" json:"input,omitempty"` // The input data of the transaction + Nonce string `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` // The nonce of the transaction + TransactionIndex uint64 `protobuf:"varint,11,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"` // The index of the transaction in the block + TransactionType uint64 `protobuf:"varint,12,opt,name=transaction_type,json=transactionType,proto3" json:"transaction_type,omitempty"` // Field to match potential EIP-1559 transaction types + Value string `protobuf:"bytes,13,opt,name=value,proto3" json:"value,omitempty"` // The value of the transaction + IndexedAt uint64 `protobuf:"varint,14,opt,name=indexed_at,json=indexedAt,proto3" json:"indexed_at,omitempty"` // When the transaction was indexed by crawler + BlockTimestamp uint64 `protobuf:"varint,15,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"` // The timestamp of this block + BlockHash string `protobuf:"bytes,16,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // The hash of the block the transaction is in + ChainId string `protobuf:"bytes,17,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Used as a field to match potential EIP-1559 transaction types + V string `protobuf:"bytes,18,opt,name=v,proto3" json:"v,omitempty"` // Used as a field to match potential EIP-1559 transaction types + R string `protobuf:"bytes,19,opt,name=r,proto3" json:"r,omitempty"` // Used as a field to match potential EIP-1559 transaction types + S string `protobuf:"bytes,20,opt,name=s,proto3" json:"s,omitempty"` // Used as a field to match potential EIP-1559 transaction types + AccessList []*XaiSepoliaTransactionAccessList `protobuf:"bytes,21,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + YParity string `protobuf:"bytes,22,opt,name=y_parity,json=yParity,proto3" json:"y_parity,omitempty"` // Used as a field to match potential EIP-1559 transaction types } func (x *XaiSepoliaTransaction) Reset() { *x = XaiSepoliaTransaction{} if protoimpl.UnsafeEnabled { - mi := &file_xai_sepolia_index_types_proto_msgTypes[0] + mi := &file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -66,7 +121,7 @@ func (x *XaiSepoliaTransaction) String() string { func (*XaiSepoliaTransaction) ProtoMessage() {} func (x *XaiSepoliaTransaction) ProtoReflect() protoreflect.Message { - mi := &file_xai_sepolia_index_types_proto_msgTypes[0] + mi := &file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79,7 +134,7 @@ func (x *XaiSepoliaTransaction) ProtoReflect() protoreflect.Message { // Deprecated: Use XaiSepoliaTransaction.ProtoReflect.Descriptor instead. func (*XaiSepoliaTransaction) Descriptor() ([]byte, []int) { - return file_xai_sepolia_index_types_proto_rawDescGZIP(), []int{0} + return file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_rawDescGZIP(), []int{1} } func (x *XaiSepoliaTransaction) GetHash() string { @@ -222,7 +277,7 @@ func (x *XaiSepoliaTransaction) GetS() string { return "" } -func (x *XaiSepoliaTransaction) GetAccessList() []string { +func (x *XaiSepoliaTransaction) GetAccessList() []*XaiSepoliaTransactionAccessList { if x != nil { return x.AccessList } @@ -271,7 +326,7 @@ type XaiSepoliaBlock struct { func (x *XaiSepoliaBlock) Reset() { *x = XaiSepoliaBlock{} if protoimpl.UnsafeEnabled { - mi := &file_xai_sepolia_index_types_proto_msgTypes[1] + mi := &file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -284,7 +339,7 @@ func (x *XaiSepoliaBlock) String() string { func (*XaiSepoliaBlock) ProtoMessage() {} func (x *XaiSepoliaBlock) ProtoReflect() protoreflect.Message { - mi := &file_xai_sepolia_index_types_proto_msgTypes[1] + mi := &file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -297,7 +352,7 @@ func (x *XaiSepoliaBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use XaiSepoliaBlock.ProtoReflect.Descriptor instead. func (*XaiSepoliaBlock) Descriptor() ([]byte, []int) { - return file_xai_sepolia_index_types_proto_rawDescGZIP(), []int{1} + return file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_rawDescGZIP(), []int{2} } func (x *XaiSepoliaBlock) GetBlockNumber() uint64 { @@ -487,7 +542,7 @@ type XaiSepoliaEventLog struct { func (x *XaiSepoliaEventLog) Reset() { *x = XaiSepoliaEventLog{} if protoimpl.UnsafeEnabled { - mi := &file_xai_sepolia_index_types_proto_msgTypes[2] + mi := &file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -500,7 +555,7 @@ func (x *XaiSepoliaEventLog) String() string { func (*XaiSepoliaEventLog) ProtoMessage() {} func (x *XaiSepoliaEventLog) ProtoReflect() protoreflect.Message { - mi := &file_xai_sepolia_index_types_proto_msgTypes[2] + mi := &file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -513,7 +568,7 @@ func (x *XaiSepoliaEventLog) ProtoReflect() protoreflect.Message { // Deprecated: Use XaiSepoliaEventLog.ProtoReflect.Descriptor instead. func (*XaiSepoliaEventLog) Descriptor() ([]byte, []int) { - return file_xai_sepolia_index_types_proto_rawDescGZIP(), []int{2} + return file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_rawDescGZIP(), []int{3} } func (x *XaiSepoliaEventLog) GetAddress() string { @@ -579,160 +634,186 @@ func (x *XaiSepoliaEventLog) GetTransactionIndex() uint64 { return 0 } -var File_xai_sepolia_index_types_proto protoreflect.FileDescriptor - -var file_xai_sepolia_index_types_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x78, 0x61, 0x69, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xa0, 0x05, 0x0a, 0x15, 0x58, 0x61, 0x69, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, - 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, - 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, - 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, - 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, - 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, - 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, - 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, - 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, - 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, - 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, - 0x74, 0x79, 0x22, 0x9d, 0x06, 0x0a, 0x0f, 0x58, 0x61, 0x69, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, - 0x61, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, - 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, - 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, - 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, - 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, - 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, - 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, - 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, - 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, - 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, - 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, - 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, - 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, - 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, - 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, - 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, - 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x58, 0x61, 0x69, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, - 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x16, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, - 0x09, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x31, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x18, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x22, 0xab, 0x02, 0x0a, 0x12, 0x58, 0x61, 0x69, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, - 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, +var File_blockchain_xai_sepolia_xai_sepolia_index_types_proto protoreflect.FileDescriptor + +var file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_rawDesc = []byte{ + 0x0a, 0x34, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x78, 0x61, 0x69, + 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x2f, 0x78, 0x61, 0x69, 0x5f, 0x73, 0x65, 0x70, + 0x6f, 0x6c, 0x69, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x1f, 0x58, 0x61, 0x69, 0x53, 0x65, 0x70, + 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, - 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6b, + 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xc2, 0x05, 0x0a, 0x15, 0x58, 0x61, 0x69, 0x53, 0x65, + 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, + 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, + 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, + 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, + 0x36, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, + 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, + 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x78, 0x61, 0x69, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x76, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, + 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, + 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x73, 0x12, 0x41, 0x0a, + 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x58, 0x61, 0x69, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x19, 0x0a, 0x08, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x79, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x22, 0x9d, 0x06, 0x0a, 0x0f, + 0x58, 0x61, 0x69, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, + 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, + 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x10, 0x62, 0x61, 0x73, + 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, + 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, + 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, + 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x70, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x5f, + 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, + 0x61, 0x33, 0x55, 0x6e, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, + 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x3a, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x58, 0x61, 0x69, 0x53, 0x65, 0x70, 0x6f, + 0x6c, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, + 0x6d, 0x69, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x69, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x6e, + 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x52, + 0x6f, 0x6f, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x31, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xab, 0x02, 0x0a, 0x12, + 0x58, 0x61, 0x69, 0x53, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, + 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, + 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, + 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x6f, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x2d, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x65, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x78, 0x61, 0x69, 0x5f, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, + 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_xai_sepolia_index_types_proto_rawDescOnce sync.Once - file_xai_sepolia_index_types_proto_rawDescData = file_xai_sepolia_index_types_proto_rawDesc + file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_rawDescOnce sync.Once + file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_rawDescData = file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_rawDesc ) -func file_xai_sepolia_index_types_proto_rawDescGZIP() []byte { - file_xai_sepolia_index_types_proto_rawDescOnce.Do(func() { - file_xai_sepolia_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_xai_sepolia_index_types_proto_rawDescData) +func file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_rawDescGZIP() []byte { + file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_rawDescOnce.Do(func() { + file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_rawDescData) }) - return file_xai_sepolia_index_types_proto_rawDescData + return file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_rawDescData } -var file_xai_sepolia_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_xai_sepolia_index_types_proto_goTypes = []interface{}{ - (*XaiSepoliaTransaction)(nil), // 0: XaiSepoliaTransaction - (*XaiSepoliaBlock)(nil), // 1: XaiSepoliaBlock - (*XaiSepoliaEventLog)(nil), // 2: XaiSepoliaEventLog +var file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_goTypes = []interface{}{ + (*XaiSepoliaTransactionAccessList)(nil), // 0: XaiSepoliaTransactionAccessList + (*XaiSepoliaTransaction)(nil), // 1: XaiSepoliaTransaction + (*XaiSepoliaBlock)(nil), // 2: XaiSepoliaBlock + (*XaiSepoliaEventLog)(nil), // 3: XaiSepoliaEventLog } -var file_xai_sepolia_index_types_proto_depIdxs = []int32{ - 0, // 0: XaiSepoliaBlock.transactions:type_name -> XaiSepoliaTransaction - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name +var file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_depIdxs = []int32{ + 0, // 0: XaiSepoliaTransaction.access_list:type_name -> XaiSepoliaTransactionAccessList + 1, // 1: XaiSepoliaBlock.transactions:type_name -> XaiSepoliaTransaction + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } -func init() { file_xai_sepolia_index_types_proto_init() } -func file_xai_sepolia_index_types_proto_init() { - if File_xai_sepolia_index_types_proto != nil { +func init() { file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_init() } +func file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_init() { + if File_blockchain_xai_sepolia_xai_sepolia_index_types_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_xai_sepolia_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*XaiSepoliaTransactionAccessList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*XaiSepoliaTransaction); i { case 0: return &v.state @@ -744,7 +825,7 @@ func file_xai_sepolia_index_types_proto_init() { return nil } } - file_xai_sepolia_index_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*XaiSepoliaBlock); i { case 0: return &v.state @@ -756,7 +837,7 @@ func file_xai_sepolia_index_types_proto_init() { return nil } } - file_xai_sepolia_index_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*XaiSepoliaEventLog); i { case 0: return &v.state @@ -773,18 +854,18 @@ func file_xai_sepolia_index_types_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xai_sepolia_index_types_proto_rawDesc, + RawDescriptor: file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_xai_sepolia_index_types_proto_goTypes, - DependencyIndexes: file_xai_sepolia_index_types_proto_depIdxs, - MessageInfos: file_xai_sepolia_index_types_proto_msgTypes, + GoTypes: file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_goTypes, + DependencyIndexes: file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_depIdxs, + MessageInfos: file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_msgTypes, }.Build() - File_xai_sepolia_index_types_proto = out.File - file_xai_sepolia_index_types_proto_rawDesc = nil - file_xai_sepolia_index_types_proto_goTypes = nil - file_xai_sepolia_index_types_proto_depIdxs = nil + File_blockchain_xai_sepolia_xai_sepolia_index_types_proto = out.File + file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_rawDesc = nil + file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_goTypes = nil + file_blockchain_xai_sepolia_xai_sepolia_index_types_proto_depIdxs = nil } diff --git a/blockchain/xai_sepolia/xai_sepolia_index_types.proto b/blockchain/xai_sepolia/xai_sepolia_index_types.proto index 0aef6a3..d014c49 100644 --- a/blockchain/xai_sepolia/xai_sepolia_index_types.proto +++ b/blockchain/xai_sepolia/xai_sepolia_index_types.proto @@ -1,8 +1,13 @@ syntax = "proto3"; -option go_package = ".xai_sepolia"; +option go_package = "github.com/moonstream-to/seer/blockchain/xai_sepolia"; +message XaiSepoliaTransactionAccessList { + string address = 1; + repeated string storage_keys = 2; +} + // Represents a single transaction within a block message XaiSepoliaTransaction { string hash = 1; // The hash of the transaction @@ -26,7 +31,7 @@ message XaiSepoliaTransaction { string r = 19; // Used as a field to match potential EIP-1559 transaction types string s = 20; // Used as a field to match potential EIP-1559 transaction types - repeated string access_list = 21; + repeated XaiSepoliaTransactionAccessList access_list = 21; string y_parity = 22; // Used as a field to match potential EIP-1559 transaction types } diff --git a/crawler/README.md b/crawler/README.md index 06b1426..aeddb17 100644 --- a/crawler/README.md +++ b/crawler/README.md @@ -38,25 +38,24 @@ Blockchain structure: ## Regenerate proto interface -1. Go to chain directory, for example: +1. Generate code with proto compiler, docs: https://protobuf.dev/reference/go/go-generated/ ```bash -cd blockchain/ethereum +protoc --go_out=. --go_opt=paths=source_relative \ + blockchain/ethereum/ethereum_index_types.proto ``` -2. Generate code with proto compiler, docs: https://protobuf.dev/reference/go/go-generated/ +2. Rename generated file similar to chain package. +3. Generate interface with seer, if chain is L2, specify flag `--side-chain`: ```bash -protoc --go_out=. --go_opt=paths=source_relative \ - ethereum_index_types.proto +./seer blockchain generate -n ethereum ``` -3. Rename generated file similar to chain package. -4. Generate interface with seer, if chain is L2, specify flag `--side-chain`: +Or use bash script to do all job. But be careful it by default generates interfaces for L1 chains with additional fields, for side chains this script requires modification: ```bash -cd ../.. -./seer blockchain generate -n ethereum +./prepare_blockchains.sh ``` ## Run crawler diff --git a/dev.sh b/dev.sh new file mode 100755 index 0000000..3c02ed2 --- /dev/null +++ b/dev.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +# Compile application and run with provided arguments +set -e + +PROGRAM_NAME="seer" + +go build -o "$PROGRAM_NAME" . + +./"$PROGRAM_NAME" "$@" diff --git a/prepare_blockchains.sh b/prepare_blockchains.sh new file mode 100755 index 0000000..a2b1841 --- /dev/null +++ b/prepare_blockchains.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env sh + +# Delete all .pb.go and interfaces for each blockchain, re-generate it from .proto +set -e + +PROTO_FILES=$(find blockchain/ -name '*.proto') +for PROTO in $PROTO_FILES; do + protoc --go_out=. --go_opt=paths=source_relative $PROTO + echo "Regenerated from proto: $PROTO" +done + +BLOCKCHAIN_NAMES_RAW=$(find blockchain/ -maxdepth 1 -type d | cut -f2 -d '/') +for BLOCKCHAIN in $BLOCKCHAIN_NAMES_RAW; do + if [ "$BLOCKCHAIN" != "" ] && [ "$BLOCKCHAIN" != "common" ]; then + if [ "$BLOCKCHAIN" != "ethereum" ] && [ "$BLOCKCHAIN" != "polygon" ] && [ "$BLOCKCHAIN" != "mantle" ] && [ "$BLOCKCHAIN" != "mantle_sepolia" ]; then + ./seer blockchain generate -n $BLOCKCHAIN --side-chain + echo "Generated interface for side-chain blockchain $BLOCKCHAIN" + else + ./seer blockchain generate -n $BLOCKCHAIN + echo "Generated interface for blockchain $BLOCKCHAIN" + fi + fi +done From 33bfb3ba5d84b052bfdf82e185486435bbc54b63 Mon Sep 17 00:00:00 2001 From: kompotkot Date: Tue, 4 Jun 2024 10:45:19 +0000 Subject: [PATCH 08/13] Indexer with l1 chain --- blockchain/arbitrum_one/arbitrum_one.go | 1 + .../arbitrum_sepolia/arbitrum_sepolia.go | 1 + blockchain/blockchain.go.tmpl | 1 + blockchain/ethereum/ethereum.go | 1 + .../game7_orbit_arbitrum_sepolia.go | 1 + blockchain/mantle/mantle.go | 1 + blockchain/mantle_sepolia/mantle_sepolia.go | 1 + blockchain/polygon/polygon.go | 1 + blockchain/xai/xai.go | 1 + blockchain/xai_sepolia/xai_sepolia.go | 1 + crawler/README.md | 18 +++++++ indexer/db.go | 49 +++++++++++++++++-- indexer/types.go | 4 +- indexer/upload.go | 2 +- 14 files changed, 76 insertions(+), 7 deletions(-) diff --git a/blockchain/arbitrum_one/arbitrum_one.go b/blockchain/arbitrum_one/arbitrum_one.go index 1012316..ac17b10 100644 --- a/blockchain/arbitrum_one/arbitrum_one.go +++ b/blockchain/arbitrum_one/arbitrum_one.go @@ -272,6 +272,7 @@ func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto block.ParentHash, uint64(index), "", + block.L1BlockNumber, )) } diff --git a/blockchain/arbitrum_sepolia/arbitrum_sepolia.go b/blockchain/arbitrum_sepolia/arbitrum_sepolia.go index cbda535..7e9213b 100644 --- a/blockchain/arbitrum_sepolia/arbitrum_sepolia.go +++ b/blockchain/arbitrum_sepolia/arbitrum_sepolia.go @@ -272,6 +272,7 @@ func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto block.ParentHash, uint64(index), "", + block.L1BlockNumber, )) } diff --git a/blockchain/blockchain.go.tmpl b/blockchain/blockchain.go.tmpl index 1b8ffb9..15f3aaf 100644 --- a/blockchain/blockchain.go.tmpl +++ b/blockchain/blockchain.go.tmpl @@ -272,6 +272,7 @@ func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto block.ParentHash, uint64(index), "", + {{if .IsSideChain -}}block.L1BlockNumber,{{else}}0,{{end}} )) } diff --git a/blockchain/ethereum/ethereum.go b/blockchain/ethereum/ethereum.go index d35877b..23b6cbf 100644 --- a/blockchain/ethereum/ethereum.go +++ b/blockchain/ethereum/ethereum.go @@ -272,6 +272,7 @@ func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto block.ParentHash, uint64(index), "", + 0, )) } diff --git a/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia.go b/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia.go index a464747..c29b862 100644 --- a/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia.go +++ b/blockchain/game7_orbit_arbitrum_sepolia/game7_orbit_arbitrum_sepolia.go @@ -272,6 +272,7 @@ func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto block.ParentHash, uint64(index), "", + block.L1BlockNumber, )) } diff --git a/blockchain/mantle/mantle.go b/blockchain/mantle/mantle.go index 1473a70..5d7bb57 100644 --- a/blockchain/mantle/mantle.go +++ b/blockchain/mantle/mantle.go @@ -272,6 +272,7 @@ func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto block.ParentHash, uint64(index), "", + 0, )) } diff --git a/blockchain/mantle_sepolia/mantle_sepolia.go b/blockchain/mantle_sepolia/mantle_sepolia.go index 212ba77..0c5024e 100644 --- a/blockchain/mantle_sepolia/mantle_sepolia.go +++ b/blockchain/mantle_sepolia/mantle_sepolia.go @@ -272,6 +272,7 @@ func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto block.ParentHash, uint64(index), "", + 0, )) } diff --git a/blockchain/polygon/polygon.go b/blockchain/polygon/polygon.go index 3804ffa..1ad4104 100644 --- a/blockchain/polygon/polygon.go +++ b/blockchain/polygon/polygon.go @@ -272,6 +272,7 @@ func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto block.ParentHash, uint64(index), "", + 0, )) } diff --git a/blockchain/xai/xai.go b/blockchain/xai/xai.go index bf2e6e0..822bd7e 100644 --- a/blockchain/xai/xai.go +++ b/blockchain/xai/xai.go @@ -272,6 +272,7 @@ func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto block.ParentHash, uint64(index), "", + block.L1BlockNumber, )) } diff --git a/blockchain/xai_sepolia/xai_sepolia.go b/blockchain/xai_sepolia/xai_sepolia.go index 4a177b5..0b690c8 100644 --- a/blockchain/xai_sepolia/xai_sepolia.go +++ b/blockchain/xai_sepolia/xai_sepolia.go @@ -272,6 +272,7 @@ func (c *Client) FetchAsProtoBlocks(from, to *big.Int) ([]proto.Message, []proto block.ParentHash, uint64(index), "", + block.L1BlockNumber, )) } diff --git a/crawler/README.md b/crawler/README.md index aeddb17..d5933c5 100644 --- a/crawler/README.md +++ b/crawler/README.md @@ -2,6 +2,18 @@ That part of seer responsible for crawling raw blocks,tx_calls and events from the blockchain. +List of supported blockchains: + +- arbitrum_one +- arbitrum_sepolia +- ethereum +- game7_orbit_arbitrum_sepolia +- mantle +- mantle_sepolia +- polygon +- xai +- xai_sepolia + ## Build You can use `make` to build `crawler`. From the root of this project, run: @@ -16,6 +28,12 @@ Or build with go tools: go build -o seer . ``` +Or use dev script: + +```bash +./dev.sh --help +``` + Set environment variables: ```bash diff --git a/indexer/db.go b/indexer/db.go index b92319b..9b1f400 100644 --- a/indexer/db.go +++ b/indexer/db.go @@ -47,6 +47,31 @@ func hexStringToInt(hexString string) (int64, error) { return intValue, nil } +func IsBlockchainWithL1Chain(blockchain string) bool { + switch blockchain { + case "ethereum": + return false + case "polygon": + return false + case "arbitrum_one": + return true + case "arbitrum_sepolia": + return true + case "game7_orbit_arbitrum_sepolia": + return true + case "xai": + return true + case "xai_sepolia": + return true + case "mantle": + return false + case "mantle_sepolia": + return false + default: + return false + } +} + type PostgreSQLpgx struct { pool *pgxpool.Pool } @@ -245,7 +270,8 @@ func (p *PostgreSQLpgx) ReadLastLabel(blockchain string) (uint64, error) { return label, nil } -func (p *PostgreSQLpgx) writeBlockIndexToDB(tableName string, indexes []BlockIndex) error { +func (p *PostgreSQLpgx) writeBlockIndexToDB(blockchain string, indexes []BlockIndex) error { + tableName := blockchain + "_blocks" pool := p.GetPool() conn, err := pool.Acquire(context.Background()) @@ -256,17 +282,30 @@ func (p *PostgreSQLpgx) writeBlockIndexToDB(tableName string, indexes []BlockInd defer conn.Release() // Start building the bulk insert query - query := fmt.Sprintf("INSERT INTO %s ( block_number, block_hash, block_timestamp, parent_hash, row_id, path) VALUES ", tableName) + var query string + isBlockchainWithL1Chain := IsBlockchainWithL1Chain(blockchain) + if isBlockchainWithL1Chain { + query = fmt.Sprintf("INSERT INTO %s (block_number,block_hash,block_timestamp,parent_hash,row_id,path,l1_block_number) VALUES ", tableName) + } else { + query = fmt.Sprintf("INSERT INTO %s (block_number,block_hash,block_timestamp,parent_hash,row_id,path) VALUES ", tableName) + } // Placeholder slice for query parameters var params []interface{} // Loop through indexes to append values and parameters for i, index := range indexes { - - query += fmt.Sprintf("( $%d, $%d, $%d, $%d, $%d, $%d),", i*6+1, i*6+2, i*6+3, i*6+4, i*6+5, i*6+6) - params = append(params, index.BlockNumber, index.BlockHash, index.BlockTimestamp, index.ParentHash, index.RowID, index.Path) + if isBlockchainWithL1Chain { + query += fmt.Sprintf("( $%d, $%d, $%d, $%d, $%d, $%d, $%d),", i*6+1, i*6+2, i*6+3, i*6+4, i*6+5, i*6+6, i*6+7) + params = append(params, index.BlockNumber, index.BlockHash, index.BlockTimestamp, index.ParentHash, index.RowID, index.Path, index.L1BlockNumber) + } else { + query += fmt.Sprintf("( $%d, $%d, $%d, $%d, $%d, $%d),", i*6+1, i*6+2, i*6+3, i*6+4, i*6+5, i*6+6) + params = append(params, index.BlockNumber, index.BlockHash, index.BlockTimestamp, index.ParentHash, index.RowID, index.Path) + } } + fmt.Println(query) + fmt.Println(params) + // Remove the last comma from the query query = query[:len(query)-1] diff --git a/indexer/types.go b/indexer/types.go index d807755..bdb071d 100644 --- a/indexer/types.go +++ b/indexer/types.go @@ -14,6 +14,7 @@ type BlockIndex struct { ParentHash string RowID uint64 Path string + L1BlockNumber uint64 } func (b *BlockIndex) SetChain(chain string) { @@ -21,7 +22,7 @@ func (b *BlockIndex) SetChain(chain string) { } // NewBlockIndex creates a new instance of BlockIndex with the chain set. -func NewBlockIndex(chain string, blockNumber uint64, blockHash string, blockTimestamp uint64, parentHash string, row_id uint64, path string) BlockIndex { +func NewBlockIndex(chain string, blockNumber uint64, blockHash string, blockTimestamp uint64, parentHash string, row_id uint64, path string, l1BlockNumber uint64) BlockIndex { return BlockIndex{ chain: chain, BlockNumber: blockNumber, @@ -30,6 +31,7 @@ func NewBlockIndex(chain string, blockNumber uint64, blockHash string, blockTime ParentHash: parentHash, RowID: row_id, Path: path, + L1BlockNumber: l1BlockNumber, } } diff --git a/indexer/upload.go b/indexer/upload.go index 9559ec9..8ab38f4 100644 --- a/indexer/upload.go +++ b/indexer/upload.go @@ -164,7 +164,7 @@ func WriteIndexesToDatabase(blockchain string, indexes []interface{}, indexType index.chain = blockchain blockIndexes = append(blockIndexes, index) } - return DBConnection.writeBlockIndexToDB(blockchain+"_blocks", blockIndexes) + return DBConnection.writeBlockIndexToDB(blockchain, blockIndexes) case "transaction": var transactionIndexes []TransactionIndex From f0b4d1a5832c80399b492ecb9a2db2e224704105 Mon Sep 17 00:00:00 2001 From: kompotkot Date: Tue, 4 Jun 2024 10:48:20 +0000 Subject: [PATCH 09/13] Fix overlap db insert params --- indexer/db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indexer/db.go b/indexer/db.go index 9b1f400..89ec6d8 100644 --- a/indexer/db.go +++ b/indexer/db.go @@ -295,7 +295,7 @@ func (p *PostgreSQLpgx) writeBlockIndexToDB(blockchain string, indexes []BlockIn // Loop through indexes to append values and parameters for i, index := range indexes { if isBlockchainWithL1Chain { - query += fmt.Sprintf("( $%d, $%d, $%d, $%d, $%d, $%d, $%d),", i*6+1, i*6+2, i*6+3, i*6+4, i*6+5, i*6+6, i*6+7) + query += fmt.Sprintf("( $%d, $%d, $%d, $%d, $%d, $%d, $%d),", i*7+1, i*7+2, i*7+3, i*7+4, i*7+5, i*7+6, i*7+7) params = append(params, index.BlockNumber, index.BlockHash, index.BlockTimestamp, index.ParentHash, index.RowID, index.Path, index.L1BlockNumber) } else { query += fmt.Sprintf("( $%d, $%d, $%d, $%d, $%d, $%d),", i*6+1, i*6+2, i*6+3, i*6+4, i*6+5, i*6+6) From 6271db542fff4a4c61c764538832fcd81080a773 Mon Sep 17 00:00:00 2001 From: kompotkot Date: Tue, 4 Jun 2024 10:49:34 +0000 Subject: [PATCH 10/13] Removed debug fmt --- indexer/db.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/indexer/db.go b/indexer/db.go index 89ec6d8..cec6cea 100644 --- a/indexer/db.go +++ b/indexer/db.go @@ -303,9 +303,6 @@ func (p *PostgreSQLpgx) writeBlockIndexToDB(blockchain string, indexes []BlockIn } } - fmt.Println(query) - fmt.Println(params) - // Remove the last comma from the query query = query[:len(query)-1] From 5ce6de46cebde0504718fa0bd184846edefeec6f Mon Sep 17 00:00:00 2001 From: kompotkot Date: Tue, 4 Jun 2024 11:00:27 +0000 Subject: [PATCH 11/13] Fix blockchain client wrapper --- blockchain/handlers.go | 27 +-------------------------- cmd.go | 5 +++-- crawler/crawler.go | 2 ++ crawler/settings.go | 14 +++++++------- 4 files changed, 13 insertions(+), 35 deletions(-) diff --git a/blockchain/handlers.go b/blockchain/handlers.go index 905e64d..17bd4ca 100644 --- a/blockchain/handlers.go +++ b/blockchain/handlers.go @@ -5,7 +5,6 @@ import ( "fmt" "log" "math/big" - "os" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/moonstream-to/seer/blockchain/arbitrum_one" @@ -21,7 +20,7 @@ import ( "google.golang.org/protobuf/proto" ) -func wrapClient(url, chain string) (BlockchainClient, error) { +func NewClient(chain, url string) (BlockchainClient, error) { if chain == "ethereum" { client, err := ethereum.NewClient(url) return client, err @@ -72,30 +71,6 @@ type BlockchainClient interface { ChainType() string } -// return client depends on the blockchain type -func NewClient(chainType string, url string) (BlockchainClient, error) { - - // case statement for url - if url == "" { - switch chainType { - case "ethereum": - url = os.Getenv("MOONSTREAM_ETHEREUM_URL") - case "polygon": - url = os.Getenv("MOONSTREAM_POLYGON_URL") - default: - return nil, errors.New("unsupported chain type can't get url") - } - } - - client, err := wrapClient(url, chainType) - if err != nil { - fmt.Println("error", err) - return nil, errors.New("unsupported chain type") - } - - return client, nil -} - // crawl blocks func CrawlBlocks(client BlockchainClient, startBlock *big.Int, endBlock *big.Int) ([]proto.Message, []proto.Message, []indexer.BlockIndex, []indexer.TransactionIndex, map[uint64]indexer.BlockCache, error) { blocks, transactions, blocksIndex, transactionsIndex, blocksCache, err := client.FetchAsProtoBlocks(startBlock, endBlock) diff --git a/cmd.go b/cmd.go index 3111c67..9e42118 100644 --- a/cmd.go +++ b/cmd.go @@ -268,7 +268,7 @@ func CreateCrawlerCommand() *cobra.Command { func CreateSynchronizerCommand() *cobra.Command { var startBlock, endBlock uint64 // var startBlockBig, endBlockBig big.Int - var baseDir, output, abi_source string + var chain, baseDir, output, abi_source string synchronizerCmd := &cobra.Command{ Use: "synchronizer", @@ -303,12 +303,13 @@ func CreateSynchronizerCommand() *cobra.Command { // read the blockchain url from $INFURA_URL // if it is not set, use the default url - synchronizer := synchronizer.NewSynchronizer("polygon", startBlock, endBlock) + synchronizer := synchronizer.NewSynchronizer(chain, startBlock, endBlock) synchronizer.SyncCustomers() }, } + synchronizerCmd.Flags().StringVar(&chain, "chain", "ethereum", "The blockchain to crawl (default: ethereum)") synchronizerCmd.Flags().Uint64Var(&startBlock, "start-block", 0, "The block number to start decoding from (default: latest block)") synchronizerCmd.Flags().Uint64Var(&endBlock, "end-block", 0, "The block number to end decoding at (default: latest block)") synchronizerCmd.Flags().StringVar(&baseDir, "base-dir", "data", "The base directory to store the crawled data (default: data)") diff --git a/crawler/crawler.go b/crawler/crawler.go index 656af6b..b87f9f6 100644 --- a/crawler/crawler.go +++ b/crawler/crawler.go @@ -92,6 +92,8 @@ func (c *Crawler) Start() { panic(err) } + fmt.Println(chainType, BlockchainURLs[chainType]) + client, err := blockchain.NewClient(chainType, BlockchainURLs[chainType]) if err != nil { log.Fatal(err) diff --git a/crawler/settings.go b/crawler/settings.go index e09663b..3a2b161 100644 --- a/crawler/settings.go +++ b/crawler/settings.go @@ -62,13 +62,13 @@ func CheckVariablesForCrawler() error { BlockchainURLs = map[string]string{ "ethereum": MOONSTREAM_NODE_ETHEREUM_A_EXTERNAL_URI, "polygon": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, - "arbitrum_one": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, - "arbitrum_sepolia": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, - "game7_orbit_arbitrum_sepolia": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, - "xai": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, - "xai_sepolia": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, - "mantle": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, - "mantle_sepolia": MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI, + "arbitrum_one": MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI, + "arbitrum_sepolia": MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI, + "game7_orbit_arbitrum_sepolia": MOONSTREAM_NODE_GAME7_ORBIT_ARBITRUM_SEPOLIA_A_EXTERNAL_URI, + "xai": MOONSTREAM_NODE_XAI_A_EXTERNAL_URI, + "xai_sepolia": MOONSTREAM_NODE_XAI_SEPOLIA_A_EXTERNAL_URI, + "mantle": MOONSTREAM_NODE_MANTLE_A_EXTERNAL_URI, + "mantle_sepolia": MOONSTREAM_NODE_MANTLE_SEPOLIA_A_EXTERNAL_URI, } return nil From e9a9774286b030f22ba75ba8b97e28b2c1087de4 Mon Sep 17 00:00:00 2001 From: kompotkot Date: Tue, 4 Jun 2024 11:03:12 +0000 Subject: [PATCH 12/13] Removed debug fmt --- crawler/crawler.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/crawler/crawler.go b/crawler/crawler.go index b87f9f6..656af6b 100644 --- a/crawler/crawler.go +++ b/crawler/crawler.go @@ -92,8 +92,6 @@ func (c *Crawler) Start() { panic(err) } - fmt.Println(chainType, BlockchainURLs[chainType]) - client, err := blockchain.NewClient(chainType, BlockchainURLs[chainType]) if err != nil { log.Fatal(err) From 06c0d91bc16faf5fd8ca13045bad4d8573c0bada Mon Sep 17 00:00:00 2001 From: kompotkot Date: Tue, 4 Jun 2024 11:19:59 +0000 Subject: [PATCH 13/13] Deployment of additional blockchains --- deploy/deploy.bash | 86 ++++++++++++++++++- deploy/seer-crawler-arbitrum-one.service | 16 ++++ deploy/seer-crawler-arbitrum-sepolia.service | 16 ++++ ...awler-game7-orbit-arbitrum-sepolia.service | 16 ++++ deploy/seer-crawler-mantle-sepolia.service | 16 ++++ deploy/seer-crawler-mantle.service | 16 ++++ deploy/seer-crawler-xai-sepolia.service | 16 ++++ deploy/seer-crawler-xai.service | 16 ++++ 8 files changed, 197 insertions(+), 1 deletion(-) create mode 100644 deploy/seer-crawler-arbitrum-one.service create mode 100644 deploy/seer-crawler-arbitrum-sepolia.service create mode 100644 deploy/seer-crawler-game7-orbit-arbitrum-sepolia.service create mode 100644 deploy/seer-crawler-mantle-sepolia.service create mode 100644 deploy/seer-crawler-mantle.service create mode 100644 deploy/seer-crawler-xai-sepolia.service create mode 100644 deploy/seer-crawler-xai.service diff --git a/deploy/deploy.bash b/deploy/deploy.bash index 2ecd6f7..a8086dd 100755 --- a/deploy/deploy.bash +++ b/deploy/deploy.bash @@ -22,8 +22,15 @@ SCRIPT_DIR="$(realpath $(dirname $0))" USER_SYSTEMD_DIR="${USER_SYSTEMD_DIR:-/home/ubuntu/.config/systemd/user}" # Service files +SEER_CRAWLER_ARBITRUM_ONE_SERVICE_FILE="seer-crawler-arbitrum-one.service" +SEER_CRAWLER_ARBITRUM_SEPOLIA_SERVICE_FILE="seer-crawler-arbitrum-sepolia.service" SEER_CRAWLER_ETHEREUM_SERVICE_FILE="seer-crawler-ethereum.service" +SEER_CRAWLER_GAME7_ORBIT_ARBITRUM_SEPOLIA_SERVICE_FILE="seer-crawler-game7-orbit-arbitrum-sepolia.service" +SEER_CRAWLER_MANTLE_SEPOLIA_SERVICE_FILE="seer-crawler-mantle-sepolia.service" +SEER_CRAWLER_MANTLE_SERVICE_FILE="seer-crawler-mantle.service" SEER_CRAWLER_POLYGON_SERVICE_FILE="seer-crawler-polygon.service" +SEER_CRAWLER_XAI_SEPOLIA_SERVICE_FILE="seer-crawler-xai-sepolia.service" +SEER_CRAWLER_XAI_SERVICE_FILE="seer-crawler-xai.service" set -eu @@ -46,6 +53,27 @@ echo "MOONSTREAM_NODE_ETHEREUM_A_EXTERNAL_URI=${MOONSTREAM_NODE_ETHEREUM_A_EXTER MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI=$(gcloud secrets versions access latest --secret=MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI) echo "MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI=${MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI}" >> "${PARAMETERS_ENV_PATH}" +MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI=$(gcloud secrets versions access latest --secret=MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI) +echo "MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI=${MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI}" >> "${PARAMETERS_ENV_PATH}" + +MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI=$(gcloud secrets versions access latest --secret=MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI) +echo "MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI=${MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI}" >> "${PARAMETERS_ENV_PATH}" + +MOONSTREAM_NODE_GAME7_ORBIT_ARBITRUM_SEPOLIA_A_EXTERNAL_URI=$(gcloud secrets versions access latest --secret=MOONSTREAM_NODE_GAME7_ORBIT_ARBITRUM_SEPOLIA_A_EXTERNAL_URI) +echo "MOONSTREAM_NODE_GAME7_ORBIT_ARBITRUM_SEPOLIA_A_EXTERNAL_URI=${MOONSTREAM_NODE_GAME7_ORBIT_ARBITRUM_SEPOLIA_A_EXTERNAL_URI}" >> "${PARAMETERS_ENV_PATH}" + +MOONSTREAM_NODE_XAI_A_EXTERNAL_URI=$(gcloud secrets versions access latest --secret=MOONSTREAM_NODE_XAI_A_EXTERNAL_URI) +echo "MOONSTREAM_NODE_XAI_A_EXTERNAL_URI=${MOONSTREAM_NODE_XAI_A_EXTERNAL_URI}" >> "${PARAMETERS_ENV_PATH}" + +MOONSTREAM_NODE_XAI_SEPOLIA_A_EXTERNAL_URI=$(gcloud secrets versions access latest --secret=MOONSTREAM_NODE_XAI_SEPOLIA_A_EXTERNAL_URI) +echo "MOONSTREAM_NODE_XAI_SEPOLIA_A_EXTERNAL_URI=${MOONSTREAM_NODE_XAI_SEPOLIA_A_EXTERNAL_URI}" >> "${PARAMETERS_ENV_PATH}" + +MOONSTREAM_NODE_MANTLE_A_EXTERNAL_URI=$(gcloud secrets versions access latest --secret=MOONSTREAM_NODE_MANTLE_A_EXTERNAL_URI) +echo "MOONSTREAM_NODE_MANTLE_A_EXTERNAL_URI=${MOONSTREAM_NODE_MANTLE_A_EXTERNAL_URI}" >> "${PARAMETERS_ENV_PATH}" + +MOONSTREAM_NODE_MANTLE_SEPOLIA_A_EXTERNAL_URI=$(gcloud secrets versions access latest --secret=MOONSTREAM_NODE_MANTLE_SEPOLIA_A_EXTERNAL_URI) +echo "MOONSTREAM_NODE_MANTLE_SEPOLIA_A_EXTERNAL_URI=${MOONSTREAM_NODE_MANTLE_SEPOLIA_A_EXTERNAL_URI}" >> "${PARAMETERS_ENV_PATH}" + echo "SEER_CRAWLER_INDEXER_LABEL=seer" >> "${PARAMETERS_ENV_PATH}" echo "SEER_CRAWLER_STORAGE_TYPE=gcp-storage" >> "${PARAMETERS_ENV_PATH}" @@ -77,12 +105,52 @@ fi echo echo -echo -e "${PREFIX_INFO} Replacing existing seer crawler for ethereum blockchain service definition with ${SEER_CRAWLER_ETHEREUM_SERVICE_FILE}" +echo -e "${PREFIX_INFO} Replacing existing seer crawler for Arbitrum One blockchain service definition with ${SEER_CRAWLER_ARBITRUM_ONE_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_CRAWLER_ARBITRUM_ONE_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_CRAWLER_ARBITRUM_ONE_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_CRAWLER_ARBITRUM_ONE_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_CRAWLER_ARBITRUM_ONE_SERVICE_FILE}" + +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer crawler for Arbitrum Sepolia blockchain service definition with ${SEER_CRAWLER_ARBITRUM_SEPOLIA_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_CRAWLER_ARBITRUM_SEPOLIA_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_CRAWLER_ARBITRUM_SEPOLIA_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_CRAWLER_ARBITRUM_SEPOLIA_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_CRAWLER_ARBITRUM_SEPOLIA_SERVICE_FILE}" + +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer crawler for Ethereum blockchain service definition with ${SEER_CRAWLER_ETHEREUM_SERVICE_FILE}" chmod 644 "${SCRIPT_DIR}/${SEER_CRAWLER_ETHEREUM_SERVICE_FILE}" cp "${SCRIPT_DIR}/${SEER_CRAWLER_ETHEREUM_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_CRAWLER_ETHEREUM_SERVICE_FILE}" XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_CRAWLER_ETHEREUM_SERVICE_FILE}" +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer crawler for Game7 Orbit Arbitrum Sepolia blockchain service definition with ${SEER_CRAWLER_GAME7_ORBIT_ARBITRUM_SEPOLIA_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_CRAWLER_GAME7_ORBIT_ARBITRUM_SEPOLIA_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_CRAWLER_GAME7_ORBIT_ARBITRUM_SEPOLIA_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_CRAWLER_GAME7_ORBIT_ARBITRUM_SEPOLIA_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_CRAWLER_GAME7_ORBIT_ARBITRUM_SEPOLIA_SERVICE_FILE}" + +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer crawler for Mantle Sepolia blockchain service definition with ${SEER_CRAWLER_MANTLE_SEPOLIA_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_CRAWLER_MANTLE_SEPOLIA_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_CRAWLER_MANTLE_SEPOLIA_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_CRAWLER_MANTLE_SEPOLIA_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_CRAWLER_MANTLE_SEPOLIA_SERVICE_FILE}" + +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer crawler for Mantle blockchain service definition with ${SEER_CRAWLER_MANTLE_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_CRAWLER_MANTLE_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_CRAWLER_MANTLE_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_CRAWLER_MANTLE_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_CRAWLER_MANTLE_SERVICE_FILE}" + echo echo echo -e "${PREFIX_INFO} Replacing existing seer crawler for polygon blockchain service definition with ${SEER_CRAWLER_POLYGON_SERVICE_FILE}" @@ -90,3 +158,19 @@ chmod 644 "${SCRIPT_DIR}/${SEER_CRAWLER_POLYGON_SERVICE_FILE}" cp "${SCRIPT_DIR}/${SEER_CRAWLER_POLYGON_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_CRAWLER_POLYGON_SERVICE_FILE}" XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_CRAWLER_POLYGON_SERVICE_FILE}" + +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer crawler for Xai Sepolia blockchain service definition with ${SEER_CRAWLER_XAI_SEPOLIA_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_CRAWLER_XAI_SEPOLIA_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_CRAWLER_XAI_SEPOLIA_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_CRAWLER_XAI_SEPOLIA_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_CRAWLER_XAI_SEPOLIA_SERVICE_FILE}" + +echo +echo +echo -e "${PREFIX_INFO} Replacing existing seer crawler for Xai blockchain service definition with ${SEER_CRAWLER_XAI_SERVICE_FILE}" +chmod 644 "${SCRIPT_DIR}/${SEER_CRAWLER_XAI_SERVICE_FILE}" +cp "${SCRIPT_DIR}/${SEER_CRAWLER_XAI_SERVICE_FILE}" "${USER_SYSTEMD_DIR}/${SEER_CRAWLER_XAI_SERVICE_FILE}" +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload +XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart "${SEER_CRAWLER_XAI_SERVICE_FILE}" diff --git a/deploy/seer-crawler-arbitrum-one.service b/deploy/seer-crawler-arbitrum-one.service new file mode 100644 index 0000000..89d5b28 --- /dev/null +++ b/deploy/seer-crawler-arbitrum-one.service @@ -0,0 +1,16 @@ +[Unit] +Description=Seer crawler service for Arbitrum one blockchain +After=network.target +StartLimitIntervalSec=300 +StartLimitBurst=3 + +[Service] +WorkingDirectory=/home/ubuntu/seer +EnvironmentFile=/home/ubuntu/seer-secrets/app.env +Restart=on-failure +RestartSec=15s +ExecStart=/home/ubuntu/seer/seer crawler --chain arbitrum_one +SyslogIdentifier=seer-crawler-arbitrum-one + +[Install] +WantedBy=multi-user.target diff --git a/deploy/seer-crawler-arbitrum-sepolia.service b/deploy/seer-crawler-arbitrum-sepolia.service new file mode 100644 index 0000000..12ad32d --- /dev/null +++ b/deploy/seer-crawler-arbitrum-sepolia.service @@ -0,0 +1,16 @@ +[Unit] +Description=Seer crawler service for Arbitrum Sepolia blockchain +After=network.target +StartLimitIntervalSec=300 +StartLimitBurst=3 + +[Service] +WorkingDirectory=/home/ubuntu/seer +EnvironmentFile=/home/ubuntu/seer-secrets/app.env +Restart=on-failure +RestartSec=15s +ExecStart=/home/ubuntu/seer/seer crawler --chain arbitrum_sepolia +SyslogIdentifier=seer-crawler-arbitrum-sepolia + +[Install] +WantedBy=multi-user.target diff --git a/deploy/seer-crawler-game7-orbit-arbitrum-sepolia.service b/deploy/seer-crawler-game7-orbit-arbitrum-sepolia.service new file mode 100644 index 0000000..89d45da --- /dev/null +++ b/deploy/seer-crawler-game7-orbit-arbitrum-sepolia.service @@ -0,0 +1,16 @@ +[Unit] +Description=Seer crawler service for Game7 Orbit Arbitrum Sepolia blockchain +After=network.target +StartLimitIntervalSec=300 +StartLimitBurst=3 + +[Service] +WorkingDirectory=/home/ubuntu/seer +EnvironmentFile=/home/ubuntu/seer-secrets/app.env +Restart=on-failure +RestartSec=15s +ExecStart=/home/ubuntu/seer/seer crawler --chain game7_orbit_arbitrum_sepolia +SyslogIdentifier=seer-crawler-game7-orbit-arbitrum-sepolia + +[Install] +WantedBy=multi-user.target diff --git a/deploy/seer-crawler-mantle-sepolia.service b/deploy/seer-crawler-mantle-sepolia.service new file mode 100644 index 0000000..7068469 --- /dev/null +++ b/deploy/seer-crawler-mantle-sepolia.service @@ -0,0 +1,16 @@ +[Unit] +Description=Seer crawler service for Mantle Sepolia blockchain +After=network.target +StartLimitIntervalSec=300 +StartLimitBurst=3 + +[Service] +WorkingDirectory=/home/ubuntu/seer +EnvironmentFile=/home/ubuntu/seer-secrets/app.env +Restart=on-failure +RestartSec=15s +ExecStart=/home/ubuntu/seer/seer crawler --chain mantle_sepolia +SyslogIdentifier=seer-crawler-mantle-sepolia + +[Install] +WantedBy=multi-user.target diff --git a/deploy/seer-crawler-mantle.service b/deploy/seer-crawler-mantle.service new file mode 100644 index 0000000..a49dc47 --- /dev/null +++ b/deploy/seer-crawler-mantle.service @@ -0,0 +1,16 @@ +[Unit] +Description=Seer crawler service for Mantle blockchain +After=network.target +StartLimitIntervalSec=300 +StartLimitBurst=3 + +[Service] +WorkingDirectory=/home/ubuntu/seer +EnvironmentFile=/home/ubuntu/seer-secrets/app.env +Restart=on-failure +RestartSec=15s +ExecStart=/home/ubuntu/seer/seer crawler --chain mantle +SyslogIdentifier=seer-crawler-mantle + +[Install] +WantedBy=multi-user.target diff --git a/deploy/seer-crawler-xai-sepolia.service b/deploy/seer-crawler-xai-sepolia.service new file mode 100644 index 0000000..429767f --- /dev/null +++ b/deploy/seer-crawler-xai-sepolia.service @@ -0,0 +1,16 @@ +[Unit] +Description=Seer crawler service for Xai Sepolia blockchain +After=network.target +StartLimitIntervalSec=300 +StartLimitBurst=3 + +[Service] +WorkingDirectory=/home/ubuntu/seer +EnvironmentFile=/home/ubuntu/seer-secrets/app.env +Restart=on-failure +RestartSec=15s +ExecStart=/home/ubuntu/seer/seer crawler --chain xai_sepolia +SyslogIdentifier=seer-crawler-xai-sepolia + +[Install] +WantedBy=multi-user.target diff --git a/deploy/seer-crawler-xai.service b/deploy/seer-crawler-xai.service new file mode 100644 index 0000000..170cc14 --- /dev/null +++ b/deploy/seer-crawler-xai.service @@ -0,0 +1,16 @@ +[Unit] +Description=Seer crawler service for Xai blockchain +After=network.target +StartLimitIntervalSec=300 +StartLimitBurst=3 + +[Service] +WorkingDirectory=/home/ubuntu/seer +EnvironmentFile=/home/ubuntu/seer-secrets/app.env +Restart=on-failure +RestartSec=15s +ExecStart=/home/ubuntu/seer/seer crawler --chain xai +SyslogIdentifier=seer-crawler-xai + +[Install] +WantedBy=multi-user.target