diff --git a/proto/buf.lock b/proto/buf.lock new file mode 100644 index 0000000..6a67b8d --- /dev/null +++ b/proto/buf.lock @@ -0,0 +1,8 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: googleapis + repository: googleapis + commit: f0e53af8f2fc4556b94f482688b57223 + digest: shake256:de26a277fc28b8b411ecf58729d78d32fcf15090ffd998a4469225b17889bfb51442eaab04bb7a8d88d203ecdf0a9febd4ffd52c18ed1c2229160c7bd353ca95 diff --git a/proto/sf/starknet/type/v1/block.proto b/proto/sf/starknet/type/v1/block.proto index 6b0ed45..8e49269 100644 --- a/proto/sf/starknet/type/v1/block.proto +++ b/proto/sf/starknet/type/v1/block.proto @@ -6,16 +6,16 @@ import "google/protobuf/timestamp.proto"; option go_package = "github.com/streamingfast/firehose-starknet/pb/sf/starknet/type/v1;pbstarknet"; message Block { - string block_hash = 1; + bytes block_hash = 1; //The hash of this block's parent - string parent_hash = 2; + bytes parent_hash = 2; uint64 block_number = 3; //The new global state root - string new_root = 4; + bytes new_root = 4; //The time in which the block was created uint64 timestamp = 5; //The StarkNet identity of the sequencer submitting this block - string sequencer_address = 6; + bytes sequencer_address = 6; //The price of l1 gas in the block ResourcePrice l1_gas_price = 7; @@ -34,14 +34,35 @@ message Block { //specifies whether the data of this block is published via blob data or calldata enum L1_DA_MODE { - UNKNOWN = 0; + L1_DA_MODE_UNKNOWN = 0; CALLDATA = 1; BLOB = 2; } +enum FEE_DATA_AVAILABILITY_MODE {git p + FEE_DATA_AVAILABILITY_MODE_UNKNOWN = 0; + L1 = 1; + L2 = 2; +} + +enum TRANSACTION_TYPE { + TRANSACTION_TYPE_UNKNOWN = 0; + INVOKE = 1; + DECLARE = 2; + DEPLOY = 3; + DEPLOY_ACCOUNT = 4; + L1_HANDLER = 5; +} + +enum EXECUTION_STATUS { + EXECUTION_STATUS_UNKNOWN = 0; + EXECUTION_STATUS_SUCCESS = 1; + EXECUTION_STATUS_REVERTED = 2; +} + message ResourcePrice { - string price_in_fri = 1; - string price_in_wei = 2; + bytes price_in_fri = 1; + bytes price_in_wei = 2; } message TransactionWithReceipt { @@ -67,14 +88,14 @@ message TransactionWithReceipt { message TransactionReceipt{ //The hash identifying the transaction - string transaction_hash = 1; + bytes transaction_hash = 1; //The fee that was charged by the sequencer ActualFee actual_fee = 2; //Execution status - string execution_status = 3; + EXECUTION_STATUS execution_status = 3; string revert_reason = 4; - string type = 5; + TRANSACTION_TYPE type = 5; //Messages sent string message_hash = 6; //The address of the deployed contract @@ -84,24 +105,24 @@ message TransactionReceipt{ //The resources consumed by the transaction ExecutionResources execution_resources = 9; //The message hash as it appears on the L1 core contract - string contract_address = 10; + bytes contract_address = 10; } message MessagesSent { //The address of the L2 contract sending the message - string from_address = 1; + bytes from_address = 1; //The target L1 address the message is sent to - string to_address = 2; - //The payload of the message - repeated string payload = 3; + bytes to_address = 2; + //The payload of the messageResourceBounds + repeated bytes payload = 3; } message Event { //From address - string from_address = 1; - repeated string keys = 2; - repeated string data = 3; + bytes from_address = 1; + repeated bytes keys = 2; + repeated bytes data = 3; } message ExecutionResources { @@ -132,51 +153,51 @@ message ExecutionResources { //invokes a specific function in the desired contract (not necessarily an account) message InvokeTransactionV0 { //The maximal fee that can be charged for including the transaction - string max_fee = 2; + bytes max_fee = 2; //Version of the transaction scheme string version = 3; - repeated string signature = 4; - string contract_address = 5; - string entry_point_selector = 6; + repeated bytes signature = 4; + bytes contract_address = 5; + bytes entry_point_selector = 6; //The parameters passed to the function - repeated string calldata = 7; + repeated bytes calldata = 7; } //initiates a transaction from a given account message InvokeTransactionV1 { //The maximal fee that can be charged for including the transaction - string max_fee = 1; + bytes max_fee = 1; //Version of the transaction scheme string version = 2; - repeated string signature = 3; - string nonce = 4; + repeated bytes signature = 3; + bytes nonce = 4; //sender address - string sender_address = 5; + bytes sender_address = 5; //The data expected by the account's `execute` function (in most usecases, this includes the called contract address and a function selector) - repeated string calldata = 6; + repeated bytes calldata = 6; } //initiates a transaction from a given account message InvokeTransactionV3 { - string sender_address = 2; + bytes sender_address = 2; //The data expected by the account's `execute` function (in most usecases, this includes the called contract address and a function selector) - repeated string calldata = 3; + repeated bytes calldata = 3; //Version of the transaction scheme string version = 4; - repeated string signature = 5; - string nonce = 6; + repeated bytes signature = 5; + bytes nonce = 6; //resource bounds for the transaction execution ResourceBounds resource_bounds = 7; //the tip for the transaction - string tip = 8; + bytes tip = 8; //data needed to allow the paymaster to pay for the transaction in native tokens - repeated string paymaster_data = 9; + repeated bytes paymaster_data = 9; //data needed to deploy the account contract from which this tx will be initiated - repeated string account_deployment_data = 10; + repeated bytes account_deployment_data = 10; //The storage domain of the account's nonce (an account has a nonce per DA mode) - string nonce_data_availability_mode = 11; + FEE_DATA_AVAILABILITY_MODE nonce_data_availability_mode = 11; //The storage domain of the account's balance from which fee will be charged - string fee_data_availability_mode = 12; + FEE_DATA_AVAILABILITY_MODE fee_data_availability_mode = 12; } //a call to an l1_handler on an L2 contract induced by a message from L1 @@ -186,127 +207,127 @@ message L1HandlerTransaction { //Version of the transaction scheme string nonce = 3; //The address of the contract whose class hash will be returned - string contract_address = 4; + bytes contract_address = 4; //Entry point selector - string entry_point_selector = 5; + bytes entry_point_selector = 5; //The parameters passed to the function - repeated string calldata = 6; + repeated bytes calldata = 6; } //Declare Contract Transaction V0 message DeclareTransactionV0 { - string sender_address = 2; + bytes sender_address = 2; //The maximal fee that can be charged for including the transaction - string max_fee = 3; + bytes max_fee = 3; //Version of the transaction scheme string version = 4; - repeated string signature = 5; + repeated bytes signature = 5; //The hash of the requested contract class - string class_hash = 6; + bytes class_hash = 6; } //Declare Contract Transaction V1 message DeclareTransactionV1 { - string sender_address = 2; + bytes sender_address = 2; //The maximal fee that can be charged for including the transaction - string max_fee = 3; + bytes max_fee = 3; //Version of the transaction scheme string version = 4; - repeated string signature = 5; - string nonce = 6; + repeated bytes signature = 5; + bytes nonce = 6; //The hash of the requested contract class - string class_hash = 7; + bytes class_hash = 7; } //Declare Contract Transaction V2 message DeclareTransactionV2 { - string sender_address = 1; + bytes sender_address = 1; //The maximal fee that can be charged for including the transaction - string compiled_class_hash = 2; - string max_fee = 3; + bytes compiled_class_hash = 2; + bytes max_fee = 3; //Version of the transaction scheme string version = 4; - repeated string signature = 5; - string nonce = 6; + repeated bytes signature = 5; + bytes nonce = 6; //The hash of the requested contract class - string class_hash = 7; + bytes class_hash = 7; } //Declare Contract Transaction V3 message DeclareTransactionV3 { - string sender_address = 2; + bytes sender_address = 2; //The hash of the Cairo assembly resulting from the Sierra compilation - string compiled_class_hash = 3; + bytes compiled_class_hash = 3; //Version of the transaction scheme string version = 4; - repeated string signature = 5; - string nonce = 6; + repeated bytes signature = 5; + bytes nonce = 6; //The hash of the requested contract class - string class_hash = 7; + bytes class_hash = 7; //resource bounds for the transaction execution ResourceBounds resource_bounds = 8; //the tip for the transaction - string tip = 9; + bytes tip = 9; //data needed to allow the paymaster to pay for the transaction in native tokens - repeated string paymaster_data = 10; + repeated bytes paymaster_data = 10; //data needed to deploy the account contract from which this tx will be initiated - repeated string account_deployment_data = 11; + repeated bytes account_deployment_data = 11; //The storage domain of the account's nonce (an account has a nonce per DA mode) - string nonce_data_availability_mode = 12; + FEE_DATA_AVAILABILITY_MODE nonce_data_availability_mode = 12; //The storage domain of the account's balance from which fee will be charged - string fee_data_availability_mode = 13; + FEE_DATA_AVAILABILITY_MODE fee_data_availability_mode = 13; } //deploys a new account contract message DeployTransactionV0 { //The hash of the deployed contract's class - string class_hash = 1; + bytes class_hash = 1; //Version of the transaction scheme string version = 2; //The salt for the address of the deployed contract - string contract_address_salt = 3; + bytes contract_address_salt = 3; //The parameters passed to the constructor - repeated string constructor_calldata = 4; + repeated bytes constructor_calldata = 4; } //Deploys an account contract, charges fee from the pre-funded account addresses message DeployAccountTransactionV1 { //The maximal fee that can be charged for including the transaction - string max_fee = 1; + bytes max_fee = 1; //Version of the transaction scheme string version = 2; - repeated string signature = 3; - string nonce = 4; + repeated bytes signature = 3; + bytes nonce = 4; //The hash of the deployed contract's class - string class_hash = 5; + bytes class_hash = 5; //The salt for the address of the deployed contract - string contract_address_salt = 6; + bytes contract_address_salt = 6; //The parameters passed to the constructor - repeated string constructor_calldata = 7; + repeated bytes constructor_calldata = 7; } //Deploys an account contract, charges fee from the pre-funded account addresses message DeployAccountTransactionV3 { //Version of the transaction scheme string version = 1; - repeated string signature = 2; - string nonce = 3; + repeated bytes signature = 2; + bytes nonce = 3; //The salt for the address of the deployed contract - string contract_address_salt = 4; + bytes contract_address_salt = 4; //The parameters passed to the constructor - repeated string constructor_calldata = 5; + repeated bytes constructor_calldata = 5; //The hash of the deployed contract's class - string class_hash = 6; + bytes class_hash = 6; //resource bounds for the transaction execution ResourceBounds resource_bounds = 7; //the tip for the transaction - string tip = 8; + bytes tip = 8; //data needed to allow the paymaster to pay for the transaction in native tokens - repeated string paymaster_data = 9; + repeated bytes paymaster_data = 9; //The storage domain of the account's nonce (an account has a nonce per DA mode) - string nonce_data_availability_mode = 11; + FEE_DATA_AVAILABILITY_MODE nonce_data_availability_mode = 11; //The storage domain of the account's balance from which fee will be charged - string fee_data_availability_mode = 12; + FEE_DATA_AVAILABILITY_MODE fee_data_availability_mode = 12; } message ResourceBounds { @@ -330,7 +351,7 @@ message Receipt { message ActualFee { //amount paid - string amount = 1; + bytes amount = 1; //units in which the fee is given string unit = 2; } @@ -345,9 +366,9 @@ message DataAvailability { //State update message StateUpdate { //The new global state root - string new_root = 2; + bytes new_root = 2; //The previous global state root - string old_root = 1; + bytes old_root = 1; //The change in state applied in this block, given as a mapping of addresses to the new values and/or new contracts StateDiff state_diff = 3; } @@ -357,7 +378,7 @@ message StateDiff { //The changes in the storage per contract address repeated ContractStorageDiff storage_diffs = 1; //The hash of the declared class - repeated string deprecated_declared_classes = 2; + repeated bytes deprecated_declared_classes = 2; //The declared class hash and compiled class hash repeated DeclaredClass declared_classes = 3; //A new contract deployed as part of the state update @@ -370,42 +391,42 @@ message StateDiff { message NonceDiff { //"The address of the contract - string contract_address = 1; + bytes contract_address = 1; //The nonce for the given address at the end of the block - string nonce = 2; + bytes nonce = 2; } message ReplacedClass { //The address of the contract whose class was replaced - string contract_address = 1; + bytes contract_address = 1; //The new class hash - string class_hash = 2; + bytes class_hash = 2; } message DeployedContract { //The address of the contract - string address = 1; + bytes address = 1; //The hash of the contract code - string class_hash = 2; + bytes class_hash = 2; } message DeclaredClass { //The hash of the declared class - string class_hash = 1; + bytes class_hash = 1; //The Cairo assembly hash corresponding to the declared class - string compiled_class_hash = 2; + bytes compiled_class_hash = 2; } message ContractStorageDiff { //The address of the contract - string address = 1; + bytes address = 1; //The changes in the storage of the contract repeated StorageEntries storage_entries = 2; } message StorageEntries { //The key of the changed value - string key = 1; + bytes key = 1; //The new value applied to the given address - string value = 2; + bytes value = 2; } \ No newline at end of file