From b82e6ac58d0f060a38a24e351d735b76f85c1a39 Mon Sep 17 00:00:00 2001 From: YaroShkvorets Date: Thu, 13 Jun 2024 09:39:14 -0400 Subject: [PATCH 01/23] fix antelope example version --- antelope-common/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/antelope-common/README.md b/antelope-common/README.md index b516b11..58fba74 100644 --- a/antelope-common/README.md +++ b/antelope-common/README.md @@ -25,7 +25,7 @@ Common use cases: Let's say you want to receive all AtomicAssets NFT create collection events starting from block 370,000,000. Send a substreams request with the desired query as parameter. You can use a gRPC client, substreams sink, or substreams CLI: ```bash -> substreams gui -e eos.substreams.pinax.network:443 https://spkg.io/pinax-network/antelope-common-v0.2.0.spkg filtered_actions -s 370000000 -p filtered_actions="code:atomicassets && action:createcol" --production-mode +> substreams gui -e eos.substreams.pinax.network:443 https://spkg.io/pinax-network/antelope-common-v0.3.0.spkg filtered_actions -s 370000000 -p filtered_actions="code:atomicassets && action:createcol" --production-mode ``` If the request with this query hasn't been run before, substreams backend will start the indexing process and you should start seeing new events. If the request has been run before, you should start seeing sale actions right away jumping over any empty chunks of blocks when there were no sales. Note, we used `--production-mode` flag - this ensures backend writes indexes on disk so they can be re-used in the future. @@ -59,7 +59,7 @@ v0.3.0: https://substreams.dev/pinax-network/antelope-common/v0.3.0 ### Usage ```bash -substreams gui -e eos.substreams.pinax.network:443 https://spkg.io/pinax-network/antelope-common-v0.2.0.spkg filtered_actions -s -10000 -p filtered_actions="code:tethertether && data.to:swap.defi" --production-mode +substreams gui -e eos.substreams.pinax.network:443 https://spkg.io/pinax-network/antelope-common-v0.3.0.spkg filtered_actions -s -10000 -p filtered_actions="code:tethertether && data.to:swap.defi" --production-mode ``` ### Known issues From 85c54590cf0a984bc0def07ef0ce88b3bd254812 Mon Sep 17 00:00:00 2001 From: Eduard Voiculescu Date: Thu, 13 Jun 2024 11:48:14 -0400 Subject: [PATCH 02/23] - update readme with new filtered_trx_by_events module - adding filtered_trx_by_events substreams module --- injective-common/README.md | 22 +++- injective-common/src/lib.rs | 175 ++++++++++++++++++------------- injective-common/substreams.yaml | 22 +++- 3 files changed, 141 insertions(+), 78 deletions(-) diff --git a/injective-common/README.md b/injective-common/README.md index b3dbc79..a0c0947 100644 --- a/injective-common/README.md +++ b/injective-common/README.md @@ -2,8 +2,6 @@ The Injective Foundational modules are Substreams modules extracting common data from the Injective blockchain. - - ## Modules ### all_events @@ -14,7 +12,11 @@ The `all_events` module extracts only the events and provides them, along with t The `filtered_events` module allows a reduction of the `all_events` output, only matching the events that match the requested type. -Use with the parameter, ex: `substreams run [...] -p filtered_events="message || injective.peggy.v1.EventDepositClaim" +Use with the parameter, ex: + +```bash +substreams run [...] -p filtered_events="message || injective.peggy.v1.EventDepositClaim" +``` ### all_transactions (work in progress) @@ -23,11 +25,21 @@ The `all_transactions` module extracts all the transactions from the Injective b Some message types are parsed from their "Any" type into the the corresponding type of an enum. See ./proto/cosmos/v1/transactions.proto to see the ones that are supported. The other types will still be shown as protobuf "Any" type. +### filtered_trx_by_events + +The `filtered_trx_by_events` modules allows a reduction of the `all_transactions` output, only matching the events that match the requested type. The module will return the entire transactions. Some event types will appear that do not match from the filtered params as the entire transaction is returned. + +Use with the parameter, ex: + +```bash +substreams run [...] -p filtered_trx_by_events="message || injective.peggy.v1.EventDepositClaim" +``` + ## Getting Started -### Gather protobuf definitions in generated-buf-build.binpb +### Gather protobuf definitions in generated-buf-build.binpb -The required protobuf modules are referenced in `buf.yaml`. +The required protobuf modules are referenced in `buf.yaml`. You need a (free) API token to access https://buf.build and resolve the dependencies into a single file, generated-buf-build.binpb. That file is then used to generate the rust protobuf bindings or to bundle the definitions in the .spkg. (it is referenced in the substreams.yaml) diff --git a/injective-common/src/lib.rs b/injective-common/src/lib.rs index db34662..071fe09 100644 --- a/injective-common/src/lib.rs +++ b/injective-common/src/lib.rs @@ -1,6 +1,7 @@ mod pb; use core::panic; +use std::collections::HashMap; use crate::pb::cosmos::authz::v1beta1::MsgExec; use crate::pb::cosmos::bank::v1beta1::MsgMultiSend; @@ -102,6 +103,109 @@ pub fn all_transactions(block: Block) -> Result { }) } +#[substreams::handlers::map] +pub fn all_events(block: Block) -> Result { + // Mutable list to add the output of the Substreams + let mut events: Vec = Vec::new(); + + if block.txs.len() != block.tx_results.len() { + return Err(anyhow!("Transaction list and result list do not match")); + } + + for (i, tx_result) in block.tx_results.into_iter().enumerate() { + let tx_hash = compute_tx_hash(block.txs.get(i).unwrap()); + + let block_events: Vec = tx_result + .events + .into_iter() + .map(|event| { + return Event { + event: Some(event), + transaction_hash: tx_hash.clone(), + }; + }) + .collect(); + + events.extend(block_events); + } + + Ok(EventList { + events: events, + clock: Some(Clock { + id: hex::encode(block.hash), + number: block.height as u64, + timestamp: block.time, + }), + }) +} + +#[substreams::handlers::map] +fn index_events(events: EventList) -> Result { + let mut keys = Keys::default(); + + events.events.into_iter().for_each(|e| { + if let Some(ev) = e.event { + keys.keys.push(ev.r#type); + } + }); + + Ok(keys) +} + +#[substreams::handlers::map] +fn filtered_events(query: String, events: EventList) -> Result { + let filtered: Vec = events + .events + .into_iter() + .filter(|e| { + if let Some(ev) = &e.event { + let mut keys = Vec::new(); + keys.push(ev.r#type.clone()); + matches_keys_in_parsed_expr(&keys, &query).expect("matching events from query") + } else { + false + } + }) + .collect(); + + Ok(EventList { + events: filtered, + clock: events.clock, + }) +} + +#[substreams::handlers::map] +fn filtered_trx_by_events(query: String, events: EventList, trxs: TransactionList) -> Result { + let mut transactions: HashMap = HashMap::new(); + + events + .events + .into_iter() + .filter(|e| { + if let Some(ev) = &e.event { + let mut keys = Vec::new(); + keys.push(ev.r#type.clone()); + matches_keys_in_parsed_expr(&keys, &query).expect("matching events from query") + } else { + false + } + }) + .for_each(|e: Event| { + transactions.insert(e.transaction_hash, true); + }); + + let transactions: Vec = trxs + .transactions + .into_iter() + .filter(|t| transactions.contains_key(&t.hash)) + .collect(); + + Ok(TransactionList { + transactions: transactions, + clock: trxs.clock, + }) +} + fn extract_messages(messages: Vec) -> Vec { return messages .iter() @@ -261,74 +365,3 @@ fn compute_tx_hash(tx_as_bytes: &[u8]) -> String { let tx_hash = hasher.finalize(); return hex::encode(tx_hash); } - -#[substreams::handlers::map] -pub fn all_events(block: Block) -> Result { - // Mutable list to add the output of the Substreams - let mut events: Vec = Vec::new(); - - if block.txs.len() != block.tx_results.len() { - return Err(anyhow!("Transaction list and result list do not match")); - } - - for (i, tx_result) in block.tx_results.into_iter().enumerate() { - let tx_hash = compute_tx_hash(block.txs.get(i).unwrap()); - - let block_events: Vec = tx_result - .events - .into_iter() - .map(|event| { - return Event { - event: Some(event), - transaction_hash: tx_hash.clone(), - }; - }) - .collect(); - - events.extend(block_events); - } - - Ok(EventList { - events: events, - clock: Some(Clock { - id: hex::encode(block.hash), - number: block.height as u64, - timestamp: block.time, - }), - }) -} - -#[substreams::handlers::map] -fn index_events(events: EventList) -> Result { - let mut keys = Keys::default(); - - events.events.into_iter().for_each(|e| { - if let Some(ev) = e.event { - keys.keys.push(ev.r#type); - } - }); - - Ok(keys) -} - -#[substreams::handlers::map] -fn filtered_events(query: String, events: EventList) -> Result { - let filtered: Vec = events - .events - .into_iter() - .filter(|e| { - if let Some(ev) = &e.event { - let mut keys = Vec::new(); - keys.push(ev.r#type.clone()); - matches_keys_in_parsed_expr(&keys, &query).expect("matching events from query") - } else { - false - } - }) - .collect(); - - Ok(EventList { - events: filtered, - clock: events.clock, - }) -} diff --git a/injective-common/substreams.yaml b/injective-common/substreams.yaml index 673325f..28fe3df 100644 --- a/injective-common/substreams.yaml +++ b/injective-common/substreams.yaml @@ -2,7 +2,7 @@ specVersion: v0.1.0 package: name: injective_common - version: v0.1.0 + version: v0.1.1 network: cosmos @@ -57,5 +57,23 @@ modules: `filtered_events` reads from `all_events` and applies a filter on the event types, only outputing the events that match the filter. The only operator that you should need to use this filter is the logical or `||`, because each event can only match one type. + - name: filtered_trx_by_events + kind: map + blockFilter: + module: index_events + query: + params: true + inputs: + - params: string + - map: all_events + - map: all_transactions + output: + type: proto:sf.substreams.cosmos.v1.TransactionList + doc: | + `filtered_trx_by_events` reads from `all_events` and `all_transactions` and applies a filter on the event types, + only outputing the transactions that match the filter. The only operator that you should need to use this filter + is the logical or `||`, because each event can only match one type. + params: - filtered_events: "message" \ No newline at end of file + filtered_events: "message" + filtered_trx_by_events: "message" \ No newline at end of file From 5c043ff95be3e60eee888a7ffbe2c108679f7879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Duchesneau?= Date: Wed, 19 Jun 2024 16:48:40 -0400 Subject: [PATCH 03/23] bump to v0.2.0, changed index/filtering keys for more flexibility, add 'derived-substreams-example.yaml' to help with filtering on value efficiently --- .../deriived-substreams-example.yaml | 43 +++++ injective-common/src/lib.rs | 170 ++++++++++++++++-- injective-common/substreams.yaml | 114 ++++++++++-- 3 files changed, 306 insertions(+), 21 deletions(-) create mode 100644 injective-common/deriived-substreams-example.yaml diff --git a/injective-common/deriived-substreams-example.yaml b/injective-common/deriived-substreams-example.yaml new file mode 100644 index 0000000..47f5ce6 --- /dev/null +++ b/injective-common/deriived-substreams-example.yaml @@ -0,0 +1,43 @@ +# requires substreams v1.7.1 and above +specVersion: v0.1.0 +package: + name: example + version: v0.1.0 + +network: injective-mainnet + +imports: + injective: ./injective-common-v0.2.0.spkg + +modules: + - name: my_events + use: injective:filtered_events_by_attribute_value + initialBlock: 70000000 + blockFilter: + module: injective:index_events + query: + string: type:wasm && attr:_contract_address + + - name: my_event_groups + use: injective:filtered_event_groups_by_attribute_value + initialBlock: 70000000 + blockFilter: + module: injective:index_events + query: + string: type:wasm && attr:_contract_address + + - name: my_transactions + use: injective:filtered_trx_by_events_attribute_value + initialBlock: 70000000 + blockFilter: + module: injective:index_events + query: + string: type:wasm && attr:_contract_address + +params: + my_events: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5" + #my_events: "type:wasm && attr:_contract_address:inj1ja2z7lhtpq7myj9vv936euwepzw9hppd2fd5t0" + my_event_groups: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5" + #my_event_groups: "type:wasm && attr:_contract_address:inj1ja2z7lhtpq7myj9vv936euwepzw9hppd2fd5t0" + my_transactions: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5" + #my_transactions: "type:wasm && attr:_contract_address:inj1ja2z7lhtpq7myj9vv936euwepzw9hppd2fd5t0" diff --git a/injective-common/src/lib.rs b/injective-common/src/lib.rs index 071fe09..0958c89 100644 --- a/injective-common/src/lib.rs +++ b/injective-common/src/lib.rs @@ -112,6 +112,14 @@ pub fn all_events(block: Block) -> Result { return Err(anyhow!("Transaction list and result list do not match")); } + // block events are the combination of BeginBlockEvents and EndBlockEvents + events.extend(block.events.into_iter().map(|event| { + return Event { + event: Some(event), + transaction_hash: "".to_string(), + }; + })); + for (i, tx_result) in block.tx_results.into_iter().enumerate() { let tx_hash = compute_tx_hash(block.txs.get(i).unwrap()); @@ -145,7 +153,10 @@ fn index_events(events: EventList) -> Result { events.events.into_iter().for_each(|e| { if let Some(ev) = e.event { - keys.keys.push(ev.r#type); + keys.keys.push(format!("type:{}", ev.r#type)); + ev.attributes.into_iter().for_each(|attr| { + keys.keys.push(format!("attr:{}", attr.key)); + }); } }); @@ -160,7 +171,10 @@ fn filtered_events(query: String, events: EventList) -> Result .filter(|e| { if let Some(ev) = &e.event { let mut keys = Vec::new(); - keys.push(ev.r#type.clone()); + keys.push(format!("type:{}", ev.r#type.clone())); + ev.attributes.iter().for_each(|attr| { + keys.push(format!("attr:{}", attr.key)); + }); matches_keys_in_parsed_expr(&keys, &query).expect("matching events from query") } else { false @@ -175,29 +189,165 @@ fn filtered_events(query: String, events: EventList) -> Result } #[substreams::handlers::map] -fn filtered_trx_by_events(query: String, events: EventList, trxs: TransactionList) -> Result { - let mut transactions: HashMap = HashMap::new(); +fn filtered_event_groups(query: String, events: EventList) -> Result { + let matching_trx_hashes= events + .events + .iter() + .filter(|e| { + if let Some(ev) = &e.event { + let mut keys = Vec::new(); + keys.push(format!("type:{}", ev.r#type.clone())); + ev.attributes.iter().for_each(|attr| { + keys.push(format!("attr:{}", attr.key)); + }); + matches_keys_in_parsed_expr(&keys, &query).expect("matching events from query") + } else { + false + } + }) + .map(|e| (e.transaction_hash.to_string(), true)) + .collect::>(); - events + let filtered: Vec = events .events .into_iter() + .filter(|e| { + matching_trx_hashes.contains_key(e.transaction_hash.as_str()) + }) + .collect(); + + Ok(EventList { + events: filtered, + clock: events.clock, + }) +} + +#[substreams::handlers::map] +fn filtered_trx_by_events(query: String, trxs: TransactionList) -> Result { + let events = trxs.transactions.iter().map(|t| { + t.result_events.iter().map(|e| { + Event { + transaction_hash: t.hash.clone(), + event: Some(e.clone()), + } + }) + }).flatten().collect::>(); + + let matching_trx_hashes= events + .iter() + .filter(|e| { + if let Some(ev) = &e.event { + let mut keys = Vec::new(); + keys.push(format!("type:{}", ev.r#type.clone())); + ev.attributes.iter().for_each(|attr| { + keys.push(format!("attr:{}", attr.key)); + }); + matches_keys_in_parsed_expr(&keys, &query).expect("matching events from query") + } else { + false + } + }) + .map(|e| (e.transaction_hash.to_string(), true)) + .collect::>(); + + let transactions: Vec = trxs + .transactions + .into_iter() + .filter(|t| matching_trx_hashes.contains_key(t.hash.as_str())) + .collect(); + + Ok(TransactionList { + transactions: transactions, + clock: trxs.clock, + }) +} + +#[substreams::handlers::map] +fn filtered_events_by_attribute_value(query: String, events: EventList) -> Result { + let filtered: Vec = events + .events + .into_iter() + .filter(|e| { + if let Some(ev) = &e.event { + let mut keys = Vec::new(); + keys.push(format!("type:{}", ev.r#type.clone())); + ev.attributes.iter().for_each(|attr| { + keys.push(format!("attr:{}", attr.key)); + keys.push(format!("attr:{}:{}", attr.key, attr.value)); + }); + matches_keys_in_parsed_expr(&keys, &query).expect("matching events from query") + } else { + false + } + }) + .collect(); + + Ok(EventList { + events: filtered, + clock: events.clock, + }) +} + +#[substreams::handlers::map] +fn filtered_event_groups_by_attribute_value(query: String, events: EventList) -> Result { + let matching_trx_hashes= events + .events + .iter() + .filter(|e| { + if let Some(ev) = &e.event { + let mut keys = Vec::new(); + keys.push(format!("type:{}", ev.r#type.clone())); + ev.attributes.iter().for_each(|attr| { + keys.push(format!("attr:{}", attr.key)); + keys.push(format!("attr:{}:{}", attr.key, attr.value)); + }); + matches_keys_in_parsed_expr(&keys, &query).expect("matching events from query") + } else { + false + } + }) + .map(|e| (e.transaction_hash.to_string(), true)) + .collect::>(); + + let filtered: Vec = events + .events + .into_iter() + .filter(|e| { + matching_trx_hashes.contains_key(e.transaction_hash.as_str()) + }) + .collect(); + + Ok(EventList { + events: filtered, + clock: events.clock, + }) +} + +#[substreams::handlers::map] +fn filtered_trx_by_events_attribute_value(query: String, events: EventList, trxs: TransactionList) -> Result { + let matching_trx_hashes= events + .events + .iter() .filter(|e| { if let Some(ev) = &e.event { let mut keys = Vec::new(); - keys.push(ev.r#type.clone()); + keys.push(format!("type:{}", ev.r#type.clone())); + ev.attributes.iter().for_each(|attr| { + keys.push(format!("attr:{}", attr.key)); + keys.push(format!("attr:{}:{}", attr.key, attr.value)); + }); matches_keys_in_parsed_expr(&keys, &query).expect("matching events from query") } else { false } }) - .for_each(|e: Event| { - transactions.insert(e.transaction_hash, true); - }); + .map(|e| (e.transaction_hash.to_string(), true)) + .collect::>(); let transactions: Vec = trxs .transactions .into_iter() - .filter(|t| transactions.contains_key(&t.hash)) + .filter(|t| matching_trx_hashes.contains_key(t.hash.as_str())) .collect(); Ok(TransactionList { diff --git a/injective-common/substreams.yaml b/injective-common/substreams.yaml index 28fe3df..347d69f 100644 --- a/injective-common/substreams.yaml +++ b/injective-common/substreams.yaml @@ -2,9 +2,28 @@ specVersion: v0.1.0 package: name: injective_common - version: v0.1.1 + version: v0.2.0 + url: https://github.com/streamingfast/substreams-foundational-modules/injective-common + doc: | + common Injective substreams modules to extract events and transactions with indexing -network: cosmos + Use one of those optimized modules with a query string as a parameter: + * filtered_events + * filtered_event_groups + * filtered_trx_by_events + + The query string will be used for the blockfilter as well as the actual filtering of the events/transactions + + The following modules are also available for more specific filtering, but they do not use an index by default: + * filtered_events_by_attribute_value + * filtered_event_groups_by_attribute_value + * filtered_trx_by_events_attribute_value + + They should be overriden by setting the blockFilter.Query.String parameter to a query that matches the event type + and attribute keys only. See `derived-substreams-example.yaml` for an example + (https://github.com/streamingfast/substreams-foundational-modules/injective-common) + +network: injective-mainnet protobuf: descriptorSets: @@ -23,6 +42,9 @@ modules: - source: sf.cosmos.type.v2.Block output: type: proto:sf.substreams.cosmos.v1.TransactionList + doc: | + `all_transactions` reads from the `sf.cosmos.type.v2.Block` source and outputs a list of all transactions in the block. + Some known message types will be converted to the correct protobuf type, unknown ones will stay as `Any` type. - name: all_events kind: map @@ -31,6 +53,9 @@ modules: - source: sf.cosmos.type.v2.Block output: type: proto:sf.substreams.cosmos.v1.EventList + doc: | + `all_events` reads from the `sf.cosmos.type.v2.Block` source and outputs a list of all events in the block. + Some events are at the block level, others appear inside the transactions. - name: index_events kind: blockIndex @@ -39,8 +64,9 @@ modules: output: type: proto:sf.substreams.index.v1.Keys doc: | - `index_events` sets the keys corresponding to every event 'type' - ex: `coin_received`, `message` or `injective.peggy.v1.EventDepositClaim` + `index_events` sets the keys corresponding to all event 'types' and 'attribute keys' in the block + ex: `type:coin_received`, `type:injective.peggy.v1.EventDepositClaim`, `attr:action`, `attr:sender` ... + The attribute values are never indexed because they have a high cardinality and would be too expensive to index. - name: filtered_events kind: map @@ -54,8 +80,25 @@ modules: output: type: proto:sf.substreams.cosmos.v1.EventList doc: | - `filtered_events` reads from `all_events` and applies a filter on the event types, only outputing the events that match the filter. - The only operator that you should need to use this filter is the logical or `||`, because each event can only match one type. + `filtered_events` reads from `all_events` and applies a filter on the event types and attribute keys, + only outputing the events that match the filter. + Example usage: `(type:message && attr:action) || (type:wasm && attr:_contract_address)` + + - name: filtered_event_groups + kind: map + blockFilter: + module: index_events + query: + params: true + inputs: + - params: string + - map: all_events + output: + type: proto:sf.substreams.cosmos.v1.EventList + doc: | + `filtered_event_groups` reads from `all_events` and applies a filter on the event types and attribute keys, + outputing all the events from transactions that have at least one event matching the filter. + Example usage: `type:injective.peggy.v1.EventDepositClaim || (type:wasm && attr:_contract_address)` - name: filtered_trx_by_events kind: map @@ -63,6 +106,48 @@ modules: module: index_events query: params: true + inputs: + - params: string + - map: all_transactions + output: + type: proto:sf.substreams.cosmos.v1.TransactionList + doc: | + `filtered_trx_by_events` reads from `all_transactions` and applies a filter on the event types and attribute keys, + outputing the complete transactions that have at least one event matching the filter. + Example usage: `type:injective.peggy.v1.EventDepositClaim || (type:wasm && attr:_contract_address)` + + - name: filtered_events_by_attribute_value + kind: map + inputs: + - params: string + - map: all_events + output: + type: proto:sf.substreams.cosmos.v1.EventList + doc: | + `filtered_events_by_attribute_value` reads from `all_events` and applies a filter on the event types, attribute keys and values, + only outputing the events that match the filter. + Example usage: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5" + + To use this module with an index, import it and override it with the `use:` parameter, setting blockFilter.Query.String to a query + that matches the event type and attribute keys only (ex: `type:wasm && attr:_contract_address`) + + - name: filtered_event_groups_by_attribute_value + kind: map + inputs: + - params: string + - map: all_events + output: + type: proto:sf.substreams.cosmos.v1.EventList + doc: | + `filtered_events_groups_by_attribute_value` reads from `all_events` and applies a filter on the event types, attribute keys and values, + outputing all the events from transactions that have at least one event matching the filter. + Example usage: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5" + + To use this module with an index, import it and override it with the `use:` parameter, setting blockFilter.Query.String to a query + that matches the event type and attribute keys only (ex: `type:wasm && attr:_contract_address`) + + - name: filtered_trx_by_events_attribute_value + kind: map inputs: - params: string - map: all_events @@ -70,10 +155,17 @@ modules: output: type: proto:sf.substreams.cosmos.v1.TransactionList doc: | - `filtered_trx_by_events` reads from `all_events` and `all_transactions` and applies a filter on the event types, - only outputing the transactions that match the filter. The only operator that you should need to use this filter - is the logical or `||`, because each event can only match one type. + `filtered_trx_by_events_attribute_value` reads from `all_events` and applies a filter on the event types, attribute keys and values, + outputing the complete transactions that have at least one event matching the filter. + Example usage: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5" + + To use this module with an index, import it and override it with the `use:` parameter, setting blockFilter.Query.String to a query + that matches the event type and attribute keys only (ex: `type:wasm && attr:_contract_address`) params: - filtered_events: "message" - filtered_trx_by_events: "message" \ No newline at end of file + filtered_events: "(type:message && attr:action) || (type:wasm && attr:_contract_address)" + filtered_event_groups: "type:wasm && attr:_contract_address" + filtered_trx_by_events: "type:wasm" + filtered_events_by_attribute_value: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5" + filtered_event_groups_by_attribute_value: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5" + filtered_trx_by_events_attribute_value: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5" \ No newline at end of file From 39053dfa2244ae1594c8d5a62ecd37c6742453a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Duchesneau?= Date: Thu, 20 Jun 2024 13:28:58 -0400 Subject: [PATCH 04/23] improve README --- injective-common/README.md | 119 +++++++++++++----- ...e.yaml => derived-substreams-example.yaml} | 0 2 files changed, 88 insertions(+), 31 deletions(-) rename injective-common/{deriived-substreams-example.yaml => derived-substreams-example.yaml} (100%) diff --git a/injective-common/README.md b/injective-common/README.md index a0c0947..e259db7 100644 --- a/injective-common/README.md +++ b/injective-common/README.md @@ -2,23 +2,79 @@ The Injective Foundational modules are Substreams modules extracting common data from the Injective blockchain. +## Getting the substreams package + +### From Substreams.dev + +https://substreams.dev/streamingfast/injective-common/ + + +### Building it yourself + +### Protobuf definitions bundle + +The required protobuf modules are referenced in `buf.yaml` and bundled in `generated-buf-build.binpb` + +If you want to add more, you will need a (free) API token to access https://buf.build +The `make` command will automatically run the appropriate `buf build` command if needed. + +### Generate rust protobuf bindings + +```bash +make protogen +``` + +### Build Substreams modules + +```bash +make build +``` + +### Run Substreams + +You will need an API key to access the streamingfast servers, see https://substreams.streamingfast.io + +```bash +substreams run -e mainnet.injective.streamingfast.io:443 substreams.yaml filtered_events -p filtered_events='type:injective.peggy.v1.EventDepositClaim' -s 9600 -t 9700 +substreams run -e testnet.injective.streamingfast.io:443 substreams.yaml filtered_events -p filtered_events='type:injective.exchange.v1beta1.EventCancelSpotOrder' -s 27751658 -t +10 +``` + +### Package it as .spkg + +* optionally bump the version number in substreams.yaml + +```bash +make package +``` + ## Modules ### all_events -The `all_events` module extracts only the events and provides them, along with the transaction hash and block at which it they are found. +The `all_events` module reads from the `sf.cosmos.type.v2.Block` source and outputs a list of all events in the block, +Some events are at the block level, others appear inside the transactions. The latter will include the transaction hash. ### filtered_events -The `filtered_events` module allows a reduction of the `all_events` output, only matching the events that match the requested type. +The `filtered_events` module allows a reduction of the `all_events` output, only matching the events that match the +requested type or include the attribute keys. +It pre-filters blocks using the `index_events` module for efficiency. -Use with the parameter, ex: +Use with parameters, ex: ```bash -substreams run [...] -p filtered_events="message || injective.peggy.v1.EventDepositClaim" +substreams run [...] -p filtered_events="(type:message && attr:action) || (type:wasm && attr:_contract_address)" ``` -### all_transactions (work in progress) +### filtered_event_groups + +The `filtered_event_groups` module reads from `all_events` and applies a filter on the event types and attribute keys, +outputting *all the events* from transactions that have at least one event matching the filter. +It pre-filters blocks using the `index_events` module for efficiency. + +Use with the same parameters as the `filtered_events` module. + +### all_transactions The `all_transactions` module extracts all the transactions from the Injective blockchain, providing useful information, such as _messages_, _signatures_ or _events_. @@ -27,46 +83,47 @@ The other types will still be shown as protobuf "Any" type. ### filtered_trx_by_events -The `filtered_trx_by_events` modules allows a reduction of the `all_transactions` output, only matching the events that match the requested type. The module will return the entire transactions. Some event types will appear that do not match from the filtered params as the entire transaction is returned. -Use with the parameter, ex: +The `filtered_trx_by_events` modules reads from `all_transactions` and applies a filter on the event types and attribute keys, +outputting the complete transactions that have at least one event matching the filter. +It pre-filters blocks using the `index_events` module for efficiency. -```bash -substreams run [...] -p filtered_trx_by_events="message || injective.peggy.v1.EventDepositClaim" -``` +Use with the same parameters as the `filtered_events` module. -## Getting Started -### Gather protobuf definitions in generated-buf-build.binpb +### filtered_events_by_attribute_value -The required protobuf modules are referenced in `buf.yaml`. -You need a (free) API token to access https://buf.build and resolve the dependencies into a single file, generated-buf-build.binpb. -That file is then used to generate the rust protobuf bindings or to bundle the definitions in the .spkg. (it is referenced in the substreams.yaml) +The `filtered_events_by_attribute_value` module reads from `all_events` and applies a filter on the event types, +attribute keys and values, only outputting the events that match the filter. -### Generate rust protobuf bindings +Use with parameters, ex: ```bash -make protogen +substreams run [...] -p filtered_events_by_attribute_value="type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5" ``` -### Build Substreams modules +For an optimized experience, we recommend importing this module in your own substreams.yaml, overloading +the 'blockFilter' with a custom query to `index_events`, with the `use` parameter. See [an example](./derived-substreams-example.yaml) -```bash -make build -``` -### Run Substreams +### filtered_event_groups_by_attribute_value -You will need an API key to access the streamingfast servers, see https://substreams.streamingfast.io +The `filtered_events_groups_by_attribute_value` module reads from `all_events` and applies a filter on the event types, +attribute keys and values, outputting all the events from transactions that have at least one event matching the filter. -This example query only fetches the events of type 'injective.peggy.v1.EventDepositClaim' +Use with the same parameters as the `filtered_events_by_attribute_value` module. -```bash -substreams run -e mainnet.injective.streamingfast.io:443 substreams.yaml filtered_events -p filtered_events='injective.peggy.v1.EventDepositClaim' -s 9600 -t 9700 -``` +For an optimized experience, we recommend importing this module in your own substreams.yaml, overloading +the 'blockFilter' with a custom query to `index_events`, with the `use` parameter. See [an example](./derived-substreams-example.yaml) -### Package as .spkg -```bash -make package -``` +### filtered_trx_by_events_attribute_value + +The `filtered_trx_by_events_attribute_value` module reads from `all_events` and applies a filter on the event types, +attribute keys and values, outputting the complete transactions that have at least one event matching the filter. + +Use with the same parameters as the `filtered_events_by_attribute_value` module. + +For an optimized experience, we recommend importing this module in your own substreams.yaml, overloading +the 'blockFilter' with a custom query to `index_events`, with the `use` parameter. See [an example](./derived-substreams-example.yaml) + diff --git a/injective-common/deriived-substreams-example.yaml b/injective-common/derived-substreams-example.yaml similarity index 100% rename from injective-common/deriived-substreams-example.yaml rename to injective-common/derived-substreams-example.yaml From 7a485e8b2411ada62b4a1967714c2d6896f7cb54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Duchesneau?= Date: Fri, 21 Jun 2024 13:05:19 -0400 Subject: [PATCH 05/23] fix filtered injective modules to return completely empty data when event/trx list is empty --- .../derived-substreams-example.yaml | 2 +- injective-common/src/lib.rs | 18 ++++++++++++++++++ injective-common/substreams.yaml | 4 ++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/injective-common/derived-substreams-example.yaml b/injective-common/derived-substreams-example.yaml index 47f5ce6..3873d3f 100644 --- a/injective-common/derived-substreams-example.yaml +++ b/injective-common/derived-substreams-example.yaml @@ -7,7 +7,7 @@ package: network: injective-mainnet imports: - injective: ./injective-common-v0.2.0.spkg + injective: ./injective-common-v0.2.1.spkg modules: - name: my_events diff --git a/injective-common/src/lib.rs b/injective-common/src/lib.rs index 0958c89..4a81c3d 100644 --- a/injective-common/src/lib.rs +++ b/injective-common/src/lib.rs @@ -182,6 +182,9 @@ fn filtered_events(query: String, events: EventList) -> Result }) .collect(); + if filtered.len() == 0 { + return Ok(EventList::default()); + } Ok(EventList { events: filtered, clock: events.clock, @@ -216,6 +219,9 @@ fn filtered_event_groups(query: String, events: EventList) -> Result Result Resul }) .collect(); + if filtered.len() == 0 { + return Ok(EventList::default()); + } Ok(EventList { events: filtered, clock: events.clock, @@ -317,6 +329,9 @@ fn filtered_event_groups_by_attribute_value(query: String, events: EventList) -> }) .collect(); + if filtered.len() == 0 { + return Ok(EventList::default()); + } Ok(EventList { events: filtered, clock: events.clock, @@ -350,6 +365,9 @@ fn filtered_trx_by_events_attribute_value(query: String, events: EventList, trxs .filter(|t| matching_trx_hashes.contains_key(t.hash.as_str())) .collect(); + if transactions.len() == 0 { + return Ok(TransactionList::default()); + } Ok(TransactionList { transactions: transactions, clock: trxs.clock, diff --git a/injective-common/substreams.yaml b/injective-common/substreams.yaml index 347d69f..96242b1 100644 --- a/injective-common/substreams.yaml +++ b/injective-common/substreams.yaml @@ -2,7 +2,7 @@ specVersion: v0.1.0 package: name: injective_common - version: v0.2.0 + version: v0.2.1 url: https://github.com/streamingfast/substreams-foundational-modules/injective-common doc: | common Injective substreams modules to extract events and transactions with indexing @@ -168,4 +168,4 @@ params: filtered_trx_by_events: "type:wasm" filtered_events_by_attribute_value: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5" filtered_event_groups_by_attribute_value: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5" - filtered_trx_by_events_attribute_value: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5" \ No newline at end of file + filtered_trx_by_events_attribute_value: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5" From 37f707344ee3323553714e0386aaa686a51f2c99 Mon Sep 17 00:00:00 2001 From: arnaudberger Date: Tue, 25 Jun 2024 10:16:58 -0400 Subject: [PATCH 06/23] Update substreams-rs to 0.5.20 --- injective-common/Cargo.lock | 8 ++++---- injective-common/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/injective-common/Cargo.lock b/injective-common/Cargo.lock index ab74169..a37ce7b 100644 --- a/injective-common/Cargo.lock +++ b/injective-common/Cargo.lock @@ -1050,9 +1050,9 @@ dependencies = [ [[package]] name = "substreams" -version = "0.5.19" +version = "0.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8116c64db26a3d7d4f9773b0c59500141c891543e8ce1d939144da190700d84b" +checksum = "392f77309a4e36d7839d0552a38557b53894200aba239f3d0725ec167ebf4297" dependencies = [ "anyhow", "bigdecimal", @@ -1073,9 +1073,9 @@ dependencies = [ [[package]] name = "substreams-macro" -version = "0.5.19" +version = "0.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439dba985f08ad63aca68a53262231219a0c079896bef96c566bdb3668999d3a" +checksum = "9ccc7137347f05d26c7007dced97b4caef67a13b3d422789d969fe6e4cd8cc4a" dependencies = [ "proc-macro2", "quote", diff --git a/injective-common/Cargo.toml b/injective-common/Cargo.toml index 27ccb36..c0fc239 100644 --- a/injective-common/Cargo.toml +++ b/injective-common/Cargo.toml @@ -14,7 +14,7 @@ strip = "debuginfo" crate-type = ["cdylib"] [dependencies] -substreams = "^0.5.19" +substreams = "^0.5.20" hex = "0.4.3" prost = "0.11" prost-types = "0.11" From e03fac15773494a8e376239f6dcd5da2ad2c42cf Mon Sep 17 00:00:00 2001 From: arnaudberger Date: Tue, 25 Jun 2024 10:21:59 -0400 Subject: [PATCH 07/23] update substreams manifest --- injective-common/substreams.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/injective-common/substreams.yaml b/injective-common/substreams.yaml index 96242b1..238e16f 100644 --- a/injective-common/substreams.yaml +++ b/injective-common/substreams.yaml @@ -2,7 +2,7 @@ specVersion: v0.1.0 package: name: injective_common - version: v0.2.1 + version: v0.2.2 url: https://github.com/streamingfast/substreams-foundational-modules/injective-common doc: | common Injective substreams modules to extract events and transactions with indexing From 8eb0683dbee29fe65ed7bdbb6ffcdc0818081568 Mon Sep 17 00:00:00 2001 From: Eduard Voiculescu Date: Mon, 8 Jul 2024 12:11:14 -0400 Subject: [PATCH 08/23] adding first pass of vara common module --- vara-common/.gitignore | 2 + vara-common/README.md | 25 + vara-common/buf.gen.yaml | 8 + vara-common/buf.work.yaml | 3 + vara-common/gen.go | 93 + vara-common/go.mod | 31 + vara-common/go.sum | 77 + vara-common/main.go | 57 + vara-common/pb/block.pb.go | 2126 ++++ vara-common/pb/block_vtproto.pb.go | 11526 ++++++++++++++++++++++ vara-common/pb/extrinsics.pb.go | 1155 +++ vara-common/pb/extrinsics_vtproto.pb.go | 5963 +++++++++++ vara-common/proto/block.proto | 169 + vara-common/proto/extrinsics.proto | 95 + vara-common/substreams.vara.yaml | 28 + vara-common/substreams.yaml | 27 + 16 files changed, 21385 insertions(+) create mode 100644 vara-common/.gitignore create mode 100644 vara-common/README.md create mode 100644 vara-common/buf.gen.yaml create mode 100644 vara-common/buf.work.yaml create mode 100644 vara-common/gen.go create mode 100644 vara-common/go.mod create mode 100644 vara-common/go.sum create mode 100644 vara-common/main.go create mode 100644 vara-common/pb/block.pb.go create mode 100644 vara-common/pb/block_vtproto.pb.go create mode 100644 vara-common/pb/extrinsics.pb.go create mode 100644 vara-common/pb/extrinsics_vtproto.pb.go create mode 100644 vara-common/proto/block.proto create mode 100644 vara-common/proto/extrinsics.proto create mode 100644 vara-common/substreams.vara.yaml create mode 100644 vara-common/substreams.yaml diff --git a/vara-common/.gitignore b/vara-common/.gitignore new file mode 100644 index 0000000..d1a75fe --- /dev/null +++ b/vara-common/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +wasm.wasm diff --git a/vara-common/README.md b/vara-common/README.md new file mode 100644 index 0000000..e46e512 --- /dev/null +++ b/vara-common/README.md @@ -0,0 +1,25 @@ +# Substreams in Go with tinygo + +First test is to receive a Clock in Go, and ship it to the Substreams engine, and have it run over there. + +- Craft a first `map_mod` that prints something to logs. + +First test is to unpack a raw Ethereum Block, from within `tinygo`. + +## Build + +```bash +tinygo build -o wasm.wasm -target wasi -scheduler none . +``` + +## Usage + +```bash +substreams gui ./substreams.yaml --plaintext -e 127.0.0.1:10016 -t +10 map_test +# or +substreams run ./substreams.yaml --plaintext -e 127.0.0.1:10016 -t +10 map_test +``` + +```bash +buf generate --exclude-path sf/substreams/v1,sf/substreams/rpc,google/,sf/substreams/sink,sf/substreams +``` diff --git a/vara-common/buf.gen.yaml b/vara-common/buf.gen.yaml new file mode 100644 index 0000000..12430ba --- /dev/null +++ b/vara-common/buf.gen.yaml @@ -0,0 +1,8 @@ +version: v1 +plugins: + - plugin: buf.build/protocolbuffers/go:v1.31.0 + out: pb + opt: paths=source_relative + - plugin: buf.build/community/planetscale-vtprotobuf:v0.6.0 + out: pb + opt: paths=source_relative diff --git a/vara-common/buf.work.yaml b/vara-common/buf.work.yaml new file mode 100644 index 0000000..7a18eb0 --- /dev/null +++ b/vara-common/buf.work.yaml @@ -0,0 +1,3 @@ +version: v1 +directories: + - proto \ No newline at end of file diff --git a/vara-common/gen.go b/vara-common/gen.go new file mode 100644 index 0000000..534bde3 --- /dev/null +++ b/vara-common/gen.go @@ -0,0 +1,93 @@ +package main + +import ( + "fmt" + "reflect" + "unsafe" + + pbgear "github.com/streamingfast/tinygo-test/pb" +) + +//go:generate substreams protogen ./substreams.yaml --with-tinygo-maps // creates genre substreams.gen.go + +// Dans WASI: _start +func main() {} + +//export db_get_i64 +func _db_get_i64(code, scope, key uint64) []byte + +//export output +func _output(ptr, len uint32) + +//go:wasm-module logger +//export println +func _log(ptr, len uint32) + +// Output the serialized protobuf byte array to the Substreams engine +func output(out []byte) { + _output(byteArrayToPtr(out)) +} + +// Log a line to the Substreams engine +func logf(message string, args ...any) { + _log(stringToPtr(fmt.Sprintf(message, args...))) +} + +//export map_extrinsics +func _map_extrinsics(blockPtr, blockLen uint32) (retval uint32) { + defer func() { + if r := recover(); r != nil { + logf("%#v", r) + retval = 1 + } + }() + + a := ptrToString(blockPtr, blockLen) + b := []byte(a) + dest := &pbgear.Block{} + if err := dest.UnmarshalVT(b); err != nil { + logf("failed unmarshal: %w, %d", err, len(a), len(b), b[:20]) + return 1 + } + + ret, err := map_extrinsics(dest) + if err != nil { + panic(fmt.Errorf("map_extrinsics failed: %w", err)) + } + if ret != nil { + cnt, err := ret.MarshalVT() + if err != nil { + panic(fmt.Errorf("marshal output: %w", err)) + } + output(cnt) + } + return 0 +} + +// ptrToString returns a string from WebAssembly compatible numeric types +// representing its pointer and length. +func ptrToString(ptr uint32, size uint32) string { + // Get a slice view of the underlying bytes in the stream. We use SliceHeader, not StringHeader + // as it allows us to fix the capacity to what was allocated. + return *(*string)(unsafe.Pointer(&reflect.SliceHeader{ + Data: uintptr(ptr), + Len: int(size), // Tinygo requires these as uintptrs even if they are int fields. + Cap: int(size), // ^^ See https://github.com/tinygo-org/tinygo/issues/1284 + })) +} + +// stringToPtr returns a pointer and size pair for the given string in a way +// compatible with WebAssembly numeric types. +func stringToPtr(s string) (uint32, uint32) { + buf := []byte(s) + ptr := &buf[0] + unsafePtr := uintptr(unsafe.Pointer(ptr)) + return uint32(unsafePtr), uint32(len(buf)) +} + +// byteArrayToPtr returns a pointer and size pair for the given byte array, for WASM compat. +func byteArrayToPtr(buf []byte) (uint32, uint32) { + ptr := &buf[0] + unsafePtr := uintptr(unsafe.Pointer(ptr)) + return uint32(unsafePtr), uint32(len(buf)) +} diff --git a/vara-common/go.mod b/vara-common/go.mod new file mode 100644 index 0000000..1e00d9c --- /dev/null +++ b/vara-common/go.mod @@ -0,0 +1,31 @@ +module github.com/streamingfast/tinygo-test + +go 1.22.0 + +require ( + github.com/centrifuge/go-substrate-rpc-client v1.1.0 + github.com/centrifuge/go-substrate-rpc-client/v4 v4.2.1 + github.com/planetscale/vtprotobuf v0.6.0 + google.golang.org/protobuf v1.33.0 +) + +require ( + github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect + github.com/cosmos/go-bip39 v1.0.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/decred/base58 v1.0.4 // indirect + github.com/decred/dcrd/crypto/blake256 v1.0.0 // indirect + github.com/ethereum/go-ethereum v1.10.20 // indirect + github.com/go-stack/stack v1.8.1 // indirect + github.com/gtank/merlin v0.1.1 // indirect + github.com/gtank/ristretto255 v0.1.2 // indirect + github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b // indirect + github.com/pierrec/xxHash v0.1.5 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/stretchr/objx v0.5.0 // indirect + github.com/stretchr/testify v1.8.4 // indirect + github.com/vedhavyas/go-subkey/v2 v2.0.0 // indirect + golang.org/x/crypto v0.7.0 // indirect + golang.org/x/sys v0.11.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/vara-common/go.sum b/vara-common/go.sum new file mode 100644 index 0000000..d823574 --- /dev/null +++ b/vara-common/go.sum @@ -0,0 +1,77 @@ +github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= +github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= +github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= +github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= +github.com/centrifuge/go-substrate-rpc-client v1.1.0 h1:cpfG7KKwy+n7FRb1LkiMYwi6e4gwzaooGfPIzXXQj6w= +github.com/centrifuge/go-substrate-rpc-client v1.1.0/go.mod h1:GBMLH8MQs5g4FcrytcMm9uRgBnTL1LIkNTue6lUPhZU= +github.com/centrifuge/go-substrate-rpc-client/v4 v4.2.1 h1:io49TJ8IOIlzipioJc9pJlrjgdJvqktpUWYxVY5AUjE= +github.com/centrifuge/go-substrate-rpc-client/v4 v4.2.1/go.mod h1:k61SBXqYmnZO4frAJyH3iuqjolYrYsq79r8EstmklDY= +github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= +github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/base58 v1.0.4 h1:QJC6B0E0rXOPA8U/kw2rP+qiRJsUaE2Er+pYb3siUeA= +github.com/decred/base58 v1.0.4/go.mod h1:jJswKPEdvpFpvf7dsDvFZyLT22xZ9lWqEByX38oGd9E= +github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/ethereum/go-ethereum v1.10.20 h1:75IW830ClSS40yrQC1ZCMZCt5I+zU16oqId2SiQwdQ4= +github.com/ethereum/go-ethereum v1.10.20/go.mod h1:LWUN82TCHGpxB3En5HVmLLzPD7YSrEUFmFfN1nKkVN0= +github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= +github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64= +github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= +github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= +github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= +github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b h1:QrHweqAtyJ9EwCaGHBu1fghwxIPiopAHV06JlXrMHjk= +github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b/go.mod h1:xxLb2ip6sSUts3g1irPVHyk/DGslwQsNOo9I7smJfNU= +github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo= +github.com/pierrec/xxHash v0.1.5/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I= +github.com/planetscale/vtprotobuf v0.6.0 h1:nBeETjudeJ5ZgBHUz1fVHvbqUKnYOXNhsIEabROxmNA= +github.com/planetscale/vtprotobuf v0.6.0/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/vedhavyas/go-subkey/v2 v2.0.0 h1:LemDIsrVtRSOkp0FA8HxP6ynfKjeOj3BY2U9UNfeDMA= +github.com/vedhavyas/go-subkey/v2 v2.0.0/go.mod h1:95aZ+XDCWAUUynjlmi7BtPExjXgXxByE0WfBwbmIRH4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/vara-common/main.go b/vara-common/main.go new file mode 100644 index 0000000..75dfa3c --- /dev/null +++ b/vara-common/main.go @@ -0,0 +1,57 @@ +package main + +import ( + "fmt" + + "github.com/centrifuge/go-substrate-rpc-client/v4/registry" + pbgear "github.com/streamingfast/tinygo-test/pb" +) + +func map_extrinsics(block *pbgear.Block) (*pbgear.ParsedExtrinsics, error) { + parsedExtrinsics, err := convertExtrinsics(block.Extrinsics) + if err != nil { + return nil, fmt.Errorf("failed to convert extrinsics: %w", err) + } + + return &pbgear.ParsedExtrinsics{ + BlockHash: block.Hash, + Extrinsics: parsedExtrinsics, + }, nil +} + +func convertExtrinsics(extrinsics []*pbgear.Extrinsic) ([]*pbgear.ParsedExtrinsic, error) { + gearExtrinsics := make([]*pbgear.ParsedExtrinsic, 0, len(extrinsics)) + for _, extrinsic := range extrinsics { + callFields, err := convertDecodedFields(extrinsic) + if err != nil { + return nil, fmt.Errorf("failed to convert decoded fields: %w", err) + } + _ = callFields + // gearExtrinsics = append(gearExtrinsics, &pbgear.ParsedExtrinsic{ + // Name: extrinsic.Name, + // CallFields: callFields, + // CallIndex: convertCallIndex(extrinsic.CallIndex), + // Version: uint32(extrinsic.Version), + // Signature: convertExtrinsicsSignature(extrinsic.Signature), + // }) + } + + return gearExtrinsics, nil +} + +func convertDecodedFields(extrinsic *pbgear.Extrinsic) (*pbgear.ParsedExtrinsic, error) { + return &pbgear.ParsedExtrinsic{ + Name: "", + CallFields: , + CallIndex: , + Version: extrinsic.Version, + Signature: convertSignature(extrinsic.Signature), + }, nil +} + +func convertSignature(signature *pbgear.ExtrinsicSignature) *pbgear.ParsedExtrinsicSignature { + return &pbgear.ParsedExtrinsicSignature{ + Signer: signature.Signer, + Signature: signature.Signature, + } +} \ No newline at end of file diff --git a/vara-common/pb/block.pb.go b/vara-common/pb/block.pb.go new file mode 100644 index 0000000..ca9d014 --- /dev/null +++ b/vara-common/pb/block.pb.go @@ -0,0 +1,2126 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: block.proto + +package pbgear + +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) +) + +type Block struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` + Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + Header *Header `protobuf:"bytes,3,opt,name=header,proto3" json:"header,omitempty"` + Extrinsics []*Extrinsic `protobuf:"bytes,4,rep,name=extrinsics,proto3" json:"extrinsics,omitempty"` + Events []*Event `protobuf:"bytes,5,rep,name=events,proto3" json:"events,omitempty"` + DigestItems []*DigestItem `protobuf:"bytes,6,rep,name=digest_items,json=digestItems,proto3" json:"digest_items,omitempty"` + Justification []byte `protobuf:"bytes,7,opt,name=justification,proto3" json:"justification,omitempty"` +} + +func (x *Block) Reset() { + *x = Block{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Block) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Block) ProtoMessage() {} + +func (x *Block) ProtoReflect() protoreflect.Message { + mi := &file_block_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 Block.ProtoReflect.Descriptor instead. +func (*Block) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{0} +} + +func (x *Block) GetNumber() uint64 { + if x != nil { + return x.Number + } + return 0 +} + +func (x *Block) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *Block) GetHeader() *Header { + if x != nil { + return x.Header + } + return nil +} + +func (x *Block) GetExtrinsics() []*Extrinsic { + if x != nil { + return x.Extrinsics + } + return nil +} + +func (x *Block) GetEvents() []*Event { + if x != nil { + return x.Events + } + return nil +} + +func (x *Block) GetDigestItems() []*DigestItem { + if x != nil { + return x.DigestItems + } + return nil +} + +func (x *Block) GetJustification() []byte { + if x != nil { + return x.Justification + } + return nil +} + +type Header struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // [32]byte + ParentHash string `protobuf:"bytes,1,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` + // [32]byte + StateRoot string `protobuf:"bytes,2,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` + // [32]byte + ExtrinsicsRoot string `protobuf:"bytes,3,opt,name=extrinsics_root,json=extrinsicsRoot,proto3" json:"extrinsics_root,omitempty"` +} + +func (x *Header) Reset() { + *x = Header{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Header) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Header) ProtoMessage() {} + +func (x *Header) ProtoReflect() protoreflect.Message { + mi := &file_block_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 Header.ProtoReflect.Descriptor instead. +func (*Header) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{1} +} + +func (x *Header) GetParentHash() string { + if x != nil { + return x.ParentHash + } + return "" +} + +func (x *Header) GetStateRoot() string { + if x != nil { + return x.StateRoot + } + return "" +} + +func (x *Header) GetExtrinsicsRoot() string { + if x != nil { + return x.ExtrinsicsRoot + } + return "" +} + +type DigestItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Item: + // + // *DigestItem_AsChangesTrieRoot + // *DigestItem_AsPreRuntime + // *DigestItem_AsConsensus + // *DigestItem_AsSeal + // *DigestItem_AsChangesTrieSignal + // *DigestItem_AsOther + Item isDigestItem_Item `protobuf_oneof:"Item"` +} + +func (x *DigestItem) Reset() { + *x = DigestItem{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DigestItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DigestItem) ProtoMessage() {} + +func (x *DigestItem) ProtoReflect() protoreflect.Message { + mi := &file_block_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 DigestItem.ProtoReflect.Descriptor instead. +func (*DigestItem) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{2} +} + +func (m *DigestItem) GetItem() isDigestItem_Item { + if m != nil { + return m.Item + } + return nil +} + +func (x *DigestItem) GetAsChangesTrieRoot() string { + if x, ok := x.GetItem().(*DigestItem_AsChangesTrieRoot); ok { + return x.AsChangesTrieRoot + } + return "" +} + +func (x *DigestItem) GetAsPreRuntime() *PreRuntime { + if x, ok := x.GetItem().(*DigestItem_AsPreRuntime); ok { + return x.AsPreRuntime + } + return nil +} + +func (x *DigestItem) GetAsConsensus() *Consensus { + if x, ok := x.GetItem().(*DigestItem_AsConsensus); ok { + return x.AsConsensus + } + return nil +} + +func (x *DigestItem) GetAsSeal() *Seal { + if x, ok := x.GetItem().(*DigestItem_AsSeal); ok { + return x.AsSeal + } + return nil +} + +func (x *DigestItem) GetAsChangesTrieSignal() *ChangesTrieSignal { + if x, ok := x.GetItem().(*DigestItem_AsChangesTrieSignal); ok { + return x.AsChangesTrieSignal + } + return nil +} + +func (x *DigestItem) GetAsOther() []byte { + if x, ok := x.GetItem().(*DigestItem_AsOther); ok { + return x.AsOther + } + return nil +} + +type isDigestItem_Item interface { + isDigestItem_Item() +} + +type DigestItem_AsChangesTrieRoot struct { + // [32]byte + AsChangesTrieRoot string `protobuf:"bytes,1,opt,name=as_changes_trie_root,json=asChangesTrieRoot,proto3,oneof"` +} + +type DigestItem_AsPreRuntime struct { + AsPreRuntime *PreRuntime `protobuf:"bytes,2,opt,name=as_pre_runtime,json=asPreRuntime,proto3,oneof"` +} + +type DigestItem_AsConsensus struct { + AsConsensus *Consensus `protobuf:"bytes,3,opt,name=as_consensus,json=asConsensus,proto3,oneof"` +} + +type DigestItem_AsSeal struct { + AsSeal *Seal `protobuf:"bytes,4,opt,name=as_seal,json=asSeal,proto3,oneof"` +} + +type DigestItem_AsChangesTrieSignal struct { + AsChangesTrieSignal *ChangesTrieSignal `protobuf:"bytes,5,opt,name=as_changes_trie_signal,json=asChangesTrieSignal,proto3,oneof"` +} + +type DigestItem_AsOther struct { + AsOther []byte `protobuf:"bytes,6,opt,name=as_other,json=asOther,proto3,oneof"` +} + +func (*DigestItem_AsChangesTrieRoot) isDigestItem_Item() {} + +func (*DigestItem_AsPreRuntime) isDigestItem_Item() {} + +func (*DigestItem_AsConsensus) isDigestItem_Item() {} + +func (*DigestItem_AsSeal) isDigestItem_Item() {} + +func (*DigestItem_AsChangesTrieSignal) isDigestItem_Item() {} + +func (*DigestItem_AsOther) isDigestItem_Item() {} + +type PreRuntime struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ConsensusEngineId uint32 `protobuf:"varint,1,opt,name=consensus_engine_id,json=consensusEngineId,proto3" json:"consensus_engine_id,omitempty"` + Bytes []byte `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"` +} + +func (x *PreRuntime) Reset() { + *x = PreRuntime{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PreRuntime) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreRuntime) ProtoMessage() {} + +func (x *PreRuntime) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[3] + 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 PreRuntime.ProtoReflect.Descriptor instead. +func (*PreRuntime) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{3} +} + +func (x *PreRuntime) GetConsensusEngineId() uint32 { + if x != nil { + return x.ConsensusEngineId + } + return 0 +} + +func (x *PreRuntime) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +type Consensus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ConsensusEngineId uint32 `protobuf:"varint,1,opt,name=consensus_engine_id,json=consensusEngineId,proto3" json:"consensus_engine_id,omitempty"` + Bytes []byte `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"` +} + +func (x *Consensus) Reset() { + *x = Consensus{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Consensus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Consensus) ProtoMessage() {} + +func (x *Consensus) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[4] + 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 Consensus.ProtoReflect.Descriptor instead. +func (*Consensus) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{4} +} + +func (x *Consensus) GetConsensusEngineId() uint32 { + if x != nil { + return x.ConsensusEngineId + } + return 0 +} + +func (x *Consensus) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +type Seal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ConsensusEngineId uint32 `protobuf:"varint,1,opt,name=consensus_engine_id,json=consensusEngineId,proto3" json:"consensus_engine_id,omitempty"` + Bytes []byte `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"` +} + +func (x *Seal) Reset() { + *x = Seal{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Seal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Seal) ProtoMessage() {} + +func (x *Seal) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[5] + 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 Seal.ProtoReflect.Descriptor instead. +func (*Seal) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{5} +} + +func (x *Seal) GetConsensusEngineId() uint32 { + if x != nil { + return x.ConsensusEngineId + } + return 0 +} + +func (x *Seal) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +type ChangesTrieSignal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsNewConfiguration bool `protobuf:"varint,1,opt,name=is_new_configuration,json=isNewConfiguration,proto3" json:"is_new_configuration,omitempty"` + AsNewConfiguration []byte `protobuf:"bytes,2,opt,name=as_new_configuration,json=asNewConfiguration,proto3" json:"as_new_configuration,omitempty"` +} + +func (x *ChangesTrieSignal) Reset() { + *x = ChangesTrieSignal{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangesTrieSignal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangesTrieSignal) ProtoMessage() {} + +func (x *ChangesTrieSignal) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[6] + 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 ChangesTrieSignal.ProtoReflect.Descriptor instead. +func (*ChangesTrieSignal) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{6} +} + +func (x *ChangesTrieSignal) GetIsNewConfiguration() bool { + if x != nil { + return x.IsNewConfiguration + } + return false +} + +func (x *ChangesTrieSignal) GetAsNewConfiguration() []byte { + if x != nil { + return x.AsNewConfiguration + } + return nil +} + +type Extrinsic struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Method *Call `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` +} + +func (x *Extrinsic) Reset() { + *x = Extrinsic{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Extrinsic) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Extrinsic) ProtoMessage() {} + +func (x *Extrinsic) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[7] + 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 Extrinsic.ProtoReflect.Descriptor instead. +func (*Extrinsic) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{7} +} + +func (x *Extrinsic) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *Extrinsic) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Extrinsic) GetMethod() *Call { + if x != nil { + return x.Method + } + return nil +} + +type Signature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signer *MultiAddress `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + Signature *MultiSignature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Era *ExtrinsicEra `protobuf:"bytes,3,opt,name=era,proto3" json:"era,omitempty"` + // big.Int + Nonce string `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` + // big.Int + Tip string `protobuf:"bytes,5,opt,name=tip,proto3" json:"tip,omitempty"` +} + +func (x *Signature) Reset() { + *x = Signature{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Signature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Signature) ProtoMessage() {} + +func (x *Signature) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[8] + 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 Signature.ProtoReflect.Descriptor instead. +func (*Signature) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{8} +} + +func (x *Signature) GetSigner() *MultiAddress { + if x != nil { + return x.Signer + } + return nil +} + +func (x *Signature) GetSignature() *MultiSignature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Signature) GetEra() *ExtrinsicEra { + if x != nil { + return x.Era + } + return nil +} + +func (x *Signature) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *Signature) GetTip() string { + if x != nil { + return x.Tip + } + return "" +} + +type MultiAddress struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsId bool `protobuf:"varint,1,opt,name=is_id,json=isId,proto3" json:"is_id,omitempty"` + // [32]byte + AsId string `protobuf:"bytes,2,opt,name=as_id,json=asId,proto3" json:"as_id,omitempty"` + IsIndex bool `protobuf:"varint,3,opt,name=is_index,json=isIndex,proto3" json:"is_index,omitempty"` + AsIndex uint32 `protobuf:"varint,4,opt,name=as_index,json=asIndex,proto3" json:"as_index,omitempty"` + IsRaw bool `protobuf:"varint,5,opt,name=is_raw,json=isRaw,proto3" json:"is_raw,omitempty"` + // []byte + AsRaw string `protobuf:"bytes,6,opt,name=as_raw,json=asRaw,proto3" json:"as_raw,omitempty"` + IsAddress_32 bool `protobuf:"varint,7,opt,name=is_address_32,json=isAddress32,proto3" json:"is_address_32,omitempty"` + // []byte + AsAddress_32 string `protobuf:"bytes,8,opt,name=as_address_32,json=asAddress32,proto3" json:"as_address_32,omitempty"` + IsAddress_20 bool `protobuf:"varint,9,opt,name=is_address_20,json=isAddress20,proto3" json:"is_address_20,omitempty"` + // [20]byte + AsAddress_20 string `protobuf:"bytes,10,opt,name=as_address_20,json=asAddress20,proto3" json:"as_address_20,omitempty"` +} + +func (x *MultiAddress) Reset() { + *x = MultiAddress{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MultiAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MultiAddress) ProtoMessage() {} + +func (x *MultiAddress) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[9] + 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 MultiAddress.ProtoReflect.Descriptor instead. +func (*MultiAddress) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{9} +} + +func (x *MultiAddress) GetIsId() bool { + if x != nil { + return x.IsId + } + return false +} + +func (x *MultiAddress) GetAsId() string { + if x != nil { + return x.AsId + } + return "" +} + +func (x *MultiAddress) GetIsIndex() bool { + if x != nil { + return x.IsIndex + } + return false +} + +func (x *MultiAddress) GetAsIndex() uint32 { + if x != nil { + return x.AsIndex + } + return 0 +} + +func (x *MultiAddress) GetIsRaw() bool { + if x != nil { + return x.IsRaw + } + return false +} + +func (x *MultiAddress) GetAsRaw() string { + if x != nil { + return x.AsRaw + } + return "" +} + +func (x *MultiAddress) GetIsAddress_32() bool { + if x != nil { + return x.IsAddress_32 + } + return false +} + +func (x *MultiAddress) GetAsAddress_32() string { + if x != nil { + return x.AsAddress_32 + } + return "" +} + +func (x *MultiAddress) GetIsAddress_20() bool { + if x != nil { + return x.IsAddress_20 + } + return false +} + +func (x *MultiAddress) GetAsAddress_20() string { + if x != nil { + return x.AsAddress_20 + } + return "" +} + +type MultiSignature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsEd_25519 bool `protobuf:"varint,1,opt,name=is_ed_25519,json=isEd25519,proto3" json:"is_ed_25519,omitempty"` + // [64]byte + AsEd_25519 string `protobuf:"bytes,2,opt,name=as_ed_25519,json=asEd25519,proto3" json:"as_ed_25519,omitempty"` + IsSr_25519 bool `protobuf:"varint,3,opt,name=is_sr_25519,json=isSr25519,proto3" json:"is_sr_25519,omitempty"` + // [64]byte + AsSr_25519 string `protobuf:"bytes,4,opt,name=as_sr_25519,json=asSr25519,proto3" json:"as_sr_25519,omitempty"` + IsEcdsa bool `protobuf:"varint,5,opt,name=is_ecdsa,json=isEcdsa,proto3" json:"is_ecdsa,omitempty"` + // [65]byte + AsEcdsa string `protobuf:"bytes,6,opt,name=as_ecdsa,json=asEcdsa,proto3" json:"as_ecdsa,omitempty"` +} + +func (x *MultiSignature) Reset() { + *x = MultiSignature{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MultiSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MultiSignature) ProtoMessage() {} + +func (x *MultiSignature) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[10] + 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 MultiSignature.ProtoReflect.Descriptor instead. +func (*MultiSignature) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{10} +} + +func (x *MultiSignature) GetIsEd_25519() bool { + if x != nil { + return x.IsEd_25519 + } + return false +} + +func (x *MultiSignature) GetAsEd_25519() string { + if x != nil { + return x.AsEd_25519 + } + return "" +} + +func (x *MultiSignature) GetIsSr_25519() bool { + if x != nil { + return x.IsSr_25519 + } + return false +} + +func (x *MultiSignature) GetAsSr_25519() string { + if x != nil { + return x.AsSr_25519 + } + return "" +} + +func (x *MultiSignature) GetIsEcdsa() bool { + if x != nil { + return x.IsEcdsa + } + return false +} + +func (x *MultiSignature) GetAsEcdsa() string { + if x != nil { + return x.AsEcdsa + } + return "" +} + +type ExtrinsicEra struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsImmortalEra bool `protobuf:"varint,1,opt,name=is_immortal_era,json=isImmortalEra,proto3" json:"is_immortal_era,omitempty"` + IsMortalEra bool `protobuf:"varint,2,opt,name=is_mortal_era,json=isMortalEra,proto3" json:"is_mortal_era,omitempty"` + AsMortalEra *MortalEra `protobuf:"bytes,3,opt,name=as_mortal_era,json=asMortalEra,proto3" json:"as_mortal_era,omitempty"` +} + +func (x *ExtrinsicEra) Reset() { + *x = ExtrinsicEra{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExtrinsicEra) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtrinsicEra) ProtoMessage() {} + +func (x *ExtrinsicEra) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[11] + 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 ExtrinsicEra.ProtoReflect.Descriptor instead. +func (*ExtrinsicEra) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{11} +} + +func (x *ExtrinsicEra) GetIsImmortalEra() bool { + if x != nil { + return x.IsImmortalEra + } + return false +} + +func (x *ExtrinsicEra) GetIsMortalEra() bool { + if x != nil { + return x.IsMortalEra + } + return false +} + +func (x *ExtrinsicEra) GetAsMortalEra() *MortalEra { + if x != nil { + return x.AsMortalEra + } + return nil +} + +type Call struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CallIndex *CallIndex `protobuf:"bytes,1,opt,name=call_index,json=callIndex,proto3" json:"call_index,omitempty"` + Args []byte `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"` +} + +func (x *Call) Reset() { + *x = Call{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Call) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Call) ProtoMessage() {} + +func (x *Call) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[12] + 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 Call.ProtoReflect.Descriptor instead. +func (*Call) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{12} +} + +func (x *Call) GetCallIndex() *CallIndex { + if x != nil { + return x.CallIndex + } + return nil +} + +func (x *Call) GetArgs() []byte { + if x != nil { + return x.Args + } + return nil +} + +type Field struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + LookupIndex int64 `protobuf:"varint,2,opt,name=lookup_index,json=lookupIndex,proto3" json:"lookup_index,omitempty"` + // Types that are assignable to Value: + // + // *Field_JsonValue + // *Field_Fields + Value isField_Value `protobuf_oneof:"value"` +} + +func (x *Field) Reset() { + *x = Field{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Field) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Field) ProtoMessage() {} + +func (x *Field) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[13] + 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 Field.ProtoReflect.Descriptor instead. +func (*Field) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{13} +} + +func (x *Field) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Field) GetLookupIndex() int64 { + if x != nil { + return x.LookupIndex + } + return 0 +} + +func (m *Field) GetValue() isField_Value { + if m != nil { + return m.Value + } + return nil +} + +func (x *Field) GetJsonValue() string { + if x, ok := x.GetValue().(*Field_JsonValue); ok { + return x.JsonValue + } + return "" +} + +func (x *Field) GetFields() *Fields { + if x, ok := x.GetValue().(*Field_Fields); ok { + return x.Fields + } + return nil +} + +type isField_Value interface { + isField_Value() +} + +type Field_JsonValue struct { + JsonValue string `protobuf:"bytes,3,opt,name=json_value,json=jsonValue,proto3,oneof"` +} + +type Field_Fields struct { + Fields *Fields `protobuf:"bytes,4,opt,name=fields,proto3,oneof"` +} + +func (*Field_JsonValue) isField_Value() {} + +func (*Field_Fields) isField_Value() {} + +type Fields struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value []*Field `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` +} + +func (x *Fields) Reset() { + *x = Fields{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Fields) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Fields) ProtoMessage() {} + +func (x *Fields) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[14] + 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 Fields.ProtoReflect.Descriptor instead. +func (*Fields) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{14} +} + +func (x *Fields) GetValue() []*Field { + if x != nil { + return x.Value + } + return nil +} + +type CallIndex struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SectionIndex uint32 `protobuf:"varint,1,opt,name=section_index,json=sectionIndex,proto3" json:"section_index,omitempty"` + MethodIndex uint32 `protobuf:"varint,2,opt,name=method_index,json=methodIndex,proto3" json:"method_index,omitempty"` +} + +func (x *CallIndex) Reset() { + *x = CallIndex{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CallIndex) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CallIndex) ProtoMessage() {} + +func (x *CallIndex) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[15] + 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 CallIndex.ProtoReflect.Descriptor instead. +func (*CallIndex) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{15} +} + +func (x *CallIndex) GetSectionIndex() uint32 { + if x != nil { + return x.SectionIndex + } + return 0 +} + +func (x *CallIndex) GetMethodIndex() uint32 { + if x != nil { + return x.MethodIndex + } + return 0 +} + +type Event struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Fields []*Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"` + // [2]byte + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + Phase *Phase `protobuf:"bytes,4,opt,name=phase,proto3" json:"phase,omitempty"` + // [32]byte + Topics []string `protobuf:"bytes,5,rep,name=topics,proto3" json:"topics,omitempty"` +} + +func (x *Event) Reset() { + *x = Event{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[16] + 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 Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{16} +} + +func (x *Event) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Event) GetFields() []*Field { + if x != nil { + return x.Fields + } + return nil +} + +func (x *Event) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Event) GetPhase() *Phase { + if x != nil { + return x.Phase + } + return nil +} + +func (x *Event) GetTopics() []string { + if x != nil { + return x.Topics + } + return nil +} + +type Phase struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsApplyExtrinsic bool `protobuf:"varint,1,opt,name=is_apply_extrinsic,json=isApplyExtrinsic,proto3" json:"is_apply_extrinsic,omitempty"` + AsApplyExtrinsic uint32 `protobuf:"varint,2,opt,name=as_apply_extrinsic,json=asApplyExtrinsic,proto3" json:"as_apply_extrinsic,omitempty"` + IsFinalization bool `protobuf:"varint,3,opt,name=is_finalization,json=isFinalization,proto3" json:"is_finalization,omitempty"` + IsInitialization bool `protobuf:"varint,4,opt,name=is_initialization,json=isInitialization,proto3" json:"is_initialization,omitempty"` +} + +func (x *Phase) Reset() { + *x = Phase{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Phase) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Phase) ProtoMessage() {} + +func (x *Phase) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[17] + 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 Phase.ProtoReflect.Descriptor instead. +func (*Phase) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{17} +} + +func (x *Phase) GetIsApplyExtrinsic() bool { + if x != nil { + return x.IsApplyExtrinsic + } + return false +} + +func (x *Phase) GetAsApplyExtrinsic() uint32 { + if x != nil { + return x.AsApplyExtrinsic + } + return 0 +} + +func (x *Phase) GetIsFinalization() bool { + if x != nil { + return x.IsFinalization + } + return false +} + +func (x *Phase) GetIsInitialization() bool { + if x != nil { + return x.IsInitialization + } + return false +} + +type SignatureDef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsEd25519 bool `protobuf:"varint,1,opt,name=is_ed25519,json=isEd25519,proto3" json:"is_ed25519,omitempty"` + // [64]byte + AsEd25519 string `protobuf:"bytes,2,opt,name=as_ed25519,json=asEd25519,proto3" json:"as_ed25519,omitempty"` + IsSr25519 bool `protobuf:"varint,3,opt,name=is_sr25519,json=isSr25519,proto3" json:"is_sr25519,omitempty"` + // [64]byte + AsSr25519 string `protobuf:"bytes,4,opt,name=as_sr25519,json=asSr25519,proto3" json:"as_sr25519,omitempty"` + IsEcdsa bool `protobuf:"varint,5,opt,name=is_ecdsa,json=isEcdsa,proto3" json:"is_ecdsa,omitempty"` + // [65]byte + AsEcdsa string `protobuf:"bytes,6,opt,name=as_ecdsa,json=asEcdsa,proto3" json:"as_ecdsa,omitempty"` +} + +func (x *SignatureDef) Reset() { + *x = SignatureDef{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignatureDef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignatureDef) ProtoMessage() {} + +func (x *SignatureDef) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[18] + 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 SignatureDef.ProtoReflect.Descriptor instead. +func (*SignatureDef) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{18} +} + +func (x *SignatureDef) GetIsEd25519() bool { + if x != nil { + return x.IsEd25519 + } + return false +} + +func (x *SignatureDef) GetAsEd25519() string { + if x != nil { + return x.AsEd25519 + } + return "" +} + +func (x *SignatureDef) GetIsSr25519() bool { + if x != nil { + return x.IsSr25519 + } + return false +} + +func (x *SignatureDef) GetAsSr25519() string { + if x != nil { + return x.AsSr25519 + } + return "" +} + +func (x *SignatureDef) GetIsEcdsa() bool { + if x != nil { + return x.IsEcdsa + } + return false +} + +func (x *SignatureDef) GetAsEcdsa() string { + if x != nil { + return x.AsEcdsa + } + return "" +} + +type MortalEra struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + First uint32 `protobuf:"varint,1,opt,name=first,proto3" json:"first,omitempty"` + Second uint32 `protobuf:"varint,2,opt,name=second,proto3" json:"second,omitempty"` +} + +func (x *MortalEra) Reset() { + *x = MortalEra{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MortalEra) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MortalEra) ProtoMessage() {} + +func (x *MortalEra) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[19] + 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 MortalEra.ProtoReflect.Descriptor instead. +func (*MortalEra) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{19} +} + +func (x *MortalEra) GetFirst() uint32 { + if x != nil { + return x.First + } + return 0 +} + +func (x *MortalEra) GetSecond() uint32 { + if x != nil { + return x.Second + } + return 0 +} + +type PaymentFields struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // big.Int + Tip string `protobuf:"bytes,1,opt,name=tip,proto3" json:"tip,omitempty"` +} + +func (x *PaymentFields) Reset() { + *x = PaymentFields{} + if protoimpl.UnsafeEnabled { + mi := &file_block_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PaymentFields) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentFields) ProtoMessage() {} + +func (x *PaymentFields) ProtoReflect() protoreflect.Message { + mi := &file_block_proto_msgTypes[20] + 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 PaymentFields.ProtoReflect.Descriptor instead. +func (*PaymentFields) Descriptor() ([]byte, []int) { + return file_block_proto_rawDescGZIP(), []int{20} +} + +func (x *PaymentFields) GetTip() string { + if x != nil { + return x.Tip + } + return "" +} + +var File_block_proto protoreflect.FileDescriptor + +var file_block_proto_rawDesc = []byte{ + 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, + 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x22, 0xb6, + 0x02, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x68, 0x61, 0x73, 0x68, 0x12, 0x2f, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, + 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x66, 0x2e, 0x67, + 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x74, 0x72, + 0x69, 0x6e, 0x73, 0x69, 0x63, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, + 0x73, 0x12, 0x2e, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x3e, 0x0a, 0x0c, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, + 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, + 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0b, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x71, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, 0x5f, + 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x72, + 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0xf7, 0x02, 0x0a, 0x0a, 0x44, + 0x69, 0x67, 0x65, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x31, 0x0a, 0x14, 0x61, 0x73, 0x5f, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x5f, 0x74, 0x72, 0x69, 0x65, 0x5f, 0x72, 0x6f, 0x6f, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x61, 0x73, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x54, 0x72, 0x69, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x43, 0x0a, 0x0e, + 0x61, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x73, 0x50, 0x72, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, + 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x12, 0x30, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x73, 0x65, 0x61, 0x6c, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x06, 0x61, 0x73, + 0x53, 0x65, 0x61, 0x6c, 0x12, 0x59, 0x0a, 0x16, 0x61, 0x73, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x5f, 0x74, 0x72, 0x69, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x54, 0x72, + 0x69, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x13, 0x61, 0x73, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x54, 0x72, 0x69, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, + 0x1b, 0x0a, 0x08, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0c, 0x48, 0x00, 0x52, 0x07, 0x61, 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x42, 0x06, 0x0a, 0x04, + 0x49, 0x74, 0x65, 0x6d, 0x22, 0x52, 0x0a, 0x0a, 0x50, 0x72, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, + 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x11, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, + 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x51, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x45, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x4c, 0x0a, 0x04, 0x53, + 0x65, 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, + 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x45, 0x6e, 0x67, 0x69, 0x6e, + 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x77, 0x0a, 0x11, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x54, 0x72, 0x69, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x30, + 0x0a, 0x14, 0x69, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x73, + 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x30, 0x0a, 0x14, 0x61, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, + 0x61, 0x73, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x8e, 0x01, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x06, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x22, 0xda, 0x01, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x66, + 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x75, + 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2f, 0x0a, 0x03, 0x65, 0x72, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, + 0x45, 0x72, 0x61, 0x52, 0x03, 0x65, 0x72, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x69, 0x70, + 0x22, 0xac, 0x02, 0x0a, 0x0c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x13, 0x0a, 0x05, 0x69, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x04, 0x69, 0x73, 0x49, 0x64, 0x12, 0x13, 0x0a, 0x05, 0x61, 0x73, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x69, + 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, + 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x61, 0x73, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x69, 0x73, 0x52, 0x61, 0x77, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x72, + 0x61, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x52, 0x61, 0x77, 0x12, + 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x33, 0x32, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x33, 0x32, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x5f, 0x33, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x73, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x33, 0x32, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x32, 0x30, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x69, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0x30, 0x12, 0x22, 0x0a, 0x0d, 0x61, + 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x32, 0x30, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x61, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0x30, 0x22, + 0xc6, 0x01, 0x0a, 0x0e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x65, 0x64, 0x5f, 0x32, 0x35, 0x35, 0x31, + 0x39, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x64, 0x32, 0x35, 0x35, + 0x31, 0x39, 0x12, 0x1e, 0x0a, 0x0b, 0x61, 0x73, 0x5f, 0x65, 0x64, 0x5f, 0x32, 0x35, 0x35, 0x31, + 0x39, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x45, 0x64, 0x32, 0x35, 0x35, + 0x31, 0x39, 0x12, 0x1e, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x73, 0x72, 0x5f, 0x32, 0x35, 0x35, 0x31, + 0x39, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x72, 0x32, 0x35, 0x35, + 0x31, 0x39, 0x12, 0x1e, 0x0a, 0x0b, 0x61, 0x73, 0x5f, 0x73, 0x72, 0x5f, 0x32, 0x35, 0x35, 0x31, + 0x39, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x53, 0x72, 0x32, 0x35, 0x35, + 0x31, 0x39, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x65, 0x63, 0x64, 0x73, 0x61, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x45, 0x63, 0x64, 0x73, 0x61, 0x12, 0x19, 0x0a, + 0x08, 0x61, 0x73, 0x5f, 0x65, 0x63, 0x64, 0x73, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x73, 0x45, 0x63, 0x64, 0x73, 0x61, 0x22, 0x9a, 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x74, + 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x45, 0x72, 0x61, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x73, 0x5f, + 0x69, 0x6d, 0x6d, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x49, 0x6d, 0x6d, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x45, 0x72, + 0x61, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x6d, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5f, 0x65, + 0x72, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x4d, 0x6f, 0x72, 0x74, + 0x61, 0x6c, 0x45, 0x72, 0x61, 0x12, 0x3e, 0x0a, 0x0d, 0x61, 0x73, 0x5f, 0x6d, 0x6f, 0x72, 0x74, + 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, + 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x61, 0x52, 0x0b, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x74, + 0x61, 0x6c, 0x45, 0x72, 0x61, 0x22, 0x55, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x39, 0x0a, + 0x0a, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x09, 0x63, + 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x9b, 0x01, 0x0a, + 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x6f, + 0x6f, 0x6b, 0x75, 0x70, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0b, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1f, 0x0a, + 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x31, + 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x48, 0x00, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x73, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x36, 0x0a, 0x06, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x53, 0x0a, 0x09, 0x43, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xa1, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, + 0x61, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x22, 0xb9, 0x01, 0x0a, 0x05, + 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x61, 0x70, 0x70, 0x6c, + 0x79, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x10, 0x69, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x45, 0x78, 0x74, 0x72, 0x69, 0x6e, + 0x73, 0x69, 0x63, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x73, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x5f, + 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x10, 0x61, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x45, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, + 0x63, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x46, 0x69, + 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x73, + 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc0, 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x65, 0x66, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x65, + 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, + 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x65, 0x64, + 0x32, 0x35, 0x35, 0x31, 0x39, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x45, + 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x72, 0x32, + 0x35, 0x35, 0x31, 0x39, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x72, + 0x32, 0x35, 0x35, 0x31, 0x39, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x73, 0x72, 0x32, 0x35, + 0x35, 0x31, 0x39, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x53, 0x72, 0x32, + 0x35, 0x35, 0x31, 0x39, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x65, 0x63, 0x64, 0x73, 0x61, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x45, 0x63, 0x64, 0x73, 0x61, 0x12, + 0x19, 0x0a, 0x08, 0x61, 0x73, 0x5f, 0x65, 0x63, 0x64, 0x73, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x73, 0x45, 0x63, 0x64, 0x73, 0x61, 0x22, 0x39, 0x0a, 0x09, 0x4d, 0x6f, + 0x72, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x21, 0x0a, 0x0d, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x69, 0x70, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, + 0x66, 0x61, 0x73, 0x74, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x68, 0x6f, 0x73, 0x65, 0x2d, 0x67, 0x65, + 0x61, 0x72, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x67, 0x65, 0x61, 0x72, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_block_proto_rawDescOnce sync.Once + file_block_proto_rawDescData = file_block_proto_rawDesc +) + +func file_block_proto_rawDescGZIP() []byte { + file_block_proto_rawDescOnce.Do(func() { + file_block_proto_rawDescData = protoimpl.X.CompressGZIP(file_block_proto_rawDescData) + }) + return file_block_proto_rawDescData +} + +var file_block_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_block_proto_goTypes = []interface{}{ + (*Block)(nil), // 0: sf.gear.type.v1.Block + (*Header)(nil), // 1: sf.gear.type.v1.Header + (*DigestItem)(nil), // 2: sf.gear.type.v1.DigestItem + (*PreRuntime)(nil), // 3: sf.gear.type.v1.PreRuntime + (*Consensus)(nil), // 4: sf.gear.type.v1.Consensus + (*Seal)(nil), // 5: sf.gear.type.v1.Seal + (*ChangesTrieSignal)(nil), // 6: sf.gear.type.v1.ChangesTrieSignal + (*Extrinsic)(nil), // 7: sf.gear.type.v1.Extrinsic + (*Signature)(nil), // 8: sf.gear.type.v1.Signature + (*MultiAddress)(nil), // 9: sf.gear.type.v1.MultiAddress + (*MultiSignature)(nil), // 10: sf.gear.type.v1.MultiSignature + (*ExtrinsicEra)(nil), // 11: sf.gear.type.v1.ExtrinsicEra + (*Call)(nil), // 12: sf.gear.type.v1.Call + (*Field)(nil), // 13: sf.gear.type.v1.Field + (*Fields)(nil), // 14: sf.gear.type.v1.Fields + (*CallIndex)(nil), // 15: sf.gear.type.v1.CallIndex + (*Event)(nil), // 16: sf.gear.type.v1.Event + (*Phase)(nil), // 17: sf.gear.type.v1.Phase + (*SignatureDef)(nil), // 18: sf.gear.type.v1.SignatureDef + (*MortalEra)(nil), // 19: sf.gear.type.v1.MortalEra + (*PaymentFields)(nil), // 20: sf.gear.type.v1.PaymentFields +} +var file_block_proto_depIdxs = []int32{ + 1, // 0: sf.gear.type.v1.Block.header:type_name -> sf.gear.type.v1.Header + 7, // 1: sf.gear.type.v1.Block.extrinsics:type_name -> sf.gear.type.v1.Extrinsic + 16, // 2: sf.gear.type.v1.Block.events:type_name -> sf.gear.type.v1.Event + 2, // 3: sf.gear.type.v1.Block.digest_items:type_name -> sf.gear.type.v1.DigestItem + 3, // 4: sf.gear.type.v1.DigestItem.as_pre_runtime:type_name -> sf.gear.type.v1.PreRuntime + 4, // 5: sf.gear.type.v1.DigestItem.as_consensus:type_name -> sf.gear.type.v1.Consensus + 5, // 6: sf.gear.type.v1.DigestItem.as_seal:type_name -> sf.gear.type.v1.Seal + 6, // 7: sf.gear.type.v1.DigestItem.as_changes_trie_signal:type_name -> sf.gear.type.v1.ChangesTrieSignal + 8, // 8: sf.gear.type.v1.Extrinsic.signature:type_name -> sf.gear.type.v1.Signature + 12, // 9: sf.gear.type.v1.Extrinsic.method:type_name -> sf.gear.type.v1.Call + 9, // 10: sf.gear.type.v1.Signature.signer:type_name -> sf.gear.type.v1.MultiAddress + 10, // 11: sf.gear.type.v1.Signature.signature:type_name -> sf.gear.type.v1.MultiSignature + 11, // 12: sf.gear.type.v1.Signature.era:type_name -> sf.gear.type.v1.ExtrinsicEra + 19, // 13: sf.gear.type.v1.ExtrinsicEra.as_mortal_era:type_name -> sf.gear.type.v1.MortalEra + 15, // 14: sf.gear.type.v1.Call.call_index:type_name -> sf.gear.type.v1.CallIndex + 14, // 15: sf.gear.type.v1.Field.fields:type_name -> sf.gear.type.v1.Fields + 13, // 16: sf.gear.type.v1.Fields.value:type_name -> sf.gear.type.v1.Field + 13, // 17: sf.gear.type.v1.Event.fields:type_name -> sf.gear.type.v1.Field + 17, // 18: sf.gear.type.v1.Event.phase:type_name -> sf.gear.type.v1.Phase + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_block_proto_init() } +func file_block_proto_init() { + if File_block_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_block_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Block); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Header); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DigestItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PreRuntime); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Consensus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Seal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChangesTrieSignal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Extrinsic); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Signature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MultiAddress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MultiSignature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExtrinsicEra); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Call); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Field); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Fields); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CallIndex); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Phase); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignatureDef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MortalEra); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_block_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PaymentFields); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_block_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*DigestItem_AsChangesTrieRoot)(nil), + (*DigestItem_AsPreRuntime)(nil), + (*DigestItem_AsConsensus)(nil), + (*DigestItem_AsSeal)(nil), + (*DigestItem_AsChangesTrieSignal)(nil), + (*DigestItem_AsOther)(nil), + } + file_block_proto_msgTypes[13].OneofWrappers = []interface{}{ + (*Field_JsonValue)(nil), + (*Field_Fields)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_block_proto_rawDesc, + NumEnums: 0, + NumMessages: 21, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_block_proto_goTypes, + DependencyIndexes: file_block_proto_depIdxs, + MessageInfos: file_block_proto_msgTypes, + }.Build() + File_block_proto = out.File + file_block_proto_rawDesc = nil + file_block_proto_goTypes = nil + file_block_proto_depIdxs = nil +} diff --git a/vara-common/pb/block_vtproto.pb.go b/vara-common/pb/block_vtproto.pb.go new file mode 100644 index 0000000..7fa3bd4 --- /dev/null +++ b/vara-common/pb/block_vtproto.pb.go @@ -0,0 +1,11526 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.6.0 +// source: block.proto + +package pbgear + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + proto "google.golang.org/protobuf/proto" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + unsafe "unsafe" +) + +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) +) + +func (m *Block) CloneVT() *Block { + if m == nil { + return (*Block)(nil) + } + r := new(Block) + r.Number = m.Number + r.Hash = m.Hash + r.Header = m.Header.CloneVT() + if rhs := m.Extrinsics; rhs != nil { + tmpContainer := make([]*Extrinsic, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Extrinsics = tmpContainer + } + if rhs := m.Events; rhs != nil { + tmpContainer := make([]*Event, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Events = tmpContainer + } + if rhs := m.DigestItems; rhs != nil { + tmpContainer := make([]*DigestItem, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.DigestItems = tmpContainer + } + if rhs := m.Justification; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Justification = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Block) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Header) CloneVT() *Header { + if m == nil { + return (*Header)(nil) + } + r := new(Header) + r.ParentHash = m.ParentHash + r.StateRoot = m.StateRoot + r.ExtrinsicsRoot = m.ExtrinsicsRoot + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Header) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DigestItem) CloneVT() *DigestItem { + if m == nil { + return (*DigestItem)(nil) + } + r := new(DigestItem) + if m.Item != nil { + r.Item = m.Item.(interface{ CloneVT() isDigestItem_Item }).CloneVT() + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DigestItem) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DigestItem_AsChangesTrieRoot) CloneVT() isDigestItem_Item { + if m == nil { + return (*DigestItem_AsChangesTrieRoot)(nil) + } + r := new(DigestItem_AsChangesTrieRoot) + r.AsChangesTrieRoot = m.AsChangesTrieRoot + return r +} + +func (m *DigestItem_AsPreRuntime) CloneVT() isDigestItem_Item { + if m == nil { + return (*DigestItem_AsPreRuntime)(nil) + } + r := new(DigestItem_AsPreRuntime) + r.AsPreRuntime = m.AsPreRuntime.CloneVT() + return r +} + +func (m *DigestItem_AsConsensus) CloneVT() isDigestItem_Item { + if m == nil { + return (*DigestItem_AsConsensus)(nil) + } + r := new(DigestItem_AsConsensus) + r.AsConsensus = m.AsConsensus.CloneVT() + return r +} + +func (m *DigestItem_AsSeal) CloneVT() isDigestItem_Item { + if m == nil { + return (*DigestItem_AsSeal)(nil) + } + r := new(DigestItem_AsSeal) + r.AsSeal = m.AsSeal.CloneVT() + return r +} + +func (m *DigestItem_AsChangesTrieSignal) CloneVT() isDigestItem_Item { + if m == nil { + return (*DigestItem_AsChangesTrieSignal)(nil) + } + r := new(DigestItem_AsChangesTrieSignal) + r.AsChangesTrieSignal = m.AsChangesTrieSignal.CloneVT() + return r +} + +func (m *DigestItem_AsOther) CloneVT() isDigestItem_Item { + if m == nil { + return (*DigestItem_AsOther)(nil) + } + r := new(DigestItem_AsOther) + if rhs := m.AsOther; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.AsOther = tmpBytes + } + return r +} + +func (m *PreRuntime) CloneVT() *PreRuntime { + if m == nil { + return (*PreRuntime)(nil) + } + r := new(PreRuntime) + r.ConsensusEngineId = m.ConsensusEngineId + if rhs := m.Bytes; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Bytes = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *PreRuntime) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Consensus) CloneVT() *Consensus { + if m == nil { + return (*Consensus)(nil) + } + r := new(Consensus) + r.ConsensusEngineId = m.ConsensusEngineId + if rhs := m.Bytes; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Bytes = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Consensus) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Seal) CloneVT() *Seal { + if m == nil { + return (*Seal)(nil) + } + r := new(Seal) + r.ConsensusEngineId = m.ConsensusEngineId + if rhs := m.Bytes; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Bytes = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Seal) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ChangesTrieSignal) CloneVT() *ChangesTrieSignal { + if m == nil { + return (*ChangesTrieSignal)(nil) + } + r := new(ChangesTrieSignal) + r.IsNewConfiguration = m.IsNewConfiguration + if rhs := m.AsNewConfiguration; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.AsNewConfiguration = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ChangesTrieSignal) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Extrinsic) CloneVT() *Extrinsic { + if m == nil { + return (*Extrinsic)(nil) + } + r := new(Extrinsic) + r.Version = m.Version + r.Signature = m.Signature.CloneVT() + r.Method = m.Method.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Extrinsic) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Signature) CloneVT() *Signature { + if m == nil { + return (*Signature)(nil) + } + r := new(Signature) + r.Signer = m.Signer.CloneVT() + r.Signature = m.Signature.CloneVT() + r.Era = m.Era.CloneVT() + r.Nonce = m.Nonce + r.Tip = m.Tip + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Signature) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *MultiAddress) CloneVT() *MultiAddress { + if m == nil { + return (*MultiAddress)(nil) + } + r := new(MultiAddress) + r.IsId = m.IsId + r.AsId = m.AsId + r.IsIndex = m.IsIndex + r.AsIndex = m.AsIndex + r.IsRaw = m.IsRaw + r.AsRaw = m.AsRaw + r.IsAddress_32 = m.IsAddress_32 + r.AsAddress_32 = m.AsAddress_32 + r.IsAddress_20 = m.IsAddress_20 + r.AsAddress_20 = m.AsAddress_20 + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *MultiAddress) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *MultiSignature) CloneVT() *MultiSignature { + if m == nil { + return (*MultiSignature)(nil) + } + r := new(MultiSignature) + r.IsEd_25519 = m.IsEd_25519 + r.AsEd_25519 = m.AsEd_25519 + r.IsSr_25519 = m.IsSr_25519 + r.AsSr_25519 = m.AsSr_25519 + r.IsEcdsa = m.IsEcdsa + r.AsEcdsa = m.AsEcdsa + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *MultiSignature) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ExtrinsicEra) CloneVT() *ExtrinsicEra { + if m == nil { + return (*ExtrinsicEra)(nil) + } + r := new(ExtrinsicEra) + r.IsImmortalEra = m.IsImmortalEra + r.IsMortalEra = m.IsMortalEra + r.AsMortalEra = m.AsMortalEra.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ExtrinsicEra) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Call) CloneVT() *Call { + if m == nil { + return (*Call)(nil) + } + r := new(Call) + r.CallIndex = m.CallIndex.CloneVT() + if rhs := m.Args; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Args = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Call) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Field) CloneVT() *Field { + if m == nil { + return (*Field)(nil) + } + r := new(Field) + r.Name = m.Name + r.LookupIndex = m.LookupIndex + if m.Value != nil { + r.Value = m.Value.(interface{ CloneVT() isField_Value }).CloneVT() + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Field) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Field_JsonValue) CloneVT() isField_Value { + if m == nil { + return (*Field_JsonValue)(nil) + } + r := new(Field_JsonValue) + r.JsonValue = m.JsonValue + return r +} + +func (m *Field_Fields) CloneVT() isField_Value { + if m == nil { + return (*Field_Fields)(nil) + } + r := new(Field_Fields) + r.Fields = m.Fields.CloneVT() + return r +} + +func (m *Fields) CloneVT() *Fields { + if m == nil { + return (*Fields)(nil) + } + r := new(Fields) + if rhs := m.Value; rhs != nil { + tmpContainer := make([]*Field, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Value = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Fields) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *CallIndex) CloneVT() *CallIndex { + if m == nil { + return (*CallIndex)(nil) + } + r := new(CallIndex) + r.SectionIndex = m.SectionIndex + r.MethodIndex = m.MethodIndex + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *CallIndex) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Event) CloneVT() *Event { + if m == nil { + return (*Event)(nil) + } + r := new(Event) + r.Name = m.Name + r.Id = m.Id + r.Phase = m.Phase.CloneVT() + if rhs := m.Fields; rhs != nil { + tmpContainer := make([]*Field, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Fields = tmpContainer + } + if rhs := m.Topics; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.Topics = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Event) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Phase) CloneVT() *Phase { + if m == nil { + return (*Phase)(nil) + } + r := new(Phase) + r.IsApplyExtrinsic = m.IsApplyExtrinsic + r.AsApplyExtrinsic = m.AsApplyExtrinsic + r.IsFinalization = m.IsFinalization + r.IsInitialization = m.IsInitialization + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Phase) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *SignatureDef) CloneVT() *SignatureDef { + if m == nil { + return (*SignatureDef)(nil) + } + r := new(SignatureDef) + r.IsEd25519 = m.IsEd25519 + r.AsEd25519 = m.AsEd25519 + r.IsSr25519 = m.IsSr25519 + r.AsSr25519 = m.AsSr25519 + r.IsEcdsa = m.IsEcdsa + r.AsEcdsa = m.AsEcdsa + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *SignatureDef) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *MortalEra) CloneVT() *MortalEra { + if m == nil { + return (*MortalEra)(nil) + } + r := new(MortalEra) + r.First = m.First + r.Second = m.Second + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *MortalEra) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *PaymentFields) CloneVT() *PaymentFields { + if m == nil { + return (*PaymentFields)(nil) + } + r := new(PaymentFields) + r.Tip = m.Tip + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *PaymentFields) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (this *Block) EqualVT(that *Block) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Number != that.Number { + return false + } + if this.Hash != that.Hash { + return false + } + if !this.Header.EqualVT(that.Header) { + return false + } + if len(this.Extrinsics) != len(that.Extrinsics) { + return false + } + for i, vx := range this.Extrinsics { + vy := that.Extrinsics[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &Extrinsic{} + } + if q == nil { + q = &Extrinsic{} + } + if !p.EqualVT(q) { + return false + } + } + } + if len(this.Events) != len(that.Events) { + return false + } + for i, vx := range this.Events { + vy := that.Events[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &Event{} + } + if q == nil { + q = &Event{} + } + if !p.EqualVT(q) { + return false + } + } + } + if len(this.DigestItems) != len(that.DigestItems) { + return false + } + for i, vx := range this.DigestItems { + vy := that.DigestItems[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &DigestItem{} + } + if q == nil { + q = &DigestItem{} + } + if !p.EqualVT(q) { + return false + } + } + } + if string(this.Justification) != string(that.Justification) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Block) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Block) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Header) EqualVT(that *Header) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.ParentHash != that.ParentHash { + return false + } + if this.StateRoot != that.StateRoot { + return false + } + if this.ExtrinsicsRoot != that.ExtrinsicsRoot { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Header) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Header) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DigestItem) EqualVT(that *DigestItem) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Item == nil && that.Item != nil { + return false + } else if this.Item != nil { + if that.Item == nil { + return false + } + if !this.Item.(interface{ EqualVT(isDigestItem_Item) bool }).EqualVT(that.Item) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DigestItem) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DigestItem) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DigestItem_AsChangesTrieRoot) EqualVT(thatIface isDigestItem_Item) bool { + that, ok := thatIface.(*DigestItem_AsChangesTrieRoot) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if this.AsChangesTrieRoot != that.AsChangesTrieRoot { + return false + } + return true +} + +func (this *DigestItem_AsPreRuntime) EqualVT(thatIface isDigestItem_Item) bool { + that, ok := thatIface.(*DigestItem_AsPreRuntime) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.AsPreRuntime, that.AsPreRuntime; p != q { + if p == nil { + p = &PreRuntime{} + } + if q == nil { + q = &PreRuntime{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *DigestItem_AsConsensus) EqualVT(thatIface isDigestItem_Item) bool { + that, ok := thatIface.(*DigestItem_AsConsensus) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.AsConsensus, that.AsConsensus; p != q { + if p == nil { + p = &Consensus{} + } + if q == nil { + q = &Consensus{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *DigestItem_AsSeal) EqualVT(thatIface isDigestItem_Item) bool { + that, ok := thatIface.(*DigestItem_AsSeal) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.AsSeal, that.AsSeal; p != q { + if p == nil { + p = &Seal{} + } + if q == nil { + q = &Seal{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *DigestItem_AsChangesTrieSignal) EqualVT(thatIface isDigestItem_Item) bool { + that, ok := thatIface.(*DigestItem_AsChangesTrieSignal) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.AsChangesTrieSignal, that.AsChangesTrieSignal; p != q { + if p == nil { + p = &ChangesTrieSignal{} + } + if q == nil { + q = &ChangesTrieSignal{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *DigestItem_AsOther) EqualVT(thatIface isDigestItem_Item) bool { + that, ok := thatIface.(*DigestItem_AsOther) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if string(this.AsOther) != string(that.AsOther) { + return false + } + return true +} + +func (this *PreRuntime) EqualVT(that *PreRuntime) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.ConsensusEngineId != that.ConsensusEngineId { + return false + } + if string(this.Bytes) != string(that.Bytes) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *PreRuntime) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*PreRuntime) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Consensus) EqualVT(that *Consensus) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.ConsensusEngineId != that.ConsensusEngineId { + return false + } + if string(this.Bytes) != string(that.Bytes) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Consensus) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Consensus) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Seal) EqualVT(that *Seal) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.ConsensusEngineId != that.ConsensusEngineId { + return false + } + if string(this.Bytes) != string(that.Bytes) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Seal) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Seal) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ChangesTrieSignal) EqualVT(that *ChangesTrieSignal) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.IsNewConfiguration != that.IsNewConfiguration { + return false + } + if string(this.AsNewConfiguration) != string(that.AsNewConfiguration) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ChangesTrieSignal) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ChangesTrieSignal) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Extrinsic) EqualVT(that *Extrinsic) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Version != that.Version { + return false + } + if !this.Signature.EqualVT(that.Signature) { + return false + } + if !this.Method.EqualVT(that.Method) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Extrinsic) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Extrinsic) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Signature) EqualVT(that *Signature) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.Signer.EqualVT(that.Signer) { + return false + } + if !this.Signature.EqualVT(that.Signature) { + return false + } + if !this.Era.EqualVT(that.Era) { + return false + } + if this.Nonce != that.Nonce { + return false + } + if this.Tip != that.Tip { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Signature) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Signature) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *MultiAddress) EqualVT(that *MultiAddress) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.IsId != that.IsId { + return false + } + if this.AsId != that.AsId { + return false + } + if this.IsIndex != that.IsIndex { + return false + } + if this.AsIndex != that.AsIndex { + return false + } + if this.IsRaw != that.IsRaw { + return false + } + if this.AsRaw != that.AsRaw { + return false + } + if this.IsAddress_32 != that.IsAddress_32 { + return false + } + if this.AsAddress_32 != that.AsAddress_32 { + return false + } + if this.IsAddress_20 != that.IsAddress_20 { + return false + } + if this.AsAddress_20 != that.AsAddress_20 { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *MultiAddress) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*MultiAddress) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *MultiSignature) EqualVT(that *MultiSignature) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.IsEd_25519 != that.IsEd_25519 { + return false + } + if this.AsEd_25519 != that.AsEd_25519 { + return false + } + if this.IsSr_25519 != that.IsSr_25519 { + return false + } + if this.AsSr_25519 != that.AsSr_25519 { + return false + } + if this.IsEcdsa != that.IsEcdsa { + return false + } + if this.AsEcdsa != that.AsEcdsa { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *MultiSignature) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*MultiSignature) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ExtrinsicEra) EqualVT(that *ExtrinsicEra) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.IsImmortalEra != that.IsImmortalEra { + return false + } + if this.IsMortalEra != that.IsMortalEra { + return false + } + if !this.AsMortalEra.EqualVT(that.AsMortalEra) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ExtrinsicEra) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ExtrinsicEra) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Call) EqualVT(that *Call) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.CallIndex.EqualVT(that.CallIndex) { + return false + } + if string(this.Args) != string(that.Args) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Call) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Call) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Field) EqualVT(that *Field) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Value == nil && that.Value != nil { + return false + } else if this.Value != nil { + if that.Value == nil { + return false + } + if !this.Value.(interface{ EqualVT(isField_Value) bool }).EqualVT(that.Value) { + return false + } + } + if this.Name != that.Name { + return false + } + if this.LookupIndex != that.LookupIndex { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Field) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Field) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Field_JsonValue) EqualVT(thatIface isField_Value) bool { + that, ok := thatIface.(*Field_JsonValue) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if this.JsonValue != that.JsonValue { + return false + } + return true +} + +func (this *Field_Fields) EqualVT(thatIface isField_Value) bool { + that, ok := thatIface.(*Field_Fields) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.Fields, that.Fields; p != q { + if p == nil { + p = &Fields{} + } + if q == nil { + q = &Fields{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *Fields) EqualVT(that *Fields) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.Value) != len(that.Value) { + return false + } + for i, vx := range this.Value { + vy := that.Value[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &Field{} + } + if q == nil { + q = &Field{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Fields) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Fields) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *CallIndex) EqualVT(that *CallIndex) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.SectionIndex != that.SectionIndex { + return false + } + if this.MethodIndex != that.MethodIndex { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *CallIndex) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*CallIndex) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Event) EqualVT(that *Event) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Name != that.Name { + return false + } + if len(this.Fields) != len(that.Fields) { + return false + } + for i, vx := range this.Fields { + vy := that.Fields[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &Field{} + } + if q == nil { + q = &Field{} + } + if !p.EqualVT(q) { + return false + } + } + } + if this.Id != that.Id { + return false + } + if !this.Phase.EqualVT(that.Phase) { + return false + } + if len(this.Topics) != len(that.Topics) { + return false + } + for i, vx := range this.Topics { + vy := that.Topics[i] + if vx != vy { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Event) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Event) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Phase) EqualVT(that *Phase) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.IsApplyExtrinsic != that.IsApplyExtrinsic { + return false + } + if this.AsApplyExtrinsic != that.AsApplyExtrinsic { + return false + } + if this.IsFinalization != that.IsFinalization { + return false + } + if this.IsInitialization != that.IsInitialization { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Phase) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Phase) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *SignatureDef) EqualVT(that *SignatureDef) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.IsEd25519 != that.IsEd25519 { + return false + } + if this.AsEd25519 != that.AsEd25519 { + return false + } + if this.IsSr25519 != that.IsSr25519 { + return false + } + if this.AsSr25519 != that.AsSr25519 { + return false + } + if this.IsEcdsa != that.IsEcdsa { + return false + } + if this.AsEcdsa != that.AsEcdsa { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *SignatureDef) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*SignatureDef) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *MortalEra) EqualVT(that *MortalEra) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.First != that.First { + return false + } + if this.Second != that.Second { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *MortalEra) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*MortalEra) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *PaymentFields) EqualVT(that *PaymentFields) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Tip != that.Tip { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *PaymentFields) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*PaymentFields) + if !ok { + return false + } + return this.EqualVT(that) +} +func (m *Block) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Block) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Block) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Justification) > 0 { + i -= len(m.Justification) + copy(dAtA[i:], m.Justification) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Justification))) + i-- + dAtA[i] = 0x3a + } + if len(m.DigestItems) > 0 { + for iNdEx := len(m.DigestItems) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.DigestItems[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Events[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Extrinsics) > 0 { + for iNdEx := len(m.Extrinsics) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Extrinsics[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if m.Header != nil { + size, err := m.Header.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x12 + } + if m.Number != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Header) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Header) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Header) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ExtrinsicsRoot) > 0 { + i -= len(m.ExtrinsicsRoot) + copy(dAtA[i:], m.ExtrinsicsRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ExtrinsicsRoot))) + i-- + dAtA[i] = 0x1a + } + if len(m.StateRoot) > 0 { + i -= len(m.StateRoot) + copy(dAtA[i:], m.StateRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StateRoot))) + i-- + dAtA[i] = 0x12 + } + if len(m.ParentHash) > 0 { + i -= len(m.ParentHash) + copy(dAtA[i:], m.ParentHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DigestItem) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DigestItem) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DigestItem) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if vtmsg, ok := m.Item.(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + return len(dAtA) - i, nil +} + +func (m *DigestItem_AsChangesTrieRoot) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DigestItem_AsChangesTrieRoot) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.AsChangesTrieRoot) + copy(dAtA[i:], m.AsChangesTrieRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsChangesTrieRoot))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} +func (m *DigestItem_AsPreRuntime) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DigestItem_AsPreRuntime) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsPreRuntime != nil { + size, err := m.AsPreRuntime.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *DigestItem_AsConsensus) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DigestItem_AsConsensus) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsConsensus != nil { + size, err := m.AsConsensus.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *DigestItem_AsSeal) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DigestItem_AsSeal) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsSeal != nil { + size, err := m.AsSeal.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *DigestItem_AsChangesTrieSignal) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DigestItem_AsChangesTrieSignal) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsChangesTrieSignal != nil { + size, err := m.AsChangesTrieSignal.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *DigestItem_AsOther) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DigestItem_AsOther) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.AsOther) + copy(dAtA[i:], m.AsOther) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsOther))) + i-- + dAtA[i] = 0x32 + return len(dAtA) - i, nil +} +func (m *PreRuntime) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PreRuntime) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *PreRuntime) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Bytes) > 0 { + i -= len(m.Bytes) + copy(dAtA[i:], m.Bytes) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Bytes))) + i-- + dAtA[i] = 0x12 + } + if m.ConsensusEngineId != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ConsensusEngineId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Consensus) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Consensus) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Consensus) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Bytes) > 0 { + i -= len(m.Bytes) + copy(dAtA[i:], m.Bytes) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Bytes))) + i-- + dAtA[i] = 0x12 + } + if m.ConsensusEngineId != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ConsensusEngineId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Seal) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Seal) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Seal) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Bytes) > 0 { + i -= len(m.Bytes) + copy(dAtA[i:], m.Bytes) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Bytes))) + i-- + dAtA[i] = 0x12 + } + if m.ConsensusEngineId != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ConsensusEngineId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ChangesTrieSignal) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChangesTrieSignal) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ChangesTrieSignal) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AsNewConfiguration) > 0 { + i -= len(m.AsNewConfiguration) + copy(dAtA[i:], m.AsNewConfiguration) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsNewConfiguration))) + i-- + dAtA[i] = 0x12 + } + if m.IsNewConfiguration { + i-- + if m.IsNewConfiguration { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Extrinsic) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Extrinsic) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Extrinsic) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Method != nil { + size, err := m.Method.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Signature != nil { + size, err := m.Signature.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Version != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Signature) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Signature) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Signature) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0x2a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x22 + } + if m.Era != nil { + size, err := m.Era.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Signature != nil { + size, err := m.Signature.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Signer != nil { + size, err := m.Signer.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MultiAddress) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MultiAddress) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *MultiAddress) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AsAddress_20) > 0 { + i -= len(m.AsAddress_20) + copy(dAtA[i:], m.AsAddress_20) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsAddress_20))) + i-- + dAtA[i] = 0x52 + } + if m.IsAddress_20 { + i-- + if m.IsAddress_20 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if len(m.AsAddress_32) > 0 { + i -= len(m.AsAddress_32) + copy(dAtA[i:], m.AsAddress_32) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsAddress_32))) + i-- + dAtA[i] = 0x42 + } + if m.IsAddress_32 { + i-- + if m.IsAddress_32 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if len(m.AsRaw) > 0 { + i -= len(m.AsRaw) + copy(dAtA[i:], m.AsRaw) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsRaw))) + i-- + dAtA[i] = 0x32 + } + if m.IsRaw { + i-- + if m.IsRaw { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.AsIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.AsIndex)) + i-- + dAtA[i] = 0x20 + } + if m.IsIndex { + i-- + if m.IsIndex { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.AsId) > 0 { + i -= len(m.AsId) + copy(dAtA[i:], m.AsId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsId))) + i-- + dAtA[i] = 0x12 + } + if m.IsId { + i-- + if m.IsId { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MultiSignature) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MultiSignature) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *MultiSignature) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AsEcdsa) > 0 { + i -= len(m.AsEcdsa) + copy(dAtA[i:], m.AsEcdsa) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsEcdsa))) + i-- + dAtA[i] = 0x32 + } + if m.IsEcdsa { + i-- + if m.IsEcdsa { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.AsSr_25519) > 0 { + i -= len(m.AsSr_25519) + copy(dAtA[i:], m.AsSr_25519) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsSr_25519))) + i-- + dAtA[i] = 0x22 + } + if m.IsSr_25519 { + i-- + if m.IsSr_25519 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.AsEd_25519) > 0 { + i -= len(m.AsEd_25519) + copy(dAtA[i:], m.AsEd_25519) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsEd_25519))) + i-- + dAtA[i] = 0x12 + } + if m.IsEd_25519 { + i-- + if m.IsEd_25519 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ExtrinsicEra) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExtrinsicEra) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ExtrinsicEra) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.AsMortalEra != nil { + size, err := m.AsMortalEra.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.IsMortalEra { + i-- + if m.IsMortalEra { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.IsImmortalEra { + i-- + if m.IsImmortalEra { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Call) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Call) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Args) > 0 { + i -= len(m.Args) + copy(dAtA[i:], m.Args) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Args))) + i-- + dAtA[i] = 0x12 + } + if m.CallIndex != nil { + size, err := m.CallIndex.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Field) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Field) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Field) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if vtmsg, ok := m.Value.(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if m.LookupIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.LookupIndex)) + i-- + dAtA[i] = 0x10 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Field_JsonValue) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Field_JsonValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.JsonValue) + copy(dAtA[i:], m.JsonValue) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JsonValue))) + i-- + dAtA[i] = 0x1a + return len(dAtA) - i, nil +} +func (m *Field_Fields) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Field_Fields) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Fields != nil { + size, err := m.Fields.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *Fields) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Fields) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Fields) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Value) > 0 { + for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Value[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *CallIndex) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CallIndex) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *CallIndex) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.MethodIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MethodIndex)) + i-- + dAtA[i] = 0x10 + } + if m.SectionIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SectionIndex)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Event) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Event) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Event) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Topics) > 0 { + for iNdEx := len(m.Topics) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Topics[iNdEx]) + copy(dAtA[i:], m.Topics[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Topics[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if m.Phase != nil { + size, err := m.Phase.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x1a + } + if len(m.Fields) > 0 { + for iNdEx := len(m.Fields) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Fields[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Phase) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Phase) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Phase) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.IsInitialization { + i-- + if m.IsInitialization { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.IsFinalization { + i-- + if m.IsFinalization { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.AsApplyExtrinsic != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.AsApplyExtrinsic)) + i-- + dAtA[i] = 0x10 + } + if m.IsApplyExtrinsic { + i-- + if m.IsApplyExtrinsic { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SignatureDef) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SignatureDef) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SignatureDef) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AsEcdsa) > 0 { + i -= len(m.AsEcdsa) + copy(dAtA[i:], m.AsEcdsa) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsEcdsa))) + i-- + dAtA[i] = 0x32 + } + if m.IsEcdsa { + i-- + if m.IsEcdsa { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.AsSr25519) > 0 { + i -= len(m.AsSr25519) + copy(dAtA[i:], m.AsSr25519) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsSr25519))) + i-- + dAtA[i] = 0x22 + } + if m.IsSr25519 { + i-- + if m.IsSr25519 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.AsEd25519) > 0 { + i -= len(m.AsEd25519) + copy(dAtA[i:], m.AsEd25519) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsEd25519))) + i-- + dAtA[i] = 0x12 + } + if m.IsEd25519 { + i-- + if m.IsEd25519 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MortalEra) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MortalEra) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *MortalEra) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Second != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Second)) + i-- + dAtA[i] = 0x10 + } + if m.First != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.First)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *PaymentFields) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PaymentFields) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *PaymentFields) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Block) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Block) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Block) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Justification) > 0 { + i -= len(m.Justification) + copy(dAtA[i:], m.Justification) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Justification))) + i-- + dAtA[i] = 0x3a + } + if len(m.DigestItems) > 0 { + for iNdEx := len(m.DigestItems) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.DigestItems[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Events[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Extrinsics) > 0 { + for iNdEx := len(m.Extrinsics) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Extrinsics[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if m.Header != nil { + size, err := m.Header.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x12 + } + if m.Number != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Header) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Header) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Header) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ExtrinsicsRoot) > 0 { + i -= len(m.ExtrinsicsRoot) + copy(dAtA[i:], m.ExtrinsicsRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ExtrinsicsRoot))) + i-- + dAtA[i] = 0x1a + } + if len(m.StateRoot) > 0 { + i -= len(m.StateRoot) + copy(dAtA[i:], m.StateRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StateRoot))) + i-- + dAtA[i] = 0x12 + } + if len(m.ParentHash) > 0 { + i -= len(m.ParentHash) + copy(dAtA[i:], m.ParentHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DigestItem) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DigestItem) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DigestItem) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if msg, ok := m.Item.(*DigestItem_AsOther); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Item.(*DigestItem_AsChangesTrieSignal); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Item.(*DigestItem_AsSeal); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Item.(*DigestItem_AsConsensus); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Item.(*DigestItem_AsPreRuntime); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Item.(*DigestItem_AsChangesTrieRoot); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + return len(dAtA) - i, nil +} + +func (m *DigestItem_AsChangesTrieRoot) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DigestItem_AsChangesTrieRoot) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.AsChangesTrieRoot) + copy(dAtA[i:], m.AsChangesTrieRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsChangesTrieRoot))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} +func (m *DigestItem_AsPreRuntime) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DigestItem_AsPreRuntime) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsPreRuntime != nil { + size, err := m.AsPreRuntime.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *DigestItem_AsConsensus) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DigestItem_AsConsensus) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsConsensus != nil { + size, err := m.AsConsensus.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *DigestItem_AsSeal) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DigestItem_AsSeal) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsSeal != nil { + size, err := m.AsSeal.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *DigestItem_AsChangesTrieSignal) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DigestItem_AsChangesTrieSignal) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsChangesTrieSignal != nil { + size, err := m.AsChangesTrieSignal.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *DigestItem_AsOther) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DigestItem_AsOther) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.AsOther) + copy(dAtA[i:], m.AsOther) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsOther))) + i-- + dAtA[i] = 0x32 + return len(dAtA) - i, nil +} +func (m *PreRuntime) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PreRuntime) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *PreRuntime) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Bytes) > 0 { + i -= len(m.Bytes) + copy(dAtA[i:], m.Bytes) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Bytes))) + i-- + dAtA[i] = 0x12 + } + if m.ConsensusEngineId != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ConsensusEngineId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Consensus) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Consensus) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Consensus) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Bytes) > 0 { + i -= len(m.Bytes) + copy(dAtA[i:], m.Bytes) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Bytes))) + i-- + dAtA[i] = 0x12 + } + if m.ConsensusEngineId != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ConsensusEngineId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Seal) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Seal) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Seal) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Bytes) > 0 { + i -= len(m.Bytes) + copy(dAtA[i:], m.Bytes) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Bytes))) + i-- + dAtA[i] = 0x12 + } + if m.ConsensusEngineId != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ConsensusEngineId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ChangesTrieSignal) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChangesTrieSignal) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ChangesTrieSignal) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AsNewConfiguration) > 0 { + i -= len(m.AsNewConfiguration) + copy(dAtA[i:], m.AsNewConfiguration) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsNewConfiguration))) + i-- + dAtA[i] = 0x12 + } + if m.IsNewConfiguration { + i-- + if m.IsNewConfiguration { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Extrinsic) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Extrinsic) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Extrinsic) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Method != nil { + size, err := m.Method.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Signature != nil { + size, err := m.Signature.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Version != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Signature) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Signature) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Signature) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0x2a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x22 + } + if m.Era != nil { + size, err := m.Era.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Signature != nil { + size, err := m.Signature.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Signer != nil { + size, err := m.Signer.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MultiAddress) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MultiAddress) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *MultiAddress) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AsAddress_20) > 0 { + i -= len(m.AsAddress_20) + copy(dAtA[i:], m.AsAddress_20) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsAddress_20))) + i-- + dAtA[i] = 0x52 + } + if m.IsAddress_20 { + i-- + if m.IsAddress_20 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if len(m.AsAddress_32) > 0 { + i -= len(m.AsAddress_32) + copy(dAtA[i:], m.AsAddress_32) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsAddress_32))) + i-- + dAtA[i] = 0x42 + } + if m.IsAddress_32 { + i-- + if m.IsAddress_32 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if len(m.AsRaw) > 0 { + i -= len(m.AsRaw) + copy(dAtA[i:], m.AsRaw) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsRaw))) + i-- + dAtA[i] = 0x32 + } + if m.IsRaw { + i-- + if m.IsRaw { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.AsIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.AsIndex)) + i-- + dAtA[i] = 0x20 + } + if m.IsIndex { + i-- + if m.IsIndex { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.AsId) > 0 { + i -= len(m.AsId) + copy(dAtA[i:], m.AsId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsId))) + i-- + dAtA[i] = 0x12 + } + if m.IsId { + i-- + if m.IsId { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MultiSignature) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MultiSignature) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *MultiSignature) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AsEcdsa) > 0 { + i -= len(m.AsEcdsa) + copy(dAtA[i:], m.AsEcdsa) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsEcdsa))) + i-- + dAtA[i] = 0x32 + } + if m.IsEcdsa { + i-- + if m.IsEcdsa { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.AsSr_25519) > 0 { + i -= len(m.AsSr_25519) + copy(dAtA[i:], m.AsSr_25519) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsSr_25519))) + i-- + dAtA[i] = 0x22 + } + if m.IsSr_25519 { + i-- + if m.IsSr_25519 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.AsEd_25519) > 0 { + i -= len(m.AsEd_25519) + copy(dAtA[i:], m.AsEd_25519) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsEd_25519))) + i-- + dAtA[i] = 0x12 + } + if m.IsEd_25519 { + i-- + if m.IsEd_25519 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ExtrinsicEra) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExtrinsicEra) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ExtrinsicEra) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.AsMortalEra != nil { + size, err := m.AsMortalEra.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.IsMortalEra { + i-- + if m.IsMortalEra { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.IsImmortalEra { + i-- + if m.IsImmortalEra { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Call) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Call) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Args) > 0 { + i -= len(m.Args) + copy(dAtA[i:], m.Args) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Args))) + i-- + dAtA[i] = 0x12 + } + if m.CallIndex != nil { + size, err := m.CallIndex.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Field) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Field) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Field) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if msg, ok := m.Value.(*Field_Fields); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Value.(*Field_JsonValue); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if m.LookupIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.LookupIndex)) + i-- + dAtA[i] = 0x10 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Field_JsonValue) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Field_JsonValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.JsonValue) + copy(dAtA[i:], m.JsonValue) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JsonValue))) + i-- + dAtA[i] = 0x1a + return len(dAtA) - i, nil +} +func (m *Field_Fields) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Field_Fields) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Fields != nil { + size, err := m.Fields.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *Fields) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Fields) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Fields) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Value) > 0 { + for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Value[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *CallIndex) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CallIndex) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *CallIndex) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.MethodIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MethodIndex)) + i-- + dAtA[i] = 0x10 + } + if m.SectionIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SectionIndex)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Event) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Event) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Event) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Topics) > 0 { + for iNdEx := len(m.Topics) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Topics[iNdEx]) + copy(dAtA[i:], m.Topics[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Topics[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if m.Phase != nil { + size, err := m.Phase.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x1a + } + if len(m.Fields) > 0 { + for iNdEx := len(m.Fields) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Fields[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Phase) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Phase) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Phase) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.IsInitialization { + i-- + if m.IsInitialization { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.IsFinalization { + i-- + if m.IsFinalization { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.AsApplyExtrinsic != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.AsApplyExtrinsic)) + i-- + dAtA[i] = 0x10 + } + if m.IsApplyExtrinsic { + i-- + if m.IsApplyExtrinsic { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SignatureDef) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SignatureDef) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *SignatureDef) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AsEcdsa) > 0 { + i -= len(m.AsEcdsa) + copy(dAtA[i:], m.AsEcdsa) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsEcdsa))) + i-- + dAtA[i] = 0x32 + } + if m.IsEcdsa { + i-- + if m.IsEcdsa { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.AsSr25519) > 0 { + i -= len(m.AsSr25519) + copy(dAtA[i:], m.AsSr25519) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsSr25519))) + i-- + dAtA[i] = 0x22 + } + if m.IsSr25519 { + i-- + if m.IsSr25519 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.AsEd25519) > 0 { + i -= len(m.AsEd25519) + copy(dAtA[i:], m.AsEd25519) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsEd25519))) + i-- + dAtA[i] = 0x12 + } + if m.IsEd25519 { + i-- + if m.IsEd25519 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MortalEra) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MortalEra) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *MortalEra) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Second != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Second)) + i-- + dAtA[i] = 0x10 + } + if m.First != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.First)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *PaymentFields) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PaymentFields) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *PaymentFields) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Block) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Number != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Number)) + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Header != nil { + l = m.Header.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Extrinsics) > 0 { + for _, e := range m.Extrinsics { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.DigestItems) > 0 { + for _, e := range m.DigestItems { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Justification) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Header) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ParentHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.StateRoot) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ExtrinsicsRoot) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DigestItem) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.Item.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + n += len(m.unknownFields) + return n +} + +func (m *DigestItem_AsChangesTrieRoot) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AsChangesTrieRoot) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return n +} +func (m *DigestItem_AsPreRuntime) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AsPreRuntime != nil { + l = m.AsPreRuntime.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *DigestItem_AsConsensus) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AsConsensus != nil { + l = m.AsConsensus.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *DigestItem_AsSeal) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AsSeal != nil { + l = m.AsSeal.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *DigestItem_AsChangesTrieSignal) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AsChangesTrieSignal != nil { + l = m.AsChangesTrieSignal.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *DigestItem_AsOther) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AsOther) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return n +} +func (m *PreRuntime) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ConsensusEngineId != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.ConsensusEngineId)) + } + l = len(m.Bytes) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Consensus) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ConsensusEngineId != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.ConsensusEngineId)) + } + l = len(m.Bytes) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Seal) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ConsensusEngineId != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.ConsensusEngineId)) + } + l = len(m.Bytes) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ChangesTrieSignal) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IsNewConfiguration { + n += 2 + } + l = len(m.AsNewConfiguration) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Extrinsic) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Version != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Version)) + } + if m.Signature != nil { + l = m.Signature.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Method != nil { + l = m.Method.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Signature) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Signer != nil { + l = m.Signer.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Signature != nil { + l = m.Signature.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Era != nil { + l = m.Era.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Tip) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *MultiAddress) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IsId { + n += 2 + } + l = len(m.AsId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsIndex { + n += 2 + } + if m.AsIndex != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.AsIndex)) + } + if m.IsRaw { + n += 2 + } + l = len(m.AsRaw) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsAddress_32 { + n += 2 + } + l = len(m.AsAddress_32) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsAddress_20 { + n += 2 + } + l = len(m.AsAddress_20) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *MultiSignature) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IsEd_25519 { + n += 2 + } + l = len(m.AsEd_25519) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsSr_25519 { + n += 2 + } + l = len(m.AsSr_25519) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsEcdsa { + n += 2 + } + l = len(m.AsEcdsa) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ExtrinsicEra) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IsImmortalEra { + n += 2 + } + if m.IsMortalEra { + n += 2 + } + if m.AsMortalEra != nil { + l = m.AsMortalEra.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Call) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CallIndex != nil { + l = m.CallIndex.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Args) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Field) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.LookupIndex != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.LookupIndex)) + } + if vtmsg, ok := m.Value.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + n += len(m.unknownFields) + return n +} + +func (m *Field_JsonValue) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.JsonValue) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return n +} +func (m *Field_Fields) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Fields != nil { + l = m.Fields.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *Fields) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *CallIndex) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SectionIndex != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.SectionIndex)) + } + if m.MethodIndex != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.MethodIndex)) + } + n += len(m.unknownFields) + return n +} + +func (m *Event) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Fields) > 0 { + for _, e := range m.Fields { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Phase != nil { + l = m.Phase.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Topics) > 0 { + for _, s := range m.Topics { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *Phase) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IsApplyExtrinsic { + n += 2 + } + if m.AsApplyExtrinsic != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.AsApplyExtrinsic)) + } + if m.IsFinalization { + n += 2 + } + if m.IsInitialization { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *SignatureDef) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IsEd25519 { + n += 2 + } + l = len(m.AsEd25519) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsSr25519 { + n += 2 + } + l = len(m.AsSr25519) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsEcdsa { + n += 2 + } + l = len(m.AsEcdsa) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *MortalEra) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.First != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.First)) + } + if m.Second != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Second)) + } + n += len(m.unknownFields) + return n +} + +func (m *PaymentFields) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Tip) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Block) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Block: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &Header{} + } + if err := m.Header.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Extrinsics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Extrinsics = append(m.Extrinsics, &Extrinsic{}) + if err := m.Extrinsics[len(m.Extrinsics)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Events = append(m.Events, &Event{}) + if err := m.Events[len(m.Events)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DigestItems", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DigestItems = append(m.DigestItems, &DigestItem{}) + if err := m.DigestItems[len(m.DigestItems)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Justification", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Justification = append(m.Justification[:0], dAtA[iNdEx:postIndex]...) + if m.Justification == nil { + m.Justification = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Header) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Header: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParentHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ParentHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StateRoot", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StateRoot = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtrinsicsRoot", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExtrinsicsRoot = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DigestItem) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DigestItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DigestItem: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsChangesTrieRoot", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Item = &DigestItem_AsChangesTrieRoot{AsChangesTrieRoot: string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsPreRuntime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Item.(*DigestItem_AsPreRuntime); ok { + if err := oneof.AsPreRuntime.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &PreRuntime{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &DigestItem_AsPreRuntime{AsPreRuntime: v} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsConsensus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Item.(*DigestItem_AsConsensus); ok { + if err := oneof.AsConsensus.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Consensus{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &DigestItem_AsConsensus{AsConsensus: v} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsSeal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Item.(*DigestItem_AsSeal); ok { + if err := oneof.AsSeal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Seal{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &DigestItem_AsSeal{AsSeal: v} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsChangesTrieSignal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Item.(*DigestItem_AsChangesTrieSignal); ok { + if err := oneof.AsChangesTrieSignal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ChangesTrieSignal{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &DigestItem_AsChangesTrieSignal{AsChangesTrieSignal: v} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsOther", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.Item = &DigestItem_AsOther{AsOther: v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PreRuntime) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PreRuntime: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PreRuntime: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusEngineId", wireType) + } + m.ConsensusEngineId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ConsensusEngineId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bytes = append(m.Bytes[:0], dAtA[iNdEx:postIndex]...) + if m.Bytes == nil { + m.Bytes = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Consensus) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Consensus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Consensus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusEngineId", wireType) + } + m.ConsensusEngineId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ConsensusEngineId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bytes = append(m.Bytes[:0], dAtA[iNdEx:postIndex]...) + if m.Bytes == nil { + m.Bytes = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Seal) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Seal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Seal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusEngineId", wireType) + } + m.ConsensusEngineId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ConsensusEngineId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bytes = append(m.Bytes[:0], dAtA[iNdEx:postIndex]...) + if m.Bytes == nil { + m.Bytes = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChangesTrieSignal) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ChangesTrieSignal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ChangesTrieSignal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsNewConfiguration", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsNewConfiguration = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsNewConfiguration", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsNewConfiguration = append(m.AsNewConfiguration[:0], dAtA[iNdEx:postIndex]...) + if m.AsNewConfiguration == nil { + m.AsNewConfiguration = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Extrinsic) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Extrinsic: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Extrinsic: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &Signature{} + } + if err := m.Signature.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Method == nil { + m.Method = &Call{} + } + if err := m.Method.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Signature) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Signature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Signature: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signer == nil { + m.Signer = &MultiAddress{} + } + if err := m.Signer.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &MultiSignature{} + } + if err := m.Signature.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Era", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Era == nil { + m.Era = &ExtrinsicEra{} + } + if err := m.Era.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MultiAddress) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MultiAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MultiAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsId", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsId = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsIndex", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsIndex = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AsIndex", wireType) + } + m.AsIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AsIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsRaw", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsRaw = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsRaw", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsRaw = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsAddress_32", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsAddress_32 = bool(v != 0) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsAddress_32", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsAddress_32 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsAddress_20", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsAddress_20 = bool(v != 0) + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsAddress_20", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsAddress_20 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MultiSignature) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MultiSignature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MultiSignature: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEd_25519", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEd_25519 = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsEd_25519", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsEd_25519 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsSr_25519", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsSr_25519 = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsSr_25519", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsSr_25519 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEcdsa", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEcdsa = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsEcdsa", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsEcdsa = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExtrinsicEra) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExtrinsicEra: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExtrinsicEra: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsImmortalEra", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsImmortalEra = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsMortalEra", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsMortalEra = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsMortalEra", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AsMortalEra == nil { + m.AsMortalEra = &MortalEra{} + } + if err := m.AsMortalEra.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Call: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Call: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CallIndex", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CallIndex == nil { + m.CallIndex = &CallIndex{} + } + if err := m.CallIndex.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Args = append(m.Args[:0], dAtA[iNdEx:postIndex]...) + if m.Args == nil { + m.Args = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Field) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Field: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Field: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LookupIndex", wireType) + } + m.LookupIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LookupIndex |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JsonValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = &Field_JsonValue{JsonValue: string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*Field_Fields); ok { + if err := oneof.Fields.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Fields{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Field_Fields{Fields: v} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Fields) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Fields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Fields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value, &Field{}) + if err := m.Value[len(m.Value)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CallIndex) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CallIndex: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CallIndex: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SectionIndex", wireType) + } + m.SectionIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SectionIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MethodIndex", wireType) + } + m.MethodIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MethodIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Event) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Fields = append(m.Fields, &Field{}) + if err := m.Fields[len(m.Fields)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Phase == nil { + m.Phase = &Phase{} + } + if err := m.Phase.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Topics", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Topics = append(m.Topics, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Phase) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Phase: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Phase: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsApplyExtrinsic", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsApplyExtrinsic = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AsApplyExtrinsic", wireType) + } + m.AsApplyExtrinsic = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AsApplyExtrinsic |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsFinalization", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsFinalization = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsInitialization", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsInitialization = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignatureDef) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SignatureDef: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignatureDef: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEd25519", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEd25519 = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsEd25519", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsEd25519 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsSr25519", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsSr25519 = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsSr25519", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsSr25519 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEcdsa", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEcdsa = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsEcdsa", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsEcdsa = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MortalEra) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MortalEra: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MortalEra: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field First", wireType) + } + m.First = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.First |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Second", wireType) + } + m.Second = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Second |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PaymentFields) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PaymentFields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PaymentFields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Block) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Block: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Hash = stringValue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &Header{} + } + if err := m.Header.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Extrinsics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Extrinsics = append(m.Extrinsics, &Extrinsic{}) + if err := m.Extrinsics[len(m.Extrinsics)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Events = append(m.Events, &Event{}) + if err := m.Events[len(m.Events)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DigestItems", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DigestItems = append(m.DigestItems, &DigestItem{}) + if err := m.DigestItems[len(m.DigestItems)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Justification", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Justification = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Header) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Header: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParentHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.ParentHash = stringValue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StateRoot", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.StateRoot = stringValue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtrinsicsRoot", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.ExtrinsicsRoot = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DigestItem) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DigestItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DigestItem: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsChangesTrieRoot", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Item = &DigestItem_AsChangesTrieRoot{AsChangesTrieRoot: stringValue} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsPreRuntime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Item.(*DigestItem_AsPreRuntime); ok { + if err := oneof.AsPreRuntime.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &PreRuntime{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &DigestItem_AsPreRuntime{AsPreRuntime: v} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsConsensus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Item.(*DigestItem_AsConsensus); ok { + if err := oneof.AsConsensus.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Consensus{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &DigestItem_AsConsensus{AsConsensus: v} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsSeal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Item.(*DigestItem_AsSeal); ok { + if err := oneof.AsSeal.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Seal{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &DigestItem_AsSeal{AsSeal: v} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsChangesTrieSignal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Item.(*DigestItem_AsChangesTrieSignal); ok { + if err := oneof.AsChangesTrieSignal.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ChangesTrieSignal{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &DigestItem_AsChangesTrieSignal{AsChangesTrieSignal: v} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsOther", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := dAtA[iNdEx:postIndex] + m.Item = &DigestItem_AsOther{AsOther: v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PreRuntime) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PreRuntime: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PreRuntime: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusEngineId", wireType) + } + m.ConsensusEngineId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ConsensusEngineId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bytes = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Consensus) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Consensus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Consensus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusEngineId", wireType) + } + m.ConsensusEngineId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ConsensusEngineId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bytes = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Seal) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Seal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Seal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusEngineId", wireType) + } + m.ConsensusEngineId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ConsensusEngineId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bytes = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChangesTrieSignal) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ChangesTrieSignal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ChangesTrieSignal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsNewConfiguration", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsNewConfiguration = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsNewConfiguration", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsNewConfiguration = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Extrinsic) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Extrinsic: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Extrinsic: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &Signature{} + } + if err := m.Signature.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Method == nil { + m.Method = &Call{} + } + if err := m.Method.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Signature) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Signature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Signature: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signer == nil { + m.Signer = &MultiAddress{} + } + if err := m.Signer.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &MultiSignature{} + } + if err := m.Signature.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Era", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Era == nil { + m.Era = &ExtrinsicEra{} + } + if err := m.Era.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Nonce = stringValue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Tip = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MultiAddress) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MultiAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MultiAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsId", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsId = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AsId = stringValue + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsIndex", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsIndex = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AsIndex", wireType) + } + m.AsIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AsIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsRaw", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsRaw = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsRaw", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AsRaw = stringValue + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsAddress_32", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsAddress_32 = bool(v != 0) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsAddress_32", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AsAddress_32 = stringValue + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsAddress_20", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsAddress_20 = bool(v != 0) + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsAddress_20", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AsAddress_20 = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MultiSignature) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MultiSignature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MultiSignature: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEd_25519", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEd_25519 = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsEd_25519", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AsEd_25519 = stringValue + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsSr_25519", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsSr_25519 = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsSr_25519", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AsSr_25519 = stringValue + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEcdsa", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEcdsa = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsEcdsa", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AsEcdsa = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExtrinsicEra) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExtrinsicEra: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExtrinsicEra: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsImmortalEra", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsImmortalEra = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsMortalEra", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsMortalEra = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsMortalEra", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AsMortalEra == nil { + m.AsMortalEra = &MortalEra{} + } + if err := m.AsMortalEra.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Call: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Call: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CallIndex", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CallIndex == nil { + m.CallIndex = &CallIndex{} + } + if err := m.CallIndex.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Args = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Field) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Field: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Field: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Name = stringValue + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LookupIndex", wireType) + } + m.LookupIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LookupIndex |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JsonValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Value = &Field_JsonValue{JsonValue: stringValue} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*Field_Fields); ok { + if err := oneof.Fields.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Fields{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Field_Fields{Fields: v} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Fields) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Fields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Fields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value, &Field{}) + if err := m.Value[len(m.Value)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CallIndex) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CallIndex: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CallIndex: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SectionIndex", wireType) + } + m.SectionIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SectionIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MethodIndex", wireType) + } + m.MethodIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MethodIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Event) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Name = stringValue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Fields = append(m.Fields, &Field{}) + if err := m.Fields[len(m.Fields)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Id = stringValue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Phase == nil { + m.Phase = &Phase{} + } + if err := m.Phase.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Topics", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Topics = append(m.Topics, stringValue) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Phase) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Phase: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Phase: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsApplyExtrinsic", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsApplyExtrinsic = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AsApplyExtrinsic", wireType) + } + m.AsApplyExtrinsic = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AsApplyExtrinsic |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsFinalization", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsFinalization = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsInitialization", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsInitialization = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignatureDef) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SignatureDef: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignatureDef: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEd25519", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEd25519 = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsEd25519", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AsEd25519 = stringValue + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsSr25519", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsSr25519 = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsSr25519", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AsSr25519 = stringValue + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEcdsa", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEcdsa = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsEcdsa", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AsEcdsa = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MortalEra) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MortalEra: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MortalEra: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field First", wireType) + } + m.First = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.First |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Second", wireType) + } + m.Second = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Second |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PaymentFields) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PaymentFields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PaymentFields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Tip = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/vara-common/pb/extrinsics.pb.go b/vara-common/pb/extrinsics.pb.go new file mode 100644 index 0000000..b188791 --- /dev/null +++ b/vara-common/pb/extrinsics.pb.go @@ -0,0 +1,1155 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: extrinsics.proto + +package pbgear + +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) +) + +type ParsedExtrinsics struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockHash string `protobuf:"bytes,1,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + Extrinsics []*ParsedExtrinsic `protobuf:"bytes,2,rep,name=extrinsics,proto3" json:"extrinsics,omitempty"` +} + +func (x *ParsedExtrinsics) Reset() { + *x = ParsedExtrinsics{} + if protoimpl.UnsafeEnabled { + mi := &file_extrinsics_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParsedExtrinsics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParsedExtrinsics) ProtoMessage() {} + +func (x *ParsedExtrinsics) ProtoReflect() protoreflect.Message { + mi := &file_extrinsics_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 ParsedExtrinsics.ProtoReflect.Descriptor instead. +func (*ParsedExtrinsics) Descriptor() ([]byte, []int) { + return file_extrinsics_proto_rawDescGZIP(), []int{0} +} + +func (x *ParsedExtrinsics) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *ParsedExtrinsics) GetExtrinsics() []*ParsedExtrinsic { + if x != nil { + return x.Extrinsics + } + return nil +} + +type ParsedExtrinsic struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + CallFields []*ParsedField `protobuf:"bytes,2,rep,name=call_fields,json=callFields,proto3" json:"call_fields,omitempty"` + CallIndex *ParsedCallIndex `protobuf:"bytes,3,opt,name=call_index,json=callIndex,proto3" json:"call_index,omitempty"` + Version uint32 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` + Signature *ParsedSignature `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *ParsedExtrinsic) Reset() { + *x = ParsedExtrinsic{} + if protoimpl.UnsafeEnabled { + mi := &file_extrinsics_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParsedExtrinsic) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParsedExtrinsic) ProtoMessage() {} + +func (x *ParsedExtrinsic) ProtoReflect() protoreflect.Message { + mi := &file_extrinsics_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 ParsedExtrinsic.ProtoReflect.Descriptor instead. +func (*ParsedExtrinsic) Descriptor() ([]byte, []int) { + return file_extrinsics_proto_rawDescGZIP(), []int{1} +} + +func (x *ParsedExtrinsic) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ParsedExtrinsic) GetCallFields() []*ParsedField { + if x != nil { + return x.CallFields + } + return nil +} + +func (x *ParsedExtrinsic) GetCallIndex() *ParsedCallIndex { + if x != nil { + return x.CallIndex + } + return nil +} + +func (x *ParsedExtrinsic) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *ParsedExtrinsic) GetSignature() *ParsedSignature { + if x != nil { + return x.Signature + } + return nil +} + +type ParsedField struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + LookupIndex int64 `protobuf:"varint,2,opt,name=lookup_index,json=lookupIndex,proto3" json:"lookup_index,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + // Types that are assignable to Value: + // + // *ParsedField_FieldValue + // *ParsedField_Fields + Value isParsedField_Value `protobuf_oneof:"value"` +} + +func (x *ParsedField) Reset() { + *x = ParsedField{} + if protoimpl.UnsafeEnabled { + mi := &file_extrinsics_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParsedField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParsedField) ProtoMessage() {} + +func (x *ParsedField) ProtoReflect() protoreflect.Message { + mi := &file_extrinsics_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 ParsedField.ProtoReflect.Descriptor instead. +func (*ParsedField) Descriptor() ([]byte, []int) { + return file_extrinsics_proto_rawDescGZIP(), []int{2} +} + +func (x *ParsedField) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ParsedField) GetLookupIndex() int64 { + if x != nil { + return x.LookupIndex + } + return 0 +} + +func (x *ParsedField) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (m *ParsedField) GetValue() isParsedField_Value { + if m != nil { + return m.Value + } + return nil +} + +func (x *ParsedField) GetFieldValue() string { + if x, ok := x.GetValue().(*ParsedField_FieldValue); ok { + return x.FieldValue + } + return "" +} + +func (x *ParsedField) GetFields() *ParsedField { + if x, ok := x.GetValue().(*ParsedField_Fields); ok { + return x.Fields + } + return nil +} + +type isParsedField_Value interface { + isParsedField_Value() +} + +type ParsedField_FieldValue struct { + FieldValue string `protobuf:"bytes,4,opt,name=field_value,json=fieldValue,proto3,oneof"` +} + +type ParsedField_Fields struct { + Fields *ParsedField `protobuf:"bytes,5,opt,name=fields,proto3,oneof"` +} + +func (*ParsedField_FieldValue) isParsedField_Value() {} + +func (*ParsedField_Fields) isParsedField_Value() {} + +type ParsedFields struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value []*ParsedField `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` +} + +func (x *ParsedFields) Reset() { + *x = ParsedFields{} + if protoimpl.UnsafeEnabled { + mi := &file_extrinsics_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParsedFields) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParsedFields) ProtoMessage() {} + +func (x *ParsedFields) ProtoReflect() protoreflect.Message { + mi := &file_extrinsics_proto_msgTypes[3] + 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 ParsedFields.ProtoReflect.Descriptor instead. +func (*ParsedFields) Descriptor() ([]byte, []int) { + return file_extrinsics_proto_rawDescGZIP(), []int{3} +} + +func (x *ParsedFields) GetValue() []*ParsedField { + if x != nil { + return x.Value + } + return nil +} + +type ParsedCallIndex struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SectionIndex uint32 `protobuf:"varint,1,opt,name=section_index,json=sectionIndex,proto3" json:"section_index,omitempty"` + MethodIndex uint32 `protobuf:"varint,2,opt,name=method_index,json=methodIndex,proto3" json:"method_index,omitempty"` +} + +func (x *ParsedCallIndex) Reset() { + *x = ParsedCallIndex{} + if protoimpl.UnsafeEnabled { + mi := &file_extrinsics_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParsedCallIndex) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParsedCallIndex) ProtoMessage() {} + +func (x *ParsedCallIndex) ProtoReflect() protoreflect.Message { + mi := &file_extrinsics_proto_msgTypes[4] + 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 ParsedCallIndex.ProtoReflect.Descriptor instead. +func (*ParsedCallIndex) Descriptor() ([]byte, []int) { + return file_extrinsics_proto_rawDescGZIP(), []int{4} +} + +func (x *ParsedCallIndex) GetSectionIndex() uint32 { + if x != nil { + return x.SectionIndex + } + return 0 +} + +func (x *ParsedCallIndex) GetMethodIndex() uint32 { + if x != nil { + return x.MethodIndex + } + return 0 +} + +type ParsedSignature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signer *ParsedSigner `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + Signature *ParsedSignatureDef `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Era *ParsedEra `protobuf:"bytes,12,opt,name=era,proto3" json:"era,omitempty"` + // big.Int + None string `protobuf:"bytes,13,opt,name=none,proto3" json:"none,omitempty"` + PaymentFields *ParsedPaymentFields `protobuf:"bytes,14,opt,name=payment_fields,json=paymentFields,proto3" json:"payment_fields,omitempty"` +} + +func (x *ParsedSignature) Reset() { + *x = ParsedSignature{} + if protoimpl.UnsafeEnabled { + mi := &file_extrinsics_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParsedSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParsedSignature) ProtoMessage() {} + +func (x *ParsedSignature) ProtoReflect() protoreflect.Message { + mi := &file_extrinsics_proto_msgTypes[5] + 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 ParsedSignature.ProtoReflect.Descriptor instead. +func (*ParsedSignature) Descriptor() ([]byte, []int) { + return file_extrinsics_proto_rawDescGZIP(), []int{5} +} + +func (x *ParsedSignature) GetSigner() *ParsedSigner { + if x != nil { + return x.Signer + } + return nil +} + +func (x *ParsedSignature) GetSignature() *ParsedSignatureDef { + if x != nil { + return x.Signature + } + return nil +} + +func (x *ParsedSignature) GetEra() *ParsedEra { + if x != nil { + return x.Era + } + return nil +} + +func (x *ParsedSignature) GetNone() string { + if x != nil { + return x.None + } + return "" +} + +func (x *ParsedSignature) GetPaymentFields() *ParsedPaymentFields { + if x != nil { + return x.PaymentFields + } + return nil +} + +type ParsedSigner struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Is_ID bool `protobuf:"varint,1,opt,name=is_ID,json=isID,proto3" json:"is_ID,omitempty"` + // [32]byte + As_ID string `protobuf:"bytes,2,opt,name=as_ID,json=asID,proto3" json:"as_ID,omitempty"` + IsIndex bool `protobuf:"varint,3,opt,name=is_index,json=isIndex,proto3" json:"is_index,omitempty"` + AsIndex uint32 `protobuf:"varint,4,opt,name=as_index,json=asIndex,proto3" json:"as_index,omitempty"` + IsRaw bool `protobuf:"varint,5,opt,name=is_raw,json=isRaw,proto3" json:"is_raw,omitempty"` + AsRaw []byte `protobuf:"bytes,6,opt,name=as_raw,json=asRaw,proto3" json:"as_raw,omitempty"` + IsAddress_32 bool `protobuf:"varint,7,opt,name=is_address_32,json=isAddress32,proto3" json:"is_address_32,omitempty"` + // [32]byte + AsAddress_32 string `protobuf:"bytes,8,opt,name=as_address_32,json=asAddress32,proto3" json:"as_address_32,omitempty"` + IsAddress_20 bool `protobuf:"varint,9,opt,name=is_address_20,json=isAddress20,proto3" json:"is_address_20,omitempty"` + // [20]byte + AsAddress_20 string `protobuf:"bytes,10,opt,name=as_address_20,json=asAddress20,proto3" json:"as_address_20,omitempty"` +} + +func (x *ParsedSigner) Reset() { + *x = ParsedSigner{} + if protoimpl.UnsafeEnabled { + mi := &file_extrinsics_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParsedSigner) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParsedSigner) ProtoMessage() {} + +func (x *ParsedSigner) ProtoReflect() protoreflect.Message { + mi := &file_extrinsics_proto_msgTypes[6] + 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 ParsedSigner.ProtoReflect.Descriptor instead. +func (*ParsedSigner) Descriptor() ([]byte, []int) { + return file_extrinsics_proto_rawDescGZIP(), []int{6} +} + +func (x *ParsedSigner) GetIs_ID() bool { + if x != nil { + return x.Is_ID + } + return false +} + +func (x *ParsedSigner) GetAs_ID() string { + if x != nil { + return x.As_ID + } + return "" +} + +func (x *ParsedSigner) GetIsIndex() bool { + if x != nil { + return x.IsIndex + } + return false +} + +func (x *ParsedSigner) GetAsIndex() uint32 { + if x != nil { + return x.AsIndex + } + return 0 +} + +func (x *ParsedSigner) GetIsRaw() bool { + if x != nil { + return x.IsRaw + } + return false +} + +func (x *ParsedSigner) GetAsRaw() []byte { + if x != nil { + return x.AsRaw + } + return nil +} + +func (x *ParsedSigner) GetIsAddress_32() bool { + if x != nil { + return x.IsAddress_32 + } + return false +} + +func (x *ParsedSigner) GetAsAddress_32() string { + if x != nil { + return x.AsAddress_32 + } + return "" +} + +func (x *ParsedSigner) GetIsAddress_20() bool { + if x != nil { + return x.IsAddress_20 + } + return false +} + +func (x *ParsedSigner) GetAsAddress_20() string { + if x != nil { + return x.AsAddress_20 + } + return "" +} + +type ParsedSignatureDef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsEd25519 bool `protobuf:"varint,1,opt,name=is_ed25519,json=isEd25519,proto3" json:"is_ed25519,omitempty"` + // [64]byte + AsEd25519 string `protobuf:"bytes,2,opt,name=as_ed25519,json=asEd25519,proto3" json:"as_ed25519,omitempty"` + IsSr25519 bool `protobuf:"varint,3,opt,name=is_sr25519,json=isSr25519,proto3" json:"is_sr25519,omitempty"` + // [64]byte + AsSr25519 string `protobuf:"bytes,4,opt,name=as_sr25519,json=asSr25519,proto3" json:"as_sr25519,omitempty"` + IsEcdsa bool `protobuf:"varint,5,opt,name=is_ecdsa,json=isEcdsa,proto3" json:"is_ecdsa,omitempty"` + // [65]byte + AsEcdsa string `protobuf:"bytes,6,opt,name=as_ecdsa,json=asEcdsa,proto3" json:"as_ecdsa,omitempty"` +} + +func (x *ParsedSignatureDef) Reset() { + *x = ParsedSignatureDef{} + if protoimpl.UnsafeEnabled { + mi := &file_extrinsics_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParsedSignatureDef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParsedSignatureDef) ProtoMessage() {} + +func (x *ParsedSignatureDef) ProtoReflect() protoreflect.Message { + mi := &file_extrinsics_proto_msgTypes[7] + 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 ParsedSignatureDef.ProtoReflect.Descriptor instead. +func (*ParsedSignatureDef) Descriptor() ([]byte, []int) { + return file_extrinsics_proto_rawDescGZIP(), []int{7} +} + +func (x *ParsedSignatureDef) GetIsEd25519() bool { + if x != nil { + return x.IsEd25519 + } + return false +} + +func (x *ParsedSignatureDef) GetAsEd25519() string { + if x != nil { + return x.AsEd25519 + } + return "" +} + +func (x *ParsedSignatureDef) GetIsSr25519() bool { + if x != nil { + return x.IsSr25519 + } + return false +} + +func (x *ParsedSignatureDef) GetAsSr25519() string { + if x != nil { + return x.AsSr25519 + } + return "" +} + +func (x *ParsedSignatureDef) GetIsEcdsa() bool { + if x != nil { + return x.IsEcdsa + } + return false +} + +func (x *ParsedSignatureDef) GetAsEcdsa() string { + if x != nil { + return x.AsEcdsa + } + return "" +} + +type ParsedEra struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsImmortalEra bool `protobuf:"varint,1,opt,name=is_immortal_era,json=isImmortalEra,proto3" json:"is_immortal_era,omitempty"` + IsMortalEra bool `protobuf:"varint,2,opt,name=is_mortal_era,json=isMortalEra,proto3" json:"is_mortal_era,omitempty"` + AsMortalEra *ParsedMortalEra `protobuf:"bytes,3,opt,name=as_mortal_era,json=asMortalEra,proto3" json:"as_mortal_era,omitempty"` +} + +func (x *ParsedEra) Reset() { + *x = ParsedEra{} + if protoimpl.UnsafeEnabled { + mi := &file_extrinsics_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParsedEra) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParsedEra) ProtoMessage() {} + +func (x *ParsedEra) ProtoReflect() protoreflect.Message { + mi := &file_extrinsics_proto_msgTypes[8] + 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 ParsedEra.ProtoReflect.Descriptor instead. +func (*ParsedEra) Descriptor() ([]byte, []int) { + return file_extrinsics_proto_rawDescGZIP(), []int{8} +} + +func (x *ParsedEra) GetIsImmortalEra() bool { + if x != nil { + return x.IsImmortalEra + } + return false +} + +func (x *ParsedEra) GetIsMortalEra() bool { + if x != nil { + return x.IsMortalEra + } + return false +} + +func (x *ParsedEra) GetAsMortalEra() *ParsedMortalEra { + if x != nil { + return x.AsMortalEra + } + return nil +} + +type ParsedMortalEra struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + First uint32 `protobuf:"varint,1,opt,name=first,proto3" json:"first,omitempty"` + Last uint32 `protobuf:"varint,2,opt,name=last,proto3" json:"last,omitempty"` +} + +func (x *ParsedMortalEra) Reset() { + *x = ParsedMortalEra{} + if protoimpl.UnsafeEnabled { + mi := &file_extrinsics_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParsedMortalEra) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParsedMortalEra) ProtoMessage() {} + +func (x *ParsedMortalEra) ProtoReflect() protoreflect.Message { + mi := &file_extrinsics_proto_msgTypes[9] + 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 ParsedMortalEra.ProtoReflect.Descriptor instead. +func (*ParsedMortalEra) Descriptor() ([]byte, []int) { + return file_extrinsics_proto_rawDescGZIP(), []int{9} +} + +func (x *ParsedMortalEra) GetFirst() uint32 { + if x != nil { + return x.First + } + return 0 +} + +func (x *ParsedMortalEra) GetLast() uint32 { + if x != nil { + return x.Last + } + return 0 +} + +type ParsedPaymentFields struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // big.Int + Tip string `protobuf:"bytes,1,opt,name=tip,proto3" json:"tip,omitempty"` +} + +func (x *ParsedPaymentFields) Reset() { + *x = ParsedPaymentFields{} + if protoimpl.UnsafeEnabled { + mi := &file_extrinsics_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParsedPaymentFields) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParsedPaymentFields) ProtoMessage() {} + +func (x *ParsedPaymentFields) ProtoReflect() protoreflect.Message { + mi := &file_extrinsics_proto_msgTypes[10] + 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 ParsedPaymentFields.ProtoReflect.Descriptor instead. +func (*ParsedPaymentFields) Descriptor() ([]byte, []int) { + return file_extrinsics_proto_rawDescGZIP(), []int{10} +} + +func (x *ParsedPaymentFields) GetTip() string { + if x != nil { + return x.Tip + } + return "" +} + +var File_extrinsics_proto protoreflect.FileDescriptor + +var file_extrinsics_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x15, 0x73, 0x66, 0x2e, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, + 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x22, 0x79, 0x0a, 0x10, 0x50, 0x61, 0x72, + 0x73, 0x65, 0x64, 0x45, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, 0x12, 0x1d, 0x0a, + 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x46, 0x0a, 0x0a, + 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x73, 0x66, 0x2e, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, + 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, + 0x73, 0x69, 0x63, 0x73, 0x22, 0x91, 0x02, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, + 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x0b, + 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x66, 0x2e, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, + 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0a, 0x63, 0x61, 0x6c, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x73, 0x12, 0x45, 0x0a, 0x0a, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x66, 0x2e, 0x65, 0x78, 0x74, 0x72, 0x69, + 0x6e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, + 0x72, 0x73, 0x65, 0x64, 0x43, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x09, 0x63, + 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x66, 0x2e, 0x65, 0x78, 0x74, 0x72, 0x69, + 0x6e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, + 0x72, 0x73, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xc2, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x72, + 0x73, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0b, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x66, 0x2e, 0x65, 0x78, 0x74, 0x72, + 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x72, 0x73, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x06, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x48, 0x0a, + 0x0c, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x38, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, + 0x66, 0x2e, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x59, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x73, 0x65, + 0x64, 0x43, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0c, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x22, 0xb2, 0x02, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x66, 0x2e, 0x65, 0x78, 0x74, 0x72, + 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x72, 0x73, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x06, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x66, 0x2e, 0x65, 0x78, 0x74, 0x72, + 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x72, 0x73, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x65, + 0x66, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x32, 0x0a, 0x03, + 0x65, 0x72, 0x61, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x66, 0x2e, 0x65, + 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x72, 0x61, 0x52, 0x03, 0x65, 0x72, 0x61, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x6f, 0x6e, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, + 0x66, 0x2e, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x50, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0xac, 0x02, 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x73, + 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x13, 0x0a, 0x05, 0x69, 0x73, 0x5f, 0x49, + 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x49, 0x44, 0x12, 0x13, 0x0a, + 0x05, 0x61, 0x73, 0x5f, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x73, + 0x49, 0x44, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x19, 0x0a, + 0x08, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x07, 0x61, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x72, + 0x61, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x52, 0x61, 0x77, 0x12, + 0x15, 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x05, 0x61, 0x73, 0x52, 0x61, 0x77, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x33, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, + 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x33, 0x32, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x73, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x33, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x61, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x33, 0x32, 0x12, 0x22, + 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x32, 0x30, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x32, 0x30, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x5f, 0x32, 0x30, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x73, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x32, 0x30, 0x22, 0xc6, 0x01, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x73, 0x65, + 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x65, 0x66, 0x12, 0x1d, 0x0a, + 0x0a, 0x69, 0x73, 0x5f, 0x65, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x12, 0x1d, 0x0a, 0x0a, + 0x61, 0x73, 0x5f, 0x65, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x61, 0x73, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x12, 0x1d, 0x0a, 0x0a, 0x69, + 0x73, 0x5f, 0x73, 0x72, 0x32, 0x35, 0x35, 0x31, 0x39, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x09, 0x69, 0x73, 0x53, 0x72, 0x32, 0x35, 0x35, 0x31, 0x39, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, + 0x5f, 0x73, 0x72, 0x32, 0x35, 0x35, 0x31, 0x39, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x61, 0x73, 0x53, 0x72, 0x32, 0x35, 0x35, 0x31, 0x39, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, + 0x65, 0x63, 0x64, 0x73, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x45, + 0x63, 0x64, 0x73, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x5f, 0x65, 0x63, 0x64, 0x73, 0x61, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x45, 0x63, 0x64, 0x73, 0x61, 0x22, + 0xa3, 0x01, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x72, 0x61, 0x12, 0x26, 0x0a, + 0x0f, 0x69, 0x73, 0x5f, 0x69, 0x6d, 0x6d, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x49, 0x6d, 0x6d, 0x6f, 0x72, 0x74, + 0x61, 0x6c, 0x45, 0x72, 0x61, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x6d, 0x6f, 0x72, 0x74, + 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, + 0x4d, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x61, 0x12, 0x4a, 0x0a, 0x0d, 0x61, 0x73, 0x5f, + 0x6d, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x73, 0x66, 0x2e, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x4d, + 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x61, 0x52, 0x0b, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x74, + 0x61, 0x6c, 0x45, 0x72, 0x61, 0x22, 0x3b, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x4d, + 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6c, 0x61, + 0x73, 0x74, 0x22, 0x27, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x50, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x70, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x69, 0x70, 0x42, 0x32, 0x5a, 0x30, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x68, 0x6f, 0x73, 0x65, + 0x2d, 0x67, 0x65, 0x61, 0x72, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x67, 0x65, 0x61, 0x72, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_extrinsics_proto_rawDescOnce sync.Once + file_extrinsics_proto_rawDescData = file_extrinsics_proto_rawDesc +) + +func file_extrinsics_proto_rawDescGZIP() []byte { + file_extrinsics_proto_rawDescOnce.Do(func() { + file_extrinsics_proto_rawDescData = protoimpl.X.CompressGZIP(file_extrinsics_proto_rawDescData) + }) + return file_extrinsics_proto_rawDescData +} + +var file_extrinsics_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_extrinsics_proto_goTypes = []interface{}{ + (*ParsedExtrinsics)(nil), // 0: sf.extrinsics.type.v1.ParsedExtrinsics + (*ParsedExtrinsic)(nil), // 1: sf.extrinsics.type.v1.ParsedExtrinsic + (*ParsedField)(nil), // 2: sf.extrinsics.type.v1.ParsedField + (*ParsedFields)(nil), // 3: sf.extrinsics.type.v1.ParsedFields + (*ParsedCallIndex)(nil), // 4: sf.extrinsics.type.v1.ParsedCallIndex + (*ParsedSignature)(nil), // 5: sf.extrinsics.type.v1.ParsedSignature + (*ParsedSigner)(nil), // 6: sf.extrinsics.type.v1.ParsedSigner + (*ParsedSignatureDef)(nil), // 7: sf.extrinsics.type.v1.ParsedSignatureDef + (*ParsedEra)(nil), // 8: sf.extrinsics.type.v1.ParsedEra + (*ParsedMortalEra)(nil), // 9: sf.extrinsics.type.v1.ParsedMortalEra + (*ParsedPaymentFields)(nil), // 10: sf.extrinsics.type.v1.ParsedPaymentFields +} +var file_extrinsics_proto_depIdxs = []int32{ + 1, // 0: sf.extrinsics.type.v1.ParsedExtrinsics.extrinsics:type_name -> sf.extrinsics.type.v1.ParsedExtrinsic + 2, // 1: sf.extrinsics.type.v1.ParsedExtrinsic.call_fields:type_name -> sf.extrinsics.type.v1.ParsedField + 4, // 2: sf.extrinsics.type.v1.ParsedExtrinsic.call_index:type_name -> sf.extrinsics.type.v1.ParsedCallIndex + 5, // 3: sf.extrinsics.type.v1.ParsedExtrinsic.signature:type_name -> sf.extrinsics.type.v1.ParsedSignature + 2, // 4: sf.extrinsics.type.v1.ParsedField.fields:type_name -> sf.extrinsics.type.v1.ParsedField + 2, // 5: sf.extrinsics.type.v1.ParsedFields.value:type_name -> sf.extrinsics.type.v1.ParsedField + 6, // 6: sf.extrinsics.type.v1.ParsedSignature.signer:type_name -> sf.extrinsics.type.v1.ParsedSigner + 7, // 7: sf.extrinsics.type.v1.ParsedSignature.signature:type_name -> sf.extrinsics.type.v1.ParsedSignatureDef + 8, // 8: sf.extrinsics.type.v1.ParsedSignature.era:type_name -> sf.extrinsics.type.v1.ParsedEra + 10, // 9: sf.extrinsics.type.v1.ParsedSignature.payment_fields:type_name -> sf.extrinsics.type.v1.ParsedPaymentFields + 9, // 10: sf.extrinsics.type.v1.ParsedEra.as_mortal_era:type_name -> sf.extrinsics.type.v1.ParsedMortalEra + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_extrinsics_proto_init() } +func file_extrinsics_proto_init() { + if File_extrinsics_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_extrinsics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParsedExtrinsics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extrinsics_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParsedExtrinsic); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extrinsics_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParsedField); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extrinsics_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParsedFields); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extrinsics_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParsedCallIndex); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extrinsics_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParsedSignature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extrinsics_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParsedSigner); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extrinsics_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParsedSignatureDef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extrinsics_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParsedEra); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extrinsics_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParsedMortalEra); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extrinsics_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParsedPaymentFields); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_extrinsics_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*ParsedField_FieldValue)(nil), + (*ParsedField_Fields)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_extrinsics_proto_rawDesc, + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_extrinsics_proto_goTypes, + DependencyIndexes: file_extrinsics_proto_depIdxs, + MessageInfos: file_extrinsics_proto_msgTypes, + }.Build() + File_extrinsics_proto = out.File + file_extrinsics_proto_rawDesc = nil + file_extrinsics_proto_goTypes = nil + file_extrinsics_proto_depIdxs = nil +} diff --git a/vara-common/pb/extrinsics_vtproto.pb.go b/vara-common/pb/extrinsics_vtproto.pb.go new file mode 100644 index 0000000..03b2113 --- /dev/null +++ b/vara-common/pb/extrinsics_vtproto.pb.go @@ -0,0 +1,5963 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.6.0 +// source: extrinsics.proto + +package pbgear + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + proto "google.golang.org/protobuf/proto" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + unsafe "unsafe" +) + +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) +) + +func (m *ParsedExtrinsics) CloneVT() *ParsedExtrinsics { + if m == nil { + return (*ParsedExtrinsics)(nil) + } + r := new(ParsedExtrinsics) + r.BlockHash = m.BlockHash + if rhs := m.Extrinsics; rhs != nil { + tmpContainer := make([]*ParsedExtrinsic, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Extrinsics = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ParsedExtrinsics) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ParsedExtrinsic) CloneVT() *ParsedExtrinsic { + if m == nil { + return (*ParsedExtrinsic)(nil) + } + r := new(ParsedExtrinsic) + r.Name = m.Name + r.CallIndex = m.CallIndex.CloneVT() + r.Version = m.Version + r.Signature = m.Signature.CloneVT() + if rhs := m.CallFields; rhs != nil { + tmpContainer := make([]*ParsedField, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.CallFields = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ParsedExtrinsic) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ParsedField) CloneVT() *ParsedField { + if m == nil { + return (*ParsedField)(nil) + } + r := new(ParsedField) + r.Name = m.Name + r.LookupIndex = m.LookupIndex + r.Type = m.Type + if m.Value != nil { + r.Value = m.Value.(interface{ CloneVT() isParsedField_Value }).CloneVT() + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ParsedField) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ParsedField_FieldValue) CloneVT() isParsedField_Value { + if m == nil { + return (*ParsedField_FieldValue)(nil) + } + r := new(ParsedField_FieldValue) + r.FieldValue = m.FieldValue + return r +} + +func (m *ParsedField_Fields) CloneVT() isParsedField_Value { + if m == nil { + return (*ParsedField_Fields)(nil) + } + r := new(ParsedField_Fields) + r.Fields = m.Fields.CloneVT() + return r +} + +func (m *ParsedFields) CloneVT() *ParsedFields { + if m == nil { + return (*ParsedFields)(nil) + } + r := new(ParsedFields) + if rhs := m.Value; rhs != nil { + tmpContainer := make([]*ParsedField, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Value = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ParsedFields) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ParsedCallIndex) CloneVT() *ParsedCallIndex { + if m == nil { + return (*ParsedCallIndex)(nil) + } + r := new(ParsedCallIndex) + r.SectionIndex = m.SectionIndex + r.MethodIndex = m.MethodIndex + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ParsedCallIndex) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ParsedSignature) CloneVT() *ParsedSignature { + if m == nil { + return (*ParsedSignature)(nil) + } + r := new(ParsedSignature) + r.Signer = m.Signer.CloneVT() + r.Signature = m.Signature.CloneVT() + r.Era = m.Era.CloneVT() + r.None = m.None + r.PaymentFields = m.PaymentFields.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ParsedSignature) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ParsedSigner) CloneVT() *ParsedSigner { + if m == nil { + return (*ParsedSigner)(nil) + } + r := new(ParsedSigner) + r.Is_ID = m.Is_ID + r.As_ID = m.As_ID + r.IsIndex = m.IsIndex + r.AsIndex = m.AsIndex + r.IsRaw = m.IsRaw + r.IsAddress_32 = m.IsAddress_32 + r.AsAddress_32 = m.AsAddress_32 + r.IsAddress_20 = m.IsAddress_20 + r.AsAddress_20 = m.AsAddress_20 + if rhs := m.AsRaw; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.AsRaw = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ParsedSigner) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ParsedSignatureDef) CloneVT() *ParsedSignatureDef { + if m == nil { + return (*ParsedSignatureDef)(nil) + } + r := new(ParsedSignatureDef) + r.IsEd25519 = m.IsEd25519 + r.AsEd25519 = m.AsEd25519 + r.IsSr25519 = m.IsSr25519 + r.AsSr25519 = m.AsSr25519 + r.IsEcdsa = m.IsEcdsa + r.AsEcdsa = m.AsEcdsa + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ParsedSignatureDef) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ParsedEra) CloneVT() *ParsedEra { + if m == nil { + return (*ParsedEra)(nil) + } + r := new(ParsedEra) + r.IsImmortalEra = m.IsImmortalEra + r.IsMortalEra = m.IsMortalEra + r.AsMortalEra = m.AsMortalEra.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ParsedEra) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ParsedMortalEra) CloneVT() *ParsedMortalEra { + if m == nil { + return (*ParsedMortalEra)(nil) + } + r := new(ParsedMortalEra) + r.First = m.First + r.Last = m.Last + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ParsedMortalEra) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ParsedPaymentFields) CloneVT() *ParsedPaymentFields { + if m == nil { + return (*ParsedPaymentFields)(nil) + } + r := new(ParsedPaymentFields) + r.Tip = m.Tip + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ParsedPaymentFields) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (this *ParsedExtrinsics) EqualVT(that *ParsedExtrinsics) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.BlockHash != that.BlockHash { + return false + } + if len(this.Extrinsics) != len(that.Extrinsics) { + return false + } + for i, vx := range this.Extrinsics { + vy := that.Extrinsics[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &ParsedExtrinsic{} + } + if q == nil { + q = &ParsedExtrinsic{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ParsedExtrinsics) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ParsedExtrinsics) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ParsedExtrinsic) EqualVT(that *ParsedExtrinsic) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Name != that.Name { + return false + } + if len(this.CallFields) != len(that.CallFields) { + return false + } + for i, vx := range this.CallFields { + vy := that.CallFields[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &ParsedField{} + } + if q == nil { + q = &ParsedField{} + } + if !p.EqualVT(q) { + return false + } + } + } + if !this.CallIndex.EqualVT(that.CallIndex) { + return false + } + if this.Version != that.Version { + return false + } + if !this.Signature.EqualVT(that.Signature) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ParsedExtrinsic) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ParsedExtrinsic) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ParsedField) EqualVT(that *ParsedField) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Value == nil && that.Value != nil { + return false + } else if this.Value != nil { + if that.Value == nil { + return false + } + if !this.Value.(interface { + EqualVT(isParsedField_Value) bool + }).EqualVT(that.Value) { + return false + } + } + if this.Name != that.Name { + return false + } + if this.LookupIndex != that.LookupIndex { + return false + } + if this.Type != that.Type { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ParsedField) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ParsedField) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ParsedField_FieldValue) EqualVT(thatIface isParsedField_Value) bool { + that, ok := thatIface.(*ParsedField_FieldValue) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if this.FieldValue != that.FieldValue { + return false + } + return true +} + +func (this *ParsedField_Fields) EqualVT(thatIface isParsedField_Value) bool { + that, ok := thatIface.(*ParsedField_Fields) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.Fields, that.Fields; p != q { + if p == nil { + p = &ParsedField{} + } + if q == nil { + q = &ParsedField{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *ParsedFields) EqualVT(that *ParsedFields) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.Value) != len(that.Value) { + return false + } + for i, vx := range this.Value { + vy := that.Value[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &ParsedField{} + } + if q == nil { + q = &ParsedField{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ParsedFields) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ParsedFields) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ParsedCallIndex) EqualVT(that *ParsedCallIndex) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.SectionIndex != that.SectionIndex { + return false + } + if this.MethodIndex != that.MethodIndex { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ParsedCallIndex) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ParsedCallIndex) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ParsedSignature) EqualVT(that *ParsedSignature) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.Signer.EqualVT(that.Signer) { + return false + } + if !this.Signature.EqualVT(that.Signature) { + return false + } + if !this.Era.EqualVT(that.Era) { + return false + } + if this.None != that.None { + return false + } + if !this.PaymentFields.EqualVT(that.PaymentFields) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ParsedSignature) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ParsedSignature) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ParsedSigner) EqualVT(that *ParsedSigner) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Is_ID != that.Is_ID { + return false + } + if this.As_ID != that.As_ID { + return false + } + if this.IsIndex != that.IsIndex { + return false + } + if this.AsIndex != that.AsIndex { + return false + } + if this.IsRaw != that.IsRaw { + return false + } + if string(this.AsRaw) != string(that.AsRaw) { + return false + } + if this.IsAddress_32 != that.IsAddress_32 { + return false + } + if this.AsAddress_32 != that.AsAddress_32 { + return false + } + if this.IsAddress_20 != that.IsAddress_20 { + return false + } + if this.AsAddress_20 != that.AsAddress_20 { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ParsedSigner) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ParsedSigner) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ParsedSignatureDef) EqualVT(that *ParsedSignatureDef) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.IsEd25519 != that.IsEd25519 { + return false + } + if this.AsEd25519 != that.AsEd25519 { + return false + } + if this.IsSr25519 != that.IsSr25519 { + return false + } + if this.AsSr25519 != that.AsSr25519 { + return false + } + if this.IsEcdsa != that.IsEcdsa { + return false + } + if this.AsEcdsa != that.AsEcdsa { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ParsedSignatureDef) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ParsedSignatureDef) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ParsedEra) EqualVT(that *ParsedEra) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.IsImmortalEra != that.IsImmortalEra { + return false + } + if this.IsMortalEra != that.IsMortalEra { + return false + } + if !this.AsMortalEra.EqualVT(that.AsMortalEra) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ParsedEra) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ParsedEra) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ParsedMortalEra) EqualVT(that *ParsedMortalEra) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.First != that.First { + return false + } + if this.Last != that.Last { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ParsedMortalEra) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ParsedMortalEra) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ParsedPaymentFields) EqualVT(that *ParsedPaymentFields) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Tip != that.Tip { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ParsedPaymentFields) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ParsedPaymentFields) + if !ok { + return false + } + return this.EqualVT(that) +} +func (m *ParsedExtrinsics) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedExtrinsics) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ParsedExtrinsics) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Extrinsics) > 0 { + for iNdEx := len(m.Extrinsics) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Extrinsics[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ParsedExtrinsic) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedExtrinsic) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ParsedExtrinsic) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Signature != nil { + size, err := m.Signature.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if m.Version != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x20 + } + if m.CallIndex != nil { + size, err := m.CallIndex.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.CallFields) > 0 { + for iNdEx := len(m.CallFields) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.CallFields[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ParsedField) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedField) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ParsedField) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if vtmsg, ok := m.Value.(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x1a + } + if m.LookupIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.LookupIndex)) + i-- + dAtA[i] = 0x10 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ParsedField_FieldValue) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ParsedField_FieldValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.FieldValue) + copy(dAtA[i:], m.FieldValue) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FieldValue))) + i-- + dAtA[i] = 0x22 + return len(dAtA) - i, nil +} +func (m *ParsedField_Fields) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ParsedField_Fields) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Fields != nil { + size, err := m.Fields.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *ParsedFields) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedFields) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ParsedFields) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Value) > 0 { + for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Value[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ParsedCallIndex) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedCallIndex) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ParsedCallIndex) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.MethodIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MethodIndex)) + i-- + dAtA[i] = 0x10 + } + if m.SectionIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SectionIndex)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ParsedSignature) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedSignature) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ParsedSignature) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.PaymentFields != nil { + size, err := m.PaymentFields.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x72 + } + if len(m.None) > 0 { + i -= len(m.None) + copy(dAtA[i:], m.None) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.None))) + i-- + dAtA[i] = 0x6a + } + if m.Era != nil { + size, err := m.Era.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + } + if m.Signature != nil { + size, err := m.Signature.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Signer != nil { + size, err := m.Signer.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ParsedSigner) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedSigner) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ParsedSigner) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AsAddress_20) > 0 { + i -= len(m.AsAddress_20) + copy(dAtA[i:], m.AsAddress_20) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsAddress_20))) + i-- + dAtA[i] = 0x52 + } + if m.IsAddress_20 { + i-- + if m.IsAddress_20 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if len(m.AsAddress_32) > 0 { + i -= len(m.AsAddress_32) + copy(dAtA[i:], m.AsAddress_32) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsAddress_32))) + i-- + dAtA[i] = 0x42 + } + if m.IsAddress_32 { + i-- + if m.IsAddress_32 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if len(m.AsRaw) > 0 { + i -= len(m.AsRaw) + copy(dAtA[i:], m.AsRaw) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsRaw))) + i-- + dAtA[i] = 0x32 + } + if m.IsRaw { + i-- + if m.IsRaw { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.AsIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.AsIndex)) + i-- + dAtA[i] = 0x20 + } + if m.IsIndex { + i-- + if m.IsIndex { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.As_ID) > 0 { + i -= len(m.As_ID) + copy(dAtA[i:], m.As_ID) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.As_ID))) + i-- + dAtA[i] = 0x12 + } + if m.Is_ID { + i-- + if m.Is_ID { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ParsedSignatureDef) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedSignatureDef) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ParsedSignatureDef) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AsEcdsa) > 0 { + i -= len(m.AsEcdsa) + copy(dAtA[i:], m.AsEcdsa) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsEcdsa))) + i-- + dAtA[i] = 0x32 + } + if m.IsEcdsa { + i-- + if m.IsEcdsa { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.AsSr25519) > 0 { + i -= len(m.AsSr25519) + copy(dAtA[i:], m.AsSr25519) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsSr25519))) + i-- + dAtA[i] = 0x22 + } + if m.IsSr25519 { + i-- + if m.IsSr25519 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.AsEd25519) > 0 { + i -= len(m.AsEd25519) + copy(dAtA[i:], m.AsEd25519) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsEd25519))) + i-- + dAtA[i] = 0x12 + } + if m.IsEd25519 { + i-- + if m.IsEd25519 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ParsedEra) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedEra) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ParsedEra) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.AsMortalEra != nil { + size, err := m.AsMortalEra.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.IsMortalEra { + i-- + if m.IsMortalEra { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.IsImmortalEra { + i-- + if m.IsImmortalEra { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ParsedMortalEra) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedMortalEra) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ParsedMortalEra) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Last != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Last)) + i-- + dAtA[i] = 0x10 + } + if m.First != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.First)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ParsedPaymentFields) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedPaymentFields) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ParsedPaymentFields) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ParsedExtrinsics) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedExtrinsics) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ParsedExtrinsics) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Extrinsics) > 0 { + for iNdEx := len(m.Extrinsics) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Extrinsics[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ParsedExtrinsic) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedExtrinsic) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ParsedExtrinsic) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Signature != nil { + size, err := m.Signature.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if m.Version != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x20 + } + if m.CallIndex != nil { + size, err := m.CallIndex.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.CallFields) > 0 { + for iNdEx := len(m.CallFields) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.CallFields[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ParsedField) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedField) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ParsedField) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if msg, ok := m.Value.(*ParsedField_Fields); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Value.(*ParsedField_FieldValue); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x1a + } + if m.LookupIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.LookupIndex)) + i-- + dAtA[i] = 0x10 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ParsedField_FieldValue) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ParsedField_FieldValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.FieldValue) + copy(dAtA[i:], m.FieldValue) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FieldValue))) + i-- + dAtA[i] = 0x22 + return len(dAtA) - i, nil +} +func (m *ParsedField_Fields) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ParsedField_Fields) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Fields != nil { + size, err := m.Fields.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *ParsedFields) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedFields) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ParsedFields) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Value) > 0 { + for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Value[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ParsedCallIndex) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedCallIndex) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ParsedCallIndex) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.MethodIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MethodIndex)) + i-- + dAtA[i] = 0x10 + } + if m.SectionIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SectionIndex)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ParsedSignature) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedSignature) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ParsedSignature) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.PaymentFields != nil { + size, err := m.PaymentFields.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x72 + } + if len(m.None) > 0 { + i -= len(m.None) + copy(dAtA[i:], m.None) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.None))) + i-- + dAtA[i] = 0x6a + } + if m.Era != nil { + size, err := m.Era.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + } + if m.Signature != nil { + size, err := m.Signature.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Signer != nil { + size, err := m.Signer.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ParsedSigner) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedSigner) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ParsedSigner) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AsAddress_20) > 0 { + i -= len(m.AsAddress_20) + copy(dAtA[i:], m.AsAddress_20) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsAddress_20))) + i-- + dAtA[i] = 0x52 + } + if m.IsAddress_20 { + i-- + if m.IsAddress_20 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if len(m.AsAddress_32) > 0 { + i -= len(m.AsAddress_32) + copy(dAtA[i:], m.AsAddress_32) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsAddress_32))) + i-- + dAtA[i] = 0x42 + } + if m.IsAddress_32 { + i-- + if m.IsAddress_32 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if len(m.AsRaw) > 0 { + i -= len(m.AsRaw) + copy(dAtA[i:], m.AsRaw) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsRaw))) + i-- + dAtA[i] = 0x32 + } + if m.IsRaw { + i-- + if m.IsRaw { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.AsIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.AsIndex)) + i-- + dAtA[i] = 0x20 + } + if m.IsIndex { + i-- + if m.IsIndex { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.As_ID) > 0 { + i -= len(m.As_ID) + copy(dAtA[i:], m.As_ID) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.As_ID))) + i-- + dAtA[i] = 0x12 + } + if m.Is_ID { + i-- + if m.Is_ID { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ParsedSignatureDef) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedSignatureDef) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ParsedSignatureDef) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.AsEcdsa) > 0 { + i -= len(m.AsEcdsa) + copy(dAtA[i:], m.AsEcdsa) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsEcdsa))) + i-- + dAtA[i] = 0x32 + } + if m.IsEcdsa { + i-- + if m.IsEcdsa { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.AsSr25519) > 0 { + i -= len(m.AsSr25519) + copy(dAtA[i:], m.AsSr25519) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsSr25519))) + i-- + dAtA[i] = 0x22 + } + if m.IsSr25519 { + i-- + if m.IsSr25519 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.AsEd25519) > 0 { + i -= len(m.AsEd25519) + copy(dAtA[i:], m.AsEd25519) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AsEd25519))) + i-- + dAtA[i] = 0x12 + } + if m.IsEd25519 { + i-- + if m.IsEd25519 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ParsedEra) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedEra) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ParsedEra) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.AsMortalEra != nil { + size, err := m.AsMortalEra.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.IsMortalEra { + i-- + if m.IsMortalEra { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.IsImmortalEra { + i-- + if m.IsImmortalEra { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ParsedMortalEra) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedMortalEra) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ParsedMortalEra) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Last != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Last)) + i-- + dAtA[i] = 0x10 + } + if m.First != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.First)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ParsedPaymentFields) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParsedPaymentFields) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ParsedPaymentFields) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ParsedExtrinsics) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Extrinsics) > 0 { + for _, e := range m.Extrinsics { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *ParsedExtrinsic) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.CallFields) > 0 { + for _, e := range m.CallFields { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.CallIndex != nil { + l = m.CallIndex.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Version != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Version)) + } + if m.Signature != nil { + l = m.Signature.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ParsedField) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.LookupIndex != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.LookupIndex)) + } + l = len(m.Type) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if vtmsg, ok := m.Value.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + n += len(m.unknownFields) + return n +} + +func (m *ParsedField_FieldValue) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FieldValue) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return n +} +func (m *ParsedField_Fields) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Fields != nil { + l = m.Fields.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *ParsedFields) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *ParsedCallIndex) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SectionIndex != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.SectionIndex)) + } + if m.MethodIndex != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.MethodIndex)) + } + n += len(m.unknownFields) + return n +} + +func (m *ParsedSignature) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Signer != nil { + l = m.Signer.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Signature != nil { + l = m.Signature.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Era != nil { + l = m.Era.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.None) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.PaymentFields != nil { + l = m.PaymentFields.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ParsedSigner) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Is_ID { + n += 2 + } + l = len(m.As_ID) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsIndex { + n += 2 + } + if m.AsIndex != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.AsIndex)) + } + if m.IsRaw { + n += 2 + } + l = len(m.AsRaw) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsAddress_32 { + n += 2 + } + l = len(m.AsAddress_32) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsAddress_20 { + n += 2 + } + l = len(m.AsAddress_20) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ParsedSignatureDef) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IsEd25519 { + n += 2 + } + l = len(m.AsEd25519) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsSr25519 { + n += 2 + } + l = len(m.AsSr25519) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IsEcdsa { + n += 2 + } + l = len(m.AsEcdsa) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ParsedEra) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IsImmortalEra { + n += 2 + } + if m.IsMortalEra { + n += 2 + } + if m.AsMortalEra != nil { + l = m.AsMortalEra.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ParsedMortalEra) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.First != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.First)) + } + if m.Last != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Last)) + } + n += len(m.unknownFields) + return n +} + +func (m *ParsedPaymentFields) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Tip) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ParsedExtrinsics) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedExtrinsics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedExtrinsics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Extrinsics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Extrinsics = append(m.Extrinsics, &ParsedExtrinsic{}) + if err := m.Extrinsics[len(m.Extrinsics)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedExtrinsic) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedExtrinsic: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedExtrinsic: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CallFields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CallFields = append(m.CallFields, &ParsedField{}) + if err := m.CallFields[len(m.CallFields)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CallIndex", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CallIndex == nil { + m.CallIndex = &ParsedCallIndex{} + } + if err := m.CallIndex.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &ParsedSignature{} + } + if err := m.Signature.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedField) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedField: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedField: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LookupIndex", wireType) + } + m.LookupIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LookupIndex |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = &ParsedField_FieldValue{FieldValue: string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*ParsedField_Fields); ok { + if err := oneof.Fields.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ParsedField{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &ParsedField_Fields{Fields: v} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedFields) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedFields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedFields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value, &ParsedField{}) + if err := m.Value[len(m.Value)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedCallIndex) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedCallIndex: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedCallIndex: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SectionIndex", wireType) + } + m.SectionIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SectionIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MethodIndex", wireType) + } + m.MethodIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MethodIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedSignature) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedSignature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedSignature: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signer == nil { + m.Signer = &ParsedSigner{} + } + if err := m.Signer.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &ParsedSignatureDef{} + } + if err := m.Signature.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Era", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Era == nil { + m.Era = &ParsedEra{} + } + if err := m.Era.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field None", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.None = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymentFields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PaymentFields == nil { + m.PaymentFields = &ParsedPaymentFields{} + } + if err := m.PaymentFields.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedSigner) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedSigner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedSigner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Is_ID", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Is_ID = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field As_ID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.As_ID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsIndex", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsIndex = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AsIndex", wireType) + } + m.AsIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AsIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsRaw", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsRaw = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsRaw", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsRaw = append(m.AsRaw[:0], dAtA[iNdEx:postIndex]...) + if m.AsRaw == nil { + m.AsRaw = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsAddress_32", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsAddress_32 = bool(v != 0) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsAddress_32", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsAddress_32 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsAddress_20", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsAddress_20 = bool(v != 0) + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsAddress_20", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsAddress_20 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedSignatureDef) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedSignatureDef: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedSignatureDef: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEd25519", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEd25519 = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsEd25519", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsEd25519 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsSr25519", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsSr25519 = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsSr25519", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsSr25519 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEcdsa", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEcdsa = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsEcdsa", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsEcdsa = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedEra) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedEra: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedEra: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsImmortalEra", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsImmortalEra = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsMortalEra", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsMortalEra = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsMortalEra", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AsMortalEra == nil { + m.AsMortalEra = &ParsedMortalEra{} + } + if err := m.AsMortalEra.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedMortalEra) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedMortalEra: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedMortalEra: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field First", wireType) + } + m.First = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.First |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Last", wireType) + } + m.Last = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Last |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedPaymentFields) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedPaymentFields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedPaymentFields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedExtrinsics) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedExtrinsics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedExtrinsics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.BlockHash = stringValue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Extrinsics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Extrinsics = append(m.Extrinsics, &ParsedExtrinsic{}) + if err := m.Extrinsics[len(m.Extrinsics)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedExtrinsic) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedExtrinsic: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedExtrinsic: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Name = stringValue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CallFields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CallFields = append(m.CallFields, &ParsedField{}) + if err := m.CallFields[len(m.CallFields)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CallIndex", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CallIndex == nil { + m.CallIndex = &ParsedCallIndex{} + } + if err := m.CallIndex.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &ParsedSignature{} + } + if err := m.Signature.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedField) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedField: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedField: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Name = stringValue + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LookupIndex", wireType) + } + m.LookupIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LookupIndex |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Type = stringValue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Value = &ParsedField_FieldValue{FieldValue: stringValue} + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Value.(*ParsedField_Fields); ok { + if err := oneof.Fields.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ParsedField{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &ParsedField_Fields{Fields: v} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedFields) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedFields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedFields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value, &ParsedField{}) + if err := m.Value[len(m.Value)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedCallIndex) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedCallIndex: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedCallIndex: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SectionIndex", wireType) + } + m.SectionIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SectionIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MethodIndex", wireType) + } + m.MethodIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MethodIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedSignature) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedSignature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedSignature: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signer == nil { + m.Signer = &ParsedSigner{} + } + if err := m.Signer.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Signature == nil { + m.Signature = &ParsedSignatureDef{} + } + if err := m.Signature.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Era", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Era == nil { + m.Era = &ParsedEra{} + } + if err := m.Era.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field None", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.None = stringValue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymentFields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PaymentFields == nil { + m.PaymentFields = &ParsedPaymentFields{} + } + if err := m.PaymentFields.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedSigner) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedSigner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedSigner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Is_ID", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Is_ID = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field As_ID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.As_ID = stringValue + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsIndex", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsIndex = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AsIndex", wireType) + } + m.AsIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AsIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsRaw", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsRaw = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsRaw", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsRaw = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsAddress_32", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsAddress_32 = bool(v != 0) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsAddress_32", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AsAddress_32 = stringValue + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsAddress_20", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsAddress_20 = bool(v != 0) + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsAddress_20", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AsAddress_20 = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedSignatureDef) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedSignatureDef: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedSignatureDef: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEd25519", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEd25519 = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsEd25519", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AsEd25519 = stringValue + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsSr25519", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsSr25519 = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsSr25519", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AsSr25519 = stringValue + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEcdsa", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEcdsa = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsEcdsa", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AsEcdsa = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedEra) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedEra: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedEra: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsImmortalEra", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsImmortalEra = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsMortalEra", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsMortalEra = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsMortalEra", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AsMortalEra == nil { + m.AsMortalEra = &ParsedMortalEra{} + } + if err := m.AsMortalEra.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedMortalEra) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedMortalEra: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedMortalEra: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field First", wireType) + } + m.First = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.First |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Last", wireType) + } + m.Last = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Last |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParsedPaymentFields) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParsedPaymentFields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParsedPaymentFields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Tip = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/vara-common/proto/block.proto b/vara-common/proto/block.proto new file mode 100644 index 0000000..475ebd2 --- /dev/null +++ b/vara-common/proto/block.proto @@ -0,0 +1,169 @@ +syntax = "proto3"; +package sf.gear.type.v1; + +option go_package = "github.com/streamingfast/firehose-gear/pb;pbgear"; + +message Block { + uint64 number = 1; + string hash = 2; + Header header = 3; + repeated Extrinsic extrinsics = 4; + repeated Event events = 5; + repeated DigestItem digest_items = 6; + bytes justification = 7; +} + +message Header { + // [32]byte + string parent_hash = 1; + // [32]byte + string state_root = 2; + // [32]byte + string extrinsics_root = 3; +} + +message DigestItem { + oneof Item { + // [32]byte + string as_changes_trie_root = 1; + PreRuntime as_pre_runtime = 2; + Consensus as_consensus = 3; + Seal as_seal = 4; + ChangesTrieSignal as_changes_trie_signal = 5; + bytes as_other = 6; + } +} + +message PreRuntime { + uint32 consensus_engine_id = 1; + bytes bytes = 2; +} + +message Consensus { + uint32 consensus_engine_id = 1; + bytes bytes = 2; +} + +message Seal { + uint32 consensus_engine_id = 1; + bytes bytes = 2; +} + +message ChangesTrieSignal { + bool is_new_configuration = 1; + bytes as_new_configuration = 2; +} + +message Extrinsic { + uint32 version = 1; + Signature signature = 2; + Call method = 3; +} + +message Signature { + MultiAddress signer = 1; + MultiSignature signature = 2; + ExtrinsicEra era = 3; + // big.Int + string nonce = 4; + // big.Int + string tip = 5; +} + +message MultiAddress { + bool is_id = 1; + // [32]byte + string as_id = 2; + bool is_index = 3; + uint32 as_index = 4; + bool is_raw = 5; + // []byte + string as_raw = 6; + bool is_address_32 = 7; + // []byte + string as_address_32 = 8; + bool is_address_20 = 9; + // [20]byte + string as_address_20 = 10; +} + +message MultiSignature { + bool is_ed_25519 = 1; + // [64]byte + string as_ed_25519 = 2; + bool is_sr_25519 = 3; + // [64]byte + string as_sr_25519 = 4; + bool is_ecdsa = 5; + // [65]byte + string as_ecdsa = 6; +} + +message ExtrinsicEra { + bool is_immortal_era = 1; + bool is_mortal_era = 2; + MortalEra as_mortal_era = 3; +} + +message Call { + CallIndex call_index = 1; + bytes args = 2; +} + +message Field { + string name = 1; + int64 lookup_index = 2; + + oneof value { + string json_value = 3; + Fields fields = 4; + } +} + +message Fields { + repeated Field value = 1; +} + +message CallIndex { + uint32 section_index = 1; + uint32 method_index = 2; +} + +message Event { + string name = 1; + repeated Field fields = 2; + // [2]byte + string id = 3; + Phase phase = 4; + // [32]byte + repeated string topics = 5; +} + +message Phase { + bool is_apply_extrinsic = 1; + uint32 as_apply_extrinsic = 2; + bool is_finalization = 3; + bool is_initialization = 4; +} + +message SignatureDef { + bool is_ed25519 = 1; + // [64]byte + string as_ed25519 = 2; + bool is_sr25519 = 3; + // [64]byte + string as_sr25519 = 4; + bool is_ecdsa = 5; + // [65]byte + string as_ecdsa = 6; +} + +message MortalEra { + uint32 first = 1; + uint32 second = 2; +} + +message PaymentFields { + // big.Int + string tip = 1; +} \ No newline at end of file diff --git a/vara-common/proto/extrinsics.proto b/vara-common/proto/extrinsics.proto new file mode 100644 index 0000000..f30858c --- /dev/null +++ b/vara-common/proto/extrinsics.proto @@ -0,0 +1,95 @@ +syntax = "proto3"; +package sf.substreams.vara.v1; + +option go_package = "github.com/streamingfast/firehose-gear/pb;pbgear"; + +message ParsedExtrinsics { + string block_hash = 1; + repeated ParsedExtrinsic extrinsics = 2; +} + +message ParsedExtrinsic { + string name = 1; + repeated ParsedField call_fields = 2; + ParsedCallIndex call_index = 3; + uint32 version = 4; + ParsedSignature signature = 5; +} + +message ParsedField { + string name = 1; + int64 lookup_index = 2; + string type = 3; + oneof value { + string field_value = 4; + ParsedField fields = 5; + } + +} + +message AirDropTransferExt { + // AccountId + string source = 1; + // AccountId + string dest = 2; + // U128 + string amount = 3; +} + +message ParsedCallIndex { + uint32 section_index = 1; + uint32 method_index = 2; +} + +message ParsedSignature { + ParsedSigner signer = 1; + ParsedSignatureDef signature = 2; + ParsedEra era = 12; + // big.Int + string none = 13; + ParsedPaymentFields payment_fields = 14; +} + +message ParsedSigner { + bool is_ID = 1; + // [32]byte + string as_ID = 2; + bool is_index = 3; + uint32 as_index = 4; + bool is_raw = 5; + bytes as_raw = 6; + bool is_address_32 = 7; + // [32]byte + string as_address_32 = 8; + bool is_address_20 = 9; + // [20]byte + string as_address_20 = 10; +} + +message ParsedSignatureDef { + bool is_ed25519 = 1; + // [64]byte + string as_ed25519 = 2; + bool is_sr25519 = 3; + // [64]byte + string as_sr25519 = 4; + bool is_ecdsa = 5; + // [65]byte + string as_ecdsa = 6; +} + +message ParsedEra { + bool is_immortal_era = 1; + bool is_mortal_era = 2; + ParsedMortalEra as_mortal_era = 3; +} + +message ParsedMortalEra { + uint32 first = 1; + uint32 last = 2; +} + +message ParsedPaymentFields { + // big.Int + string tip = 1; +} \ No newline at end of file diff --git a/vara-common/substreams.vara.yaml b/vara-common/substreams.vara.yaml new file mode 100644 index 0000000..9115738 --- /dev/null +++ b/vara-common/substreams.vara.yaml @@ -0,0 +1,28 @@ +specVersion: v0.1.0 +package: + name: mytinytest + version: v0.1.1 + +protobuf: + files: + - block.proto + importPaths: + - ./proto + +binaries: + default: + type: wasip1/tinygo-v1 + file: ./wasm.wasm + +network: mainnet + +modules: + - name: map_extrinsics + kind: map + initialBlock: 0 + inputs: + - source: sf.gear.type.v1.Block + output: + type: proto:sf.gear.type.v1.ParsedExtrinsics + +# TODO: create map_events \ No newline at end of file diff --git a/vara-common/substreams.yaml b/vara-common/substreams.yaml new file mode 100644 index 0000000..d82b68a --- /dev/null +++ b/vara-common/substreams.yaml @@ -0,0 +1,27 @@ +specVersion: v0.1.0 +package: + name: mytinytest + version: v0.1.0 + +protobuf: + files: + - block.proto + - extrinsics.proto + importPaths: + - ./proto + +binaries: + default: + type: wasip1/tinygo-v1 # wasm/rust-v1 + file: ./wasm.wasm + +network: mainnet + +modules: + - name: map_test + kind: map + initialBlock: 12360600 + inputs: + - source: sf.ethereum.type.v2.Block + output: + type: proto:my.Block From 8ca1fbfddd3ecc2844a2209763339dc916958750 Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Thu, 11 Jul 2024 11:04:51 -0400 Subject: [PATCH 09/23] starknet initial foundational modules --- starket-common/.gitignore | 2 + starket-common/Makefile | 19 ++ starket-common/README.md | 25 ++ starket-common/generated.go | 170 ++++++++++ starket-common/go.mod | 25 ++ starket-common/local.go | 10 + starket-common/main.go | 191 +++++++++++ starket-common/main_test.go | 50 +++ .../starknet/type/v1/starknet.proto | 14 + starket-common/sqe/api.go | 54 +++ starket-common/sqe/api_test.go | 150 +++++++++ starket-common/sqe/bitmap.go | 116 +++++++ starket-common/sqe/bitmap_test.go | 57 ++++ starket-common/sqe/errors.go | 39 +++ starket-common/sqe/init_test.go | 79 +++++ starket-common/sqe/keys.go | 80 +++++ starket-common/sqe/keys_test.go | 70 ++++ starket-common/sqe/lexer.go | 111 ++++++ starket-common/sqe/lexer_test.go | 57 ++++ starket-common/sqe/optimizer.go | 33 ++ starket-common/sqe/optimizer_test.go | 120 +++++++ starket-common/sqe/parser.go | 263 +++++++++++++++ starket-common/sqe/parser_bench_test.go | 54 +++ starket-common/sqe/parser_test.go | 317 ++++++++++++++++++ starket-common/sqe/transformer.go | 38 +++ starket-common/sqe/traversal.go | 113 +++++++ starket-common/sqe/types.go | 111 ++++++ starket-common/substreams.yaml | 59 ++++ 28 files changed, 2427 insertions(+) create mode 100644 starket-common/.gitignore create mode 100644 starket-common/Makefile create mode 100644 starket-common/README.md create mode 100644 starket-common/generated.go create mode 100644 starket-common/go.mod create mode 100644 starket-common/local.go create mode 100644 starket-common/main.go create mode 100644 starket-common/main_test.go create mode 100644 starket-common/proto/sf/substreams/starknet/type/v1/starknet.proto create mode 100644 starket-common/sqe/api.go create mode 100644 starket-common/sqe/api_test.go create mode 100644 starket-common/sqe/bitmap.go create mode 100644 starket-common/sqe/bitmap_test.go create mode 100644 starket-common/sqe/errors.go create mode 100644 starket-common/sqe/init_test.go create mode 100644 starket-common/sqe/keys.go create mode 100644 starket-common/sqe/keys_test.go create mode 100644 starket-common/sqe/lexer.go create mode 100644 starket-common/sqe/lexer_test.go create mode 100644 starket-common/sqe/optimizer.go create mode 100644 starket-common/sqe/optimizer_test.go create mode 100644 starket-common/sqe/parser.go create mode 100644 starket-common/sqe/parser_bench_test.go create mode 100644 starket-common/sqe/parser_test.go create mode 100644 starket-common/sqe/transformer.go create mode 100644 starket-common/sqe/traversal.go create mode 100644 starket-common/sqe/types.go create mode 100644 starket-common/substreams.yaml diff --git a/starket-common/.gitignore b/starket-common/.gitignore new file mode 100644 index 0000000..d1a75fe --- /dev/null +++ b/starket-common/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +wasm.wasm diff --git a/starket-common/Makefile b/starket-common/Makefile new file mode 100644 index 0000000..3705982 --- /dev/null +++ b/starket-common/Makefile @@ -0,0 +1,19 @@ +delete-binpb: +ifneq ("$(wildcard $(PATH_TO_FILE))","") + rm proto/generated-buf-build.binpb +endif + +generated-buf-build.binpb: proto/buf.gen.yaml proto/buf.yaml delete-binpb + cd proto; buf mod update; buf build --as-file-descriptor-set -o generated-buf-build.binpb + +.PHONY: build +build: generated-buf-build.binpb + cargo build --target wasm32-unknown-unknown --release + +.PHONY: protogen +protogen: generated-buf-build.binpb + cd proto; buf generate generated-buf-build.binpb -o ../ + +.PHONY: package +package: build + substreams pack ./substreams.yaml \ No newline at end of file diff --git a/starket-common/README.md b/starket-common/README.md new file mode 100644 index 0000000..543e15b --- /dev/null +++ b/starket-common/README.md @@ -0,0 +1,25 @@ +# Substreams in Go with tinygo + +First test is to receive a Clock in Go, and ship it to the Substreams engine, and have it run over there. + +- Craft a first `map_mod` that prints something to logs. + +First test is to unpack a raw Ethereum Block, from within `tinygo`. + +## Build + +```bash +tinygo build -o wasm.wasm -target wasi -scheduler none . +``` + +## Usage + +```bash +substreams gui ./substreams-starknet.yaml --plaintext -e 127.0.0.1:10016 -t +10 map_test +# or +substreams run ./substreams-starknet.yaml --plaintext -e 127.0.0.1:10016 -t +10 map_test +``` + +```bash +buf generate --exclude-path sf/substreams-starknet/v1,sf/substreams-starknet/rpc,google/,sf/substreams-starknet/sink,sf/substreams-starknet +``` diff --git a/starket-common/generated.go b/starket-common/generated.go new file mode 100644 index 0000000..24b16f9 --- /dev/null +++ b/starket-common/generated.go @@ -0,0 +1,170 @@ +//go:build tinygo + +package main + +import ( + "fmt" + "reflect" + "unsafe" + + pbstarknet "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/starknet/type/v1" + v1 "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/starknet/type/v1" +) + +//go:generate substreams-starknet protogen ./substreams-starknet.yaml --with-tinygo-maps // creates genre substreams-starknet.gen.go + +// Dans WASI: _start +func main() {} + +////export db_get_i64 +//func _db_get_i64(code, scope, key uint64) []byte {} + +//export output +func _output(ptr, len int32) + +//go:wasm-module logger +//export println +func _log(ptr int32, len int32) + +// Output the serialized protobuf byte array to the Substreams engine +func output(out []byte) { + _output(byteArrayToPtr(out)) +} + +// Log a line to the Substreams engine +func Logf(message string, args ...any) { + _log(stringToPtr(fmt.Sprintf(message, args...))) +} + +//export all_transactions +func _all_transactions(blockPtr, blockLen int32) (retval int32) { + defer func() { + if r := recover(); r != nil { + Logf("%#v", r) + retval = 1 + } + }() + + a := ptrToString(blockPtr, blockLen) + b := []byte(a) + dest := &pbstarknet.Block{} + if err := dest.UnmarshalVT(b); err != nil { + Logf("failed unmarshal: %s", err) + return 1 + } + + ret, err := AllTransactions(dest) + if err != nil { + panic(fmt.Errorf("map_extrinsics failed: %w", err)) + } + if ret != nil { + cnt, err := ret.MarshalVT() + if err != nil { + panic(fmt.Errorf("marshal output: %w", err)) + } + output(cnt) + } + return 0 +} + +//export index_transactions +func _index_transactions(ptr, len int32) (retval int32) { + defer func() { + if r := recover(); r != nil { + Logf("%#v", r) + retval = 1 + } + }() + + a := ptrToString(int32(ptr), int32(len)) + b := []byte(a) + dest := &v1.Transactions{} + if err := dest.UnmarshalVT(b); err != nil { + Logf("failed unmarshal: %s", err) + return 1 + } + + ret, err := IndexTransaction(dest) + if err != nil { + panic(fmt.Errorf("map_extrinsics failed: %w", err)) + } + if ret != nil { + cnt, err := ret.MarshalVT() + if err != nil { + panic(fmt.Errorf("marshal output: %w", err)) + } + output(cnt) + } + return 0 +} + +//export filtered_transactions +func _filtered_transactions(queryPtr, queryLen int32, transactionsPtr, transactionsLen int32) (ret int32) { + defer func() { + if r := recover(); r != nil { + Logf("%#v", r) + ret = 1 + } + }() + + query := ptrToString(queryPtr, queryLen) + txsData := ptrToBytes(transactionsPtr, transactionsLen) + txs := &v1.Transactions{} + + if err := txs.UnmarshalVT(txsData); err != nil { + Logf("failed unmarshal: %s", err) + return 1 + } + + out, err := FilteredTransactions(query, txs) + if err != nil { + panic(fmt.Errorf("map_extrinsics failed: %w", err)) + } + + if out != nil { + cnt, err := out.MarshalVT() + if err != nil { + panic(fmt.Errorf("marshal output: %w", err)) + } + output(cnt) + } + return 0 +} + +// ptrToString returns a string from WebAssembly compatible numeric types +// representing its pointer and length. +func ptrToString(ptr int32, size int32) string { + // Get a slice view of the underlying bytes in the stream. We use SliceHeader, not StringHeader + // as it allows us to fix the capacity to what was allocated. + return *(*string)(unsafe.Pointer(&reflect.SliceHeader{ + Data: uintptr(ptr), + Len: int(size), // Tinygo requires these as uintptrs even if they are int fields. + Cap: int(size), // ^^ See https://github.com/tinygo-org/tinygo/issues/1284 + })) +} + +func ptrToBytes(ptr int32, size int32) []byte { + // Get a slice view of the underlying bytes in the stream. We use SliceHeader, not StringHeader + // as it allows us to fix the capacity to what was allocated. + return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{ + Data: uintptr(ptr), + Len: int(size), // Tinygo requires these as uintptrs even if they are int fields. + Cap: int(size), // ^^ See https://github.com/tinygo-org/tinygo/issues/1284 + })) +} + +// stringToPtr returns a pointer and size pair for the given string in a way +// compatible with WebAssembly numeric types. +func stringToPtr(s string) (int32, int32) { + buf := []byte(s) + ptr := &buf[0] + unsafePtr := uintptr(unsafe.Pointer(ptr)) + return int32(unsafePtr), int32(len(buf)) +} + +// byteArrayToPtr returns a pointer and size pair for the given byte array, for WASM compat. +func byteArrayToPtr(buf []byte) (int32, int32) { + ptr := &buf[0] + unsafePtr := uintptr(unsafe.Pointer(ptr)) + return int32(unsafePtr), int32(len(buf)) +} diff --git a/starket-common/go.mod b/starket-common/go.mod new file mode 100644 index 0000000..caa490b --- /dev/null +++ b/starket-common/go.mod @@ -0,0 +1,25 @@ +module github.com/streamingfast/substreams-foundational-modules/starket-common + +go 1.22.0 + +require ( + github.com/NethermindEth/juno v0.3.1 + github.com/RoaringBitmap/roaring v1.9.1 + github.com/alecthomas/participle v0.7.1 + github.com/planetscale/vtprotobuf v0.6.0 + github.com/protocolbuffers/protoscope v0.0.0-20221109213918-8e7a6aafa2c9 + github.com/stretchr/testify v1.8.4 + google.golang.org/protobuf v1.33.0 +) + +require ( + github.com/bits-and-blooms/bitset v1.12.0 // indirect + github.com/consensys/gnark-crypto v0.10.1-0.20230414110055-e500f2f0ff3a // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/fxamacker/cbor/v2 v2.4.0 // indirect + github.com/mschoch/smat v0.2.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/x448/float16 v0.8.4 // indirect + golang.org/x/sys v0.20.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/starket-common/local.go b/starket-common/local.go new file mode 100644 index 0000000..beb15e8 --- /dev/null +++ b/starket-common/local.go @@ -0,0 +1,10 @@ +//go:build !tinygo + +package main + +import "fmt" + +// Log a line to the Substreams engine +func Logf(message string, args ...any) { + fmt.Printf(message+"\n", args...) +} diff --git a/starket-common/main.go b/starket-common/main.go new file mode 100644 index 0000000..5caf1d4 --- /dev/null +++ b/starket-common/main.go @@ -0,0 +1,191 @@ +package main + +import ( + "context" + "fmt" + "time" + + "github.com/streamingfast/substreams-foundational-modules/starket-common/sqe" + + "github.com/NethermindEth/juno/core/felt" + pbstarknet "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/starknet/type/v1" + pbindex "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/index/v1" + v1 "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/starknet/type/v1" + pbsubstreams "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/v1" + "google.golang.org/protobuf/types/known/timestamppb" +) + +func AllTransactions(block *pbstarknet.Block) (*v1.Transactions, error) { + Logf("extracting all transactions from block %s", feltToString(block.BlockHash)) + clock := &pbsubstreams.Clock{ + Id: feltToString(block.BlockHash), + Number: block.BlockNumber, + Timestamp: timestamppb.New(time.Unix(int64(block.Timestamp), 0)), + } + + transactions := &v1.Transactions{ + Clock: clock, + } + for _, tx := range block.Transactions { + transactions.TransactionsWithReceipt = append(transactions.TransactionsWithReceipt, tx) + } + + return transactions, nil +} + +func IndexTransaction(transactions *v1.Transactions) (*pbindex.Keys, error) { + keys := &pbindex.Keys{} + for _, tx := range transactions.TransactionsWithReceipt { + idx, err := indexForTransactionsWithReceipt(tx) + if err != nil { + return nil, fmt.Errorf("indexing transaction: %w", err) + } + keys.Keys = append(keys.Keys, idx.Keys.Keys...) + } + return keys, nil +} + +func indexForTransactionsWithReceipt(transaction *pbstarknet.TransactionWithReceipt) (*Index, error) { + index := &Index{ + Keys: &pbindex.Keys{}, + } + + switch tt := transaction.Transaction.(type) { + case *pbstarknet.TransactionWithReceipt_DeployTransactionV0: + t := tt.DeployTransactionV0 + index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) + index.AddKey(feltToIndexKey("tx:contract_address_salt", t.ContractAddressSalt)) + index.AddKey(stringToIndexKey("tx:version", t.Version)) + + case *pbstarknet.TransactionWithReceipt_DeployAccountTransactionV1: + t := tt.DeployAccountTransactionV1 + index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) + index.AddKey(feltToIndexKey("tx:contract_address_salt", t.ContractAddressSalt)) + index.AddKey(stringToIndexKey("tx:version", t.Version)) + + case *pbstarknet.TransactionWithReceipt_DeployAccountTransactionV3: + t := tt.DeployAccountTransactionV3 + index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) + index.AddKey(feltToIndexKey("tx:contract_address_salt", t.ContractAddressSalt)) + index.AddKey(stringToIndexKey("tx:version", t.Version)) + + case *pbstarknet.TransactionWithReceipt_DeclareTransactionV0: + t := tt.DeclareTransactionV0 + index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) + index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) + + case *pbstarknet.TransactionWithReceipt_DeclareTransactionV1: + t := tt.DeclareTransactionV1 + index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) + index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) + + case *pbstarknet.TransactionWithReceipt_DeclareTransactionV2: + t := tt.DeclareTransactionV2 + index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) + index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) + index.AddKey(feltToIndexKey("tx:compile_class_hash", t.CompiledClassHash)) + + case *pbstarknet.TransactionWithReceipt_DeclareTransactionV3: + t := tt.DeclareTransactionV3 + index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) + index.AddKey(feltToIndexKey("tx:compile_class_hash", t.CompiledClassHash)) + index.AddKey(stringToIndexKey("tx:version", t.Version)) + + case *pbstarknet.TransactionWithReceipt_InvokeTransactionV0: + t := tt.InvokeTransactionV0 + index.AddKey(feltToIndexKey("tx:contract_address", t.ContractAddress)) + index.AddKey(stringToIndexKey("tx:version", t.Version)) + index.AddKey(feltToIndexKey("tx:entry_point_selector", t.EntryPointSelector)) + + case *pbstarknet.TransactionWithReceipt_InvokeTransactionV1: + t := tt.InvokeTransactionV1 + index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) + index.AddKey(stringToIndexKey("tx:version", t.Version)) + + case *pbstarknet.TransactionWithReceipt_InvokeTransactionV3: + t := tt.InvokeTransactionV3 + index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) + index.AddKey(stringToIndexKey("tx:version", t.Version)) + + case *pbstarknet.TransactionWithReceipt_L1HandlerTransaction: + t := tt.L1HandlerTransaction + index.AddKey(stringToIndexKey("tx:version", t.Version)) + index.AddKey(feltToIndexKey("tx:contract_address", t.ContractAddress)) + index.AddKey(feltToIndexKey("tx:entry_point_selector", t.EntryPointSelector)) + + default: + return nil, fmt.Errorf("unknown transaction type %T", transaction) + } + receipt := transaction.Receipt + index.AddKey(fmt.Sprintf("rc:type:%d", receipt.Type)) + index.AddKey(fmt.Sprintf("rc:execution_status:%d", receipt.ExecutionStatus)) + + for _, e := range receipt.Events { + index.AddKey(feltToIndexKey("ev:from_address", e.FromAddress)) + for _, key := range e.Keys { + index.AddKey(feltToIndexKey("ev:key", key)) + } + } + + return index, nil +} + +func FilteredTransactions(query string, transactions *v1.Transactions) (*v1.Transactions, error) { + filtered := &v1.Transactions{ + Clock: transactions.Clock, + } + + for _, tx := range transactions.TransactionsWithReceipt { + idx, err := indexForTransactionsWithReceipt(tx) + if err != nil { + return nil, fmt.Errorf("indexing transaction: %w", err) + } + + match, err := applyQuery(idx.Keys, query) + if err != nil { + return nil, fmt.Errorf("applying query: %w", err) + } + if match { + filtered.TransactionsWithReceipt = append(filtered.TransactionsWithReceipt, tx) + } + + } + + if len(filtered.TransactionsWithReceipt) == 0 { + return &v1.Transactions{}, nil + } + + return filtered, nil +} + +func applyQuery(keys *pbindex.Keys, query string) (bool, error) { + keyQuerier := sqe.NewFromKeys(keys.Keys) + q, err := sqe.Parse(context.Background(), query) + if err != nil { + return false, fmt.Errorf("parsing query %q: %w", query, err) + } + + return sqe.KeysApply(q, keyQuerier), nil +} + +type Index struct { + Keys *pbindex.Keys +} + +func (i *Index) AddKey(key string) { + i.Keys.Keys = append(i.Keys.Keys, key) +} + +func stringToIndexKey(prefix, str string) string { + return fmt.Sprintf("%s:%s", prefix, str) +} + +func feltToIndexKey(prefix string, bytes []byte) string { + return fmt.Sprintf("%s:%s", prefix, feltToString(bytes)) +} + +func feltToString(bytes []byte) string { + f := &felt.Felt{} + f.SetBytes(bytes) + return f.String() +} diff --git a/starket-common/main_test.go b/starket-common/main_test.go new file mode 100644 index 0000000..b55aac1 --- /dev/null +++ b/starket-common/main_test.go @@ -0,0 +1,50 @@ +package main + +import ( + "encoding/hex" + "testing" + + v1 "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/starknet/type/v1" + + pbstarknet "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/starknet/type/v1" + "github.com/stretchr/testify/require" +) + +func Test_mapBlockEvents(t *testing.T) { + block := &pbstarknet.Block{ + Transactions: []*pbstarknet.TransactionWithReceipt{ + { + Transaction: &pbstarknet.TransactionWithReceipt_DeployTransactionV0{}, + }, + }, + } + + txs, err := AllTransaction(block) + require.NoError(t, err) + + require.Equal(t, 1, len(txs.TransactionsWithReceipt)) +} + +func Test_FilteredTransactions(t *testing.T) { + ch := []byte("class_hash") + xch := "0x" + hex.EncodeToString(ch) + + tx := &pbstarknet.TransactionWithReceipt{ + Transaction: &pbstarknet.TransactionWithReceipt_DeployTransactionV0{ + DeployTransactionV0: &pbstarknet.DeployTransactionV0{ + ClassHash: []byte("class_hash"), + Version: "0x3", + ContractAddressSalt: []byte("contract_address_salt"), + }, + }, + Receipt: &pbstarknet.TransactionReceipt{}, + } + txs := &v1.Transactions{ + TransactionsWithReceipt: []*pbstarknet.TransactionWithReceipt{tx}, + } + + txs, err := FilteredTransactions("tx:class_hash:"+xch, txs) + require.NoError(t, err) + + require.Equal(t, 1, len(txs.TransactionsWithReceipt)) +} diff --git a/starket-common/proto/sf/substreams/starknet/type/v1/starknet.proto b/starket-common/proto/sf/substreams/starknet/type/v1/starknet.proto new file mode 100644 index 0000000..e597a74 --- /dev/null +++ b/starket-common/proto/sf/substreams/starknet/type/v1/starknet.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package sf.substreams.starknet.type.v1; + +option go_package = "github.com/streamingfast/substreams-starknet-foundational-modules/starknet-common/pb/sf/substreams-starknet/starknet/v1"; + +import "sf/starknet/type/v1/block.proto"; +import "sf/substreams/index/v1/keys.proto"; +import "sf/substreams/v1/clock.proto"; + +message Transactions { + .sf.substreams.v1.Clock clock = 1; + repeated .sf.starknet.type.v1.TransactionWithReceipt transactions_with_receipt = 2; +} diff --git a/starket-common/sqe/api.go b/starket-common/sqe/api.go new file mode 100644 index 0000000..b793304 --- /dev/null +++ b/starket-common/sqe/api.go @@ -0,0 +1,54 @@ +package sqe + +import ( + "context" + "fmt" +) + +// FindAllFieldNames returns all used field names in the AST. There +// is **NO** ordering on the elements, i.e. they might not come in the +// same order specified in the AST. +func ExtractAllKeys(expression Expression) (out []string) { + uniqueFieldNames := map[string]bool{} + onExpression := func(_ context.Context, expr Expression) error { + if v, ok := expr.(*KeyTerm); ok { + uniqueFieldNames[v.Value.Value] = true + } + + return nil + } + + visitor := NewDepthFirstVisitor(nil, onExpression) + expression.Visit(context.Background(), visitor) + + i := 0 + out = make([]string, len(uniqueFieldNames)) + for fieldName := range uniqueFieldNames { + out[i] = fieldName + i++ + } + + return +} + +func TransformExpression(expr Expression, transformer FieldTransformer) error { + if transformer == nil { + return nil + } + + onExpression := func(_ context.Context, expr Expression) error { + v, ok := expr.(*KeyTerm) + if !ok { + return nil + } + + if err := transformer.TransformStringLiteral("", v.Value); err != nil { + return fmt.Errorf("key %q transformation failed: %s", v.Value.Value, err) + } + + return nil + } + + visitor := NewDepthFirstVisitor(nil, onExpression) + return expr.Visit(context.Background(), visitor) +} diff --git a/starket-common/sqe/api_test.go b/starket-common/sqe/api_test.go new file mode 100644 index 0000000..08fdeaa --- /dev/null +++ b/starket-common/sqe/api_test.go @@ -0,0 +1,150 @@ +// Copyright 2024 StreamingFast Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sqe + +import ( + "context" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// func TestExpressionToBleveQuery(t *testing.T) { +// tests := []struct { +// in string +// expectBleve string +// }{ +// { +// in: "account:eoscanadacom", +// expectBleve: `{"term":"eoscanadacom","field":"account"}`, +// }, +// { +// in: "data.active:true", +// expectBleve: `{"bool":true,"field":"data.active"}`, +// }, +// { +// in: "data.active:false", +// expectBleve: `{"bool":false,"field":"data.active"}`, +// }, +// { +// in: `data.active:"true"`, +// expectBleve: `{"term":"true","field":"data.active"}`, +// }, +// { +// in: "receiver:eoscanadacom account:eoscanadacom", +// expectBleve: `{"conjuncts":[{"term":"eoscanadacom","field":"receiver"},{"term":"eoscanadacom","field":"account"}]}`, +// }, +// { +// in: "account:eoscanadacom receiver:eoscanadacom", +// expectBleve: `{"conjuncts":[{"term":"eoscanadacom","field":"account"},{"term":"eoscanadacom","field":"receiver"}]}`, +// }, +// { +// in: "receiver:eoscanadacom (action:transfer OR action:issue)", +// expectBleve: `{"conjuncts":[{"term":"eoscanadacom","field":"receiver"},{"disjuncts":[{"term":"transfer","field":"action"},{"term":"issue","field":"action"}],"min":1}]}`, +// }, +// { +// in: "receiver:eoscanadacom -(action:transfer OR action:issue)", +// expectBleve: `{"conjuncts":[{"term":"eoscanadacom","field":"receiver"},{"must_not":{"disjuncts":[{"disjuncts":[{"term":"transfer","field":"action"},{"term":"issue","field":"action"}],"min":1}],"min":0}}]}`, +// }, +// { +// in: "-receiver:eoscanadacom (action:transfer OR action:issue)", +// expectBleve: `{"conjuncts":[{"must_not":{"disjuncts":[{"term":"eoscanadacom","field":"receiver"}],"min":0}},{"disjuncts":[{"term":"transfer","field":"action"},{"term":"issue","field":"action"}],"min":1}]}`, +// }, +// { +// in: "-action:patate", +// expectBleve: `{"must_not":{"disjuncts":[{"term":"patate","field":"action"}],"min":0}}`, +// }, +// { +// in: "receiver:eoscanadacom (action:transfer OR action:issue) account:eoscanadacom (data.from:eoscanadacom OR data.to:eoscanadacom)", +// expectBleve: `{ +// "conjuncts": [ +// { "term": "eoscanadacom", "field": "receiver" }, +// { "disjuncts": [ +// { "term": "transfer", "field": "action" }, +// { "term": "issue", "field": "action" } +// ], "min": 1 +// }, +// { "term": "eoscanadacom", "field": "account" }, +// { "disjuncts": [ +// { "term": "eoscanadacom", "field": "data.from" }, +// { "term": "eoscanadacom", "field": "data.to" } +// ], "min": 1 +// } +// ] +// }`, +// }, +// } + +// for idx, test := range tests { +// t.Run(fmt.Sprintf("index %d", idx+1), func(t *testing.T) { +// ast, err := Parse(context.Background(), test.in) +// require.NoError(t, err) + +// res := ExpressionToBleve(ast) + +// cnt, err := json.Marshal(res) +// require.NoError(t, err) +// assert.JSONEq(t, test.expectBleve, string(cnt), "Failed on SQE %q, got %s", test.in, string(cnt)) +// }) +// } +// } + +func TestExtractAllKeys(t *testing.T) { + tests := []struct { + in string + expectedKeys []string + }{ + { + "account", + []string{"account"}, + }, + { + "data.active", + []string{"data.active"}, + }, + { + "data.active", + []string{"data.active"}, + }, + { + `"data.active"`, + []string{"data.active"}, + }, + { + "receiver account", + []string{"receiver", "account"}, + }, + { + "receiver (action || action)", + []string{"receiver", "action"}, + }, + { + "receiver (action || action) account (data.from || data.to)", + []string{"receiver", "action", "account", "data.from", "data.to"}, + }, + } + + for idx, test := range tests { + t.Run(fmt.Sprintf("index %d", idx+1), func(t *testing.T) { + ast, err := Parse(context.Background(), test.in) + require.NoError(t, err) + + actuals := ExtractAllKeys(ast) + assert.ElementsMatch(t, test.expectedKeys, actuals, "Mistmatch for SQE %q", test.in) + }) + } +} diff --git a/starket-common/sqe/bitmap.go b/starket-common/sqe/bitmap.go new file mode 100644 index 0000000..88d058f --- /dev/null +++ b/starket-common/sqe/bitmap.go @@ -0,0 +1,116 @@ +package sqe + +import ( + "fmt" + "math" + + "github.com/RoaringBitmap/roaring/roaring64" +) + +func RoaringBitmapsApply(expr Expression, bitmaps map[string]*roaring64.Bitmap) *roaring64.Bitmap { + out := roaringQuerier{bitmaps: bitmaps}.apply(expr) + if out == nil { + return roaring64.New() + } + return out +} + +type roaringRange struct { + startInclusive uint64 + endExlusive uint64 +} + +type roaringQuerier struct { + bitmaps map[string]*roaring64.Bitmap + + // fullRange is computed once and is the full range of all the "block" + // represented within the bitmaps. This is used to optimize the "not" + // operation by flipping the full range. + // + // It's lazy since most expression will not use it so there is no + // need to compute unless strictly necessary. + fullRange *roaringRange +} + +func (q roaringQuerier) apply(expr Expression) *roaring64.Bitmap { + switch v := expr.(type) { + case *KeyTerm: + if out, ok := q.bitmaps[v.Value.Value]; ok { + return out + } + return roaring64.New() + + case *AndExpression, *OrExpression: + children := v.(HasChildrenExpression).GetChildren() + if len(children) == 0 { + panic(fmt.Errorf("%T expression with no children. this make no sense something is wrong in the parser", v)) + } + + firstChild := children[0] + if len(children) == 1 { + return q.apply(firstChild) + } + + result := q.apply(firstChild).Clone() + + var op func(x2 *roaring64.Bitmap) + switch v.(type) { + case *AndExpression: + op = result.And + case *OrExpression: + op = result.Or + default: + panic(fmt.Errorf("has children expression of type %T is not handled correctly", v)) + } + + for _, child := range children[1:] { + op(q.apply(child)) + } + + return result + + case *ParenthesisExpression: + return q.apply(v.Child) + + case *NotExpression: + roaringRange := q.getRoaringRange() + + result := q.apply(v.Child).Clone() + result.Flip(roaringRange.startInclusive, roaringRange.endExlusive) + + return result + + default: + panic(fmt.Errorf("element of type %T is not handled correctly", v)) + } +} + +func (q roaringQuerier) getRoaringRange() *roaringRange { + if q.fullRange == nil { + var start uint64 = math.MaxUint64 + var end uint64 = 0 + for _, bitmap := range q.bitmaps { + if bitmap.IsEmpty() { + continue + } + + first := bitmap.Minimum() + last := bitmap.Maximum() + + if first < start { + start = first + } + + if last > end { + end = last + } + } + + q.fullRange = &roaringRange{ + startInclusive: start, + endExlusive: end + 1, + } + } + + return q.fullRange +} diff --git a/starket-common/sqe/bitmap_test.go b/starket-common/sqe/bitmap_test.go new file mode 100644 index 0000000..2d65547 --- /dev/null +++ b/starket-common/sqe/bitmap_test.go @@ -0,0 +1,57 @@ +package sqe + +import ( + "context" + "strings" + "testing" + + "github.com/RoaringBitmap/roaring/roaring64" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestApplyRoaringBitmap(t *testing.T) { + kv := map[string]*roaring64.Bitmap{ + "bob": roaring64.BitmapOf(1, 2, 3), + "alice": roaring64.BitmapOf(1, 4, 5), + "john": roaring64.BitmapOf(1, 3, 5), + "transfer": roaring64.BitmapOf(1, 3, 5), + "mint": roaring64.BitmapOf(5), + "delegate": roaring64.BitmapOf(4), + } + + // Matrix-based test cases + testCases := []struct { + expr string + operation func() *roaring64.Bitmap + result []uint64 + }{ + { + expr: "bob || alice", + result: []uint64{1, 2, 3, 4, 5}, + }, + { + expr: "bob transfer", + result: []uint64{1, 3}, + }, + { + expr: "(alice || bob) transfer", + result: []uint64{1, 3, 5}, + }, + { + expr: "(alice || bob) (delegate || mint)", + result: []uint64{4, 5}, + }, + } + + // Run test cases + for _, tc := range testCases { + parser, err := NewParser(strings.NewReader(tc.expr)) + require.NoError(t, err) + + expr, err := parser.Parse(context.Background()) + require.NoError(t, err) + + assert.ElementsMatch(t, tc.result, RoaringBitmapsApply(expr, kv).ToArray()) + } +} diff --git a/starket-common/sqe/errors.go b/starket-common/sqe/errors.go new file mode 100644 index 0000000..52526d3 --- /dev/null +++ b/starket-common/sqe/errors.go @@ -0,0 +1,39 @@ +package sqe + +import ( + "fmt" + + lex "github.com/alecthomas/participle/lexer" +) + +type ParseError struct { + message string + position lex.Position +} + +func parserError(message string, position lex.Position) *ParseError { + return &ParseError{ + message: message, + position: position, + } +} + +func rangeParserError(message string, start lex.Position, end lex.Position) *ParseError { + return &ParseError{ + message: message, + position: lex.Position{ + Filename: start.Filename, + Offset: start.Offset, + Line: start.Line, + Column: end.Column, + }, + } +} + +func (e *ParseError) Error() string { + if e.position.Line <= 1 { + return fmt.Sprintf("%s at column %d", e.message, e.position.Offset) + } + + return fmt.Sprintf("%s at line %d column %d", e.message, e.position.Line, e.position.Column) +} diff --git a/starket-common/sqe/init_test.go b/starket-common/sqe/init_test.go new file mode 100644 index 0000000..24d6098 --- /dev/null +++ b/starket-common/sqe/init_test.go @@ -0,0 +1,79 @@ +package sqe + +import ( + "context" + "fmt" + "io" + "strings" +) + +func expressionToString(expression Expression) string { + builder := &strings.Builder{} + visitor := &TestVisitor{ + writer: builder, + } + + expression.Visit(context.Background(), visitor) + + return builder.String() +} + +type TestVisitor struct { + writer io.Writer +} + +func (v *TestVisitor) Visit_And(ctx context.Context, e *AndExpression) error { + return v.visit_binary(ctx, "<", "&&", ">", e.Children) +} + +func (v *TestVisitor) Visit_Or(ctx context.Context, e *OrExpression) error { + return v.visit_binary(ctx, "[", "||", "]", e.Children) +} + +func (v *TestVisitor) visit_binary(ctx context.Context, opStart, op, opEnd string, children []Expression) error { + v.print(opStart) + + for i, child := range children { + if i != 0 { + v.print(" %s ", op) + } + + child.Visit(ctx, v) + } + v.print(opEnd) + + return nil +} + +func (v *TestVisitor) Visit_Parenthesis(ctx context.Context, e *ParenthesisExpression) error { + v.print("(") + e.Child.Visit(ctx, v) + v.print(")") + + return nil +} + +func (v *TestVisitor) Visit_Not(ctx context.Context, e *NotExpression) error { + v.print("!") + e.Child.Visit(ctx, v) + + return nil +} + +func (v *TestVisitor) Visit_KeyTerm(ctx context.Context, e *KeyTerm) error { + v.printStringLiteral(e.Value) + return nil +} + +func (v *TestVisitor) printStringLiteral(literal *StringLiteral) error { + if literal.QuotingChar != "" { + return v.print("%s%s%s", literal.QuotingChar, literal.Value, literal.QuotingChar) + } + + return v.print(literal.Value) +} + +func (v *TestVisitor) print(message string, args ...interface{}) error { + fmt.Fprintf(v.writer, message, args...) + return nil +} diff --git a/starket-common/sqe/keys.go b/starket-common/sqe/keys.go new file mode 100644 index 0000000..1c411f8 --- /dev/null +++ b/starket-common/sqe/keys.go @@ -0,0 +1,80 @@ +package sqe + +import ( + "fmt" +) + +type KeysQuerier struct { + blockKeys map[string]struct{} +} + +func NewFromKeys(keys []string) KeysQuerier { + blockKeys := make(map[string]struct{}, len(keys)) + for _, key := range keys { + blockKeys[key] = struct{}{} + } + return KeysQuerier{blockKeys: blockKeys} +} + +func KeysApply(expr Expression, blockKeys KeysQuerier) bool { + return blockKeys.apply(expr) +} + +func (k KeysQuerier) apply(expr Expression) bool { + switch v := expr.(type) { + case *KeyTerm: + if k.blockKeys == nil { + return false + } + + _, ok := k.blockKeys[v.Value.Value] + return ok + + case *AndExpression, *OrExpression: + children := v.(HasChildrenExpression).GetChildren() + if len(children) == 0 { + panic(fmt.Errorf("%T expression with no children. this make no sense something is wrong in the parser", v)) + } + + firstChild := children[0] + if len(children) == 1 { + return k.apply(firstChild) + } + + result := k.apply(firstChild) + + var op func(bool) + switch v.(type) { + case *AndExpression: + op = func(x bool) { + result = result && x + } + + case *OrExpression: + op = func(x bool) { + result = result || x + } + default: + panic(fmt.Errorf("has children expression of type %T is not handled correctly", v)) + } + + for _, child := range children[1:] { + op(k.apply(child)) + } + + return result + + case *ParenthesisExpression: + return k.apply(v.Child) + + case *NotExpression: + if k.blockKeys == nil { + return false + } + + return !k.apply(v.Child) + + default: + panic(fmt.Errorf("element of type %T is not handled correctly", v)) + } +} diff --git a/starket-common/sqe/keys_test.go b/starket-common/sqe/keys_test.go new file mode 100644 index 0000000..f0af2ea --- /dev/null +++ b/starket-common/sqe/keys_test.go @@ -0,0 +1,70 @@ +package sqe + +import ( + "context" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestApplyKeys(t *testing.T) { + kv := map[string]struct{}{ + "bob": {}, + "alice": {}, + "etienne": {}, + "charlie": {}, + "delegate": {}, + "mint": {}, + } + + blockKeys := KeysQuerier{blockKeys: kv} + + // Matrix-based test cases + testCases := []struct { + name string + expr string + result bool + }{ + { + name: "Or", + expr: "bob || alice", + result: true, + }, + { + name: "And", + expr: "bob transfer", + result: false, + }, + { + name: "And(Or key)", + expr: "(alice || bob) transfer", + result: false, + }, + { + name: "And(Or Or)", + expr: "(alice || bob) (delegate || mint)", + result: true, + }, + + { + name: "2 And", + expr: "alice john mint", + result: false, + }, + } + + // Run test cases + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + parser, err := NewParser(strings.NewReader(tc.expr)) + require.NoError(t, err) + + expr, err := parser.Parse(context.Background()) + require.NoError(t, err) + + assert.Equal(t, tc.result, blockKeys.apply(expr)) + }) + } +} diff --git a/starket-common/sqe/lexer.go b/starket-common/sqe/lexer.go new file mode 100644 index 0000000..331cf71 --- /dev/null +++ b/starket-common/sqe/lexer.go @@ -0,0 +1,111 @@ +package sqe + +import ( + "fmt" + "io" + + lex "github.com/alecthomas/participle/lexer" +) + +type lexer struct { + *lex.PeekingLexer + + symbols map[rune]string +} + +func newLexer(reader io.Reader) (*lexer, error) { + l, err := lexerDefinition.Lex(reader) + if err != nil { + return nil, fmt.Errorf("new lexer: %s", err) + } + + peekingLexer, err := lex.Upgrade(l) + if err != nil { + return nil, fmt.Errorf("peekable lexer: %s", err) + } + + return &lexer{ + PeekingLexer: peekingLexer, + symbols: lex.SymbolsByRune(lexerDefinition), + }, nil +} + +func (l *lexer) skipSpaces() { + for { + token, err := l.Peek(0) + if err != nil || !l.isSpace(token) { + return + } + + l.mustLexNext() + } +} + +func (l *lexer) mustLexNext() lex.Token { + token, err := l.Next() + if err != nil { + panic(err) + } + + return token +} + +func (l *lexer) peekPos() lex.Position { + peek, err := l.Peek(0) + if err != nil { + return lex.Position{Filename: "", Line: 1, Offset: l.PeekingLexer.Length() - 1, Column: l.PeekingLexer.Length()} + } + + return peek.Pos +} + +var lexerDefinition = lex.Must(lex.Regexp( + `(?m)` + + `(?P"|')` + + // `|(?P,)` + + `|(?P\-)` + + `|(?P\|\|)` + + `|(?P&&)` + + `|(?P\()` + + `|(?P\))` + + // `|(?P\[)` + + // `|(?P\])` + + `|(?P[^\s'"\-\(\)][^\s'"\(\)]*)` + + `|(?P\s+)`, +)) + +func (l *lexer) isSpace(t lex.Token) bool { return l.isTokenType(t, "Space") } +func (l *lexer) isQuoting(t lex.Token) bool { return l.isTokenType(t, "Quoting") } + +// func (l *lexer) isColon(t lex.Token) bool { return l.isTokenType(t, "Colon") } +// func (l *lexer) isComma(t lex.Token) bool { return l.isTokenType(t, "Comma") } +func (l *lexer) isNotOperator(t lex.Token) bool { return l.isTokenType(t, "NotOperator") } +func (l *lexer) isOrOperator(t lex.Token) bool { return l.isTokenType(t, "OrOperator") } +func (l *lexer) isAndOperator(t lex.Token) bool { return l.isTokenType(t, "AndOperator") } +func (l *lexer) isLeftParenthesis(t lex.Token) bool { return l.isTokenType(t, "LeftParenthesis") } +func (l *lexer) isRightParenthesis(t lex.Token) bool { return l.isTokenType(t, "RightParenthesis") } + +// func (l *lexer) isLeftSquareBracket(t lex.Token) bool { return l.isTokenType(t, "LeftSquareBracket") } +// func (l *lexer) isRightSquareBracket(t lex.Token) bool { return l.isTokenType(t, "RightSquareBracket") } +func (l *lexer) isName(t lex.Token) bool { return l.isTokenType(t, "Name") } + +func (l *lexer) isTokenType(token lex.Token, expectedType string) bool { + return l.symbols[token.Type] == expectedType +} + +func (l *lexer) isBinaryOperator(t lex.Token) bool { + return l.isAnyTokenType(t, "AndOperator", "OrOperator") +} + +func (l *lexer) isAnyTokenType(token lex.Token, expectedTypes ...string) bool { + for _, expectedType := range expectedTypes { + if l.symbols[token.Type] == expectedType { + return true + } + } + return false +} + +func (l *lexer) getTokenType(token lex.Token) string { + return l.symbols[token.Type] +} diff --git a/starket-common/sqe/lexer_test.go b/starket-common/sqe/lexer_test.go new file mode 100644 index 0000000..0ab0097 --- /dev/null +++ b/starket-common/sqe/lexer_test.go @@ -0,0 +1,57 @@ +package sqe + +import ( + "bytes" + "testing" + + lex "github.com/alecthomas/participle/lexer" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestLexer(t *testing.T) { + tests := []struct { + name string + sqe string + tokens []string + }{ + {"minus_followed_by_name", `-token`, []string{"NotOperator", "Name", "EOF"}}, + + {"name_with_inside_minus", `open-token`, []string{"Name", "EOF"}}, + + // {"legacy_and", `AND`, []string{"AndOperator", "EOF"}}, + {"new_and", `&&`, []string{"AndOperator", "EOF"}}, + + // {"legacy_or", `OR`, []string{"OrOperator", "EOF"}}, + {"new_or", `||`, []string{"OrOperator", "EOF"}}, + + {"quoting characters start", `'some "some`, []string{"Quoting", "Name", "Space", "Quoting", "Name", "EOF"}}, + {"quoting characters end", `some' some"`, []string{"Name", "Quoting", "Space", "Name", "Quoting", "EOF"}}, + + // {"square_brackets", `[field, "double quoted"]`, []string{"LeftSquareBracket", "Name", "Comma", "Space", "Quoting", "Name", "Space", "Name", "Quoting", "RightSquareBracket", "EOF"}}, + + {"expresion_with_and", `action && field`, []string{"Name", "Space", "AndOperator", "Space", "Name", "EOF"}}, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + actual := tokensList(t, test.sqe) + + assert.Equal(t, test.tokens, actual) + }) + } +} + +func tokensList(t *testing.T, input string) (out []string) { + lexer, err := newLexer(bytes.NewBufferString(input)) + require.NoError(t, err) + + tokens, err := lex.ConsumeAll(lexer.PeekingLexer) + require.NoError(t, err) + + for _, token := range tokens { + out = append(out, lexer.getTokenType(token)) + } + + return +} diff --git a/starket-common/sqe/optimizer.go b/starket-common/sqe/optimizer.go new file mode 100644 index 0000000..63f2977 --- /dev/null +++ b/starket-common/sqe/optimizer.go @@ -0,0 +1,33 @@ +package sqe + +import ( + "context" + "fmt" +) + +func optimizeExpression(ctx context.Context, expr Expression) Expression { + visitor := NewDepthFirstVisitor(nil, func(_ context.Context, expr Expression) error { + v, ok := expr.(*OrExpression) + if !ok { + return nil + } + + newChildren := make([]Expression, 0, len(v.Children)) + for _, child := range v.Children { + if w, ok := child.(*OrExpression); ok { + newChildren = append(newChildren, w.Children...) + } else { + newChildren = append(newChildren, child) + } + } + + v.Children = newChildren + return nil + }) + + if err := expr.Visit(ctx, visitor); err != nil { + panic(fmt.Errorf("optimizer visitor is never expected to return error, something changed: %w", err)) + } + + return expr +} diff --git a/starket-common/sqe/optimizer_test.go b/starket-common/sqe/optimizer_test.go new file mode 100644 index 0000000..4f6f9ab --- /dev/null +++ b/starket-common/sqe/optimizer_test.go @@ -0,0 +1,120 @@ +package sqe + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestOptimizer(t *testing.T) { + tests := []struct { + name string + expr Expression + expected string + }{ + { + "top_or_no_or_children", + orExpr(keyTermExpr("a1"), keyTermExpr("a2")), + `[a1 || a2]`, + }, + { + "top_or_single_or_children", + orExpr(orExpr(keyTermExpr("a1"), keyTermExpr("a2")), keyTermExpr("b2")), + `[a1 || a2 || b2]`, + }, + { + "top_or_multiple_or_children", + orExpr( + orExpr(keyTermExpr("a1"), keyTermExpr("a2")), + orExpr(keyTermExpr("c1"), keyTermExpr("c2")), + ), + `[a1 || a2 || c1 || c2]`, + }, + { + "top_or_mixed_multiple_or_children", + orExpr( + keyTermExpr("before2"), + orExpr(keyTermExpr("a1"), keyTermExpr("a2")), + andExpr(keyTermExpr("middle1"), keyTermExpr("middle2")), + orExpr(keyTermExpr("c1"), keyTermExpr("c2")), + notExpr(keyTermExpr("after3")), + ), + `[before2 || a1 || a2 || || c1 || c2 || !after3]`, + }, + + { + "or_in_not_multiple_or_children", + notExpr( + orExpr( + orExpr(keyTermExpr("a1"), keyTermExpr("a2")), + orExpr(keyTermExpr("c1"), keyTermExpr("c2")), + ), + ), + `![a1 || a2 || c1 || c2]`, + }, + { + "or_in_parens_multiple_or_children", + parensExpr( + orExpr( + orExpr(keyTermExpr("a1"), keyTermExpr("a2")), + orExpr(keyTermExpr("c1"), keyTermExpr("c2")), + ), + ), + `([a1 || a2 || c1 || c2])`, + }, + + { + "multi_level_nested_only_or", + orExpr( + orExpr( + orExpr( + keyTermExpr("l3a1"), + orExpr(keyTermExpr("l4a1"), keyTermExpr("l4a2")), + ), + orExpr( + orExpr(keyTermExpr("l4b1"), keyTermExpr("l4b2")), + keyTermExpr("l3b1"), + ), + orExpr( + orExpr(keyTermExpr("l4c1"), keyTermExpr("l4c2")), + orExpr(keyTermExpr("l4d1"), keyTermExpr("l4d2")), + ), + ), + ), + `[l3a1 || l4a1 || l4a2 || l4b1 || l4b2 || l3b1 || l4c1 || l4c2 || l4d1 || l4d2]`, + }, + + { + "multi_level_nested_mixed_or", + orExpr( + orExpr( + andExpr( + keyTermExpr("l3a1"), + notExpr(orExpr(keyTermExpr("l4a1"), keyTermExpr("l4a2"))), + ), + orExpr( + orExpr(keyTermExpr("l4b1"), keyTermExpr("l4b2")), + keyTermExpr("l3b1"), + ), + orExpr( + orExpr(keyTermExpr("l4c1"), keyTermExpr("l4c2")), + parensExpr(orExpr(keyTermExpr("l4d1"), keyTermExpr("l4d2"))), + ), + ), + andExpr( + keyTermExpr("l2e1"), + orExpr(keyTermExpr("l3f1"), keyTermExpr("l3f2")), + ), + ), + `[ || l4b1 || l4b2 || l3b1 || l4c1 || l4c2 || ([l4d1 || l4d2]) || ]`, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + optimized := optimizeExpression(context.Background(), test.expr) + assert.Equal(t, test.expected, expressionToString(optimized), "Invalid optimization for %q", test.name) + }) + } +} diff --git a/starket-common/sqe/parser.go b/starket-common/sqe/parser.go new file mode 100644 index 0000000..d627170 --- /dev/null +++ b/starket-common/sqe/parser.go @@ -0,0 +1,263 @@ +package sqe + +import ( + "bytes" + "context" + "fmt" + "io" + "strings" + + lex "github.com/alecthomas/participle/lexer" +) + +// MaxRecursionDeepness is the limit we impose on the number of direct ORs expression. +// It's possible to have more than that, just not in a single successive sequence or `1 or 2 or 3 ...`. +// This is to avoid first a speed problem where parsing start to be +const MaxRecursionDeepness = 2501 + +func Parse(ctx context.Context, input string) (expr Expression, err error) { + parser, err := NewParser(bytes.NewBufferString(input)) + if err != nil { + return nil, fmt.Errorf("new parser: %w", err) + } + + return parser.Parse(ctx) +} + +type Parser struct { + ctx context.Context + l *lexer + + lookForRightParenthesis uint +} + +func NewParser(reader io.Reader) (*Parser, error) { + lexer, err := newLexer(reader) + if err != nil { + return nil, err + } + + return &Parser{ + ctx: context.Background(), + l: lexer, + }, nil +} + +func (p *Parser) Parse(ctx context.Context) (out Expression, err error) { + defer func() { + recoveredErr := recover() + if recoveredErr == nil { + return + } + + switch v := recoveredErr.(type) { + case *ParseError: + err = v + case error: + err = fmt.Errorf("unexpected error occurred while parsing SQE expression: %w", v) + case string, fmt.Stringer: + err = fmt.Errorf("unexpected error occurred while parsing SQE expression: %s", v) + default: + err = fmt.Errorf("unexpected error occurred while parsing SQE expression: %v", v) + } + }() + + rootExpr, err := p.parseExpression(0) + if err != nil { + return nil, err + } + + return optimizeExpression(ctx, rootExpr), nil +} + +func (p *Parser) parseExpression(depth int) (Expression, error) { + if depth >= MaxRecursionDeepness { + // This is a small hack, the panic is trapped at the public API `Parse` method. We do it with a panic + // to avoid the really deep wrapping of error that would happen if we returned right away. A test ensure + // that this behavior works as expected. + panic(parserError("expression is too long, too much ORs or parenthesis expressions", p.l.peekPos())) + } + + left, err := p.parseUnaryExpression(depth) + if err != nil { + return nil, err + } + + for { + p.l.skipSpaces() + next, err := p.l.Peek(0) + if err != nil { + return nil, err + } + + // If we reached end of file, we have finished our job + if next.EOF() { + return left, nil + } + + // If we reached right parenthesis, check if we were expecting one + if p.l.isRightParenthesis(next) { + if p.lookForRightParenthesis == 0 { + return nil, parserError("unexpected right parenthesis, expected right hand side expression or end of input", next.Pos) + } + + // We were expecting one, we finished our job for this part, decrement will be done at parsing site + return left, nil + } + + isImplicitAnd := true + if p.l.isBinaryOperator(next) { + isImplicitAnd = false + p.l.mustLexNext() + p.l.skipSpaces() + } + + // This implements precedence order between `&&` and `||`. A `&&` is parsed with the smallest + // next unit so it takes precedences while `||` parse with the longuest possibility. + parser := p.parseUnaryExpression + depthIncrease := 0 + if p.l.isOrOperator(next) { + parser = p.parseExpression + depthIncrease = 1 + } + + right, err := parser(depth + depthIncrease) + + switch { + case isImplicitAnd || p.l.isAndOperator(next): + if err != nil { + if isImplicitAnd { + return nil, fmt.Errorf("missing expression after implicit 'and' clause: %w", err) + } + + return nil, fmt.Errorf("missing expression after 'and' clause: %w", err) + } + + if v, ok := left.(*AndExpression); ok { + v.Children = append(v.Children, right) + } else { + left = &AndExpression{Children: []Expression{left, right}} + } + + case p.l.isOrOperator(next): + if err != nil { + return nil, fmt.Errorf("missing expression after 'or' clause: %w", err) + } + + // It's impossible to coascle `||` expressions since they are recursive + left = &OrExpression{Children: []Expression{left, right}} + + default: + if err != nil { + return nil, fmt.Errorf("unable to parse right hand side expression: %w", err) + } + + return nil, parserError(fmt.Sprintf("token type %s is not valid binary right hand side expression", p.l.getTokenType(next)), next.Pos) + } + } +} + +func (p *Parser) parseUnaryExpression(depth int) (Expression, error) { + p.l.skipSpaces() + + token, err := p.l.Peek(0) + if err != nil { + return nil, err + } + + if token.EOF() { + return nil, parserError("expected a key term, minus sign or left parenthesis, got end of input", token.Pos) + } + + switch { + case p.l.isName(token) || p.l.isQuoting(token): + return p.parseKeyTerm() + case p.l.isLeftParenthesis(token): + return p.parseParenthesisExpression(depth) + case p.l.isNotOperator(token): + return nil, fmt.Errorf("NOT operator (-) is not supported in the block filter") + default: + return nil, parserError(fmt.Sprintf("expected a key term, minus sign or left parenthesis, got %s", p.l.getTokenType(token)), token.Pos) + } +} + +func (p *Parser) parseParenthesisExpression(depth int) (Expression, error) { + // Consume left parenthesis + openingParenthesis := p.l.mustLexNext() + p.lookForRightParenthesis++ + + child, err := p.parseExpression(depth + 1) + if err != nil { + return nil, fmt.Errorf("invalid expression after opening parenthesis: %w", err) + } + + p.l.skipSpaces() + token, err := p.l.Next() + if err != nil { + return nil, err + } + + if token.EOF() { + return nil, parserError("expecting closing parenthesis, got end of input", openingParenthesis.Pos) + } + + if !p.l.isRightParenthesis(token) { + return nil, parserError(fmt.Sprintf("expecting closing parenthesis after expression, got %s", p.l.getTokenType(token)), token.Pos) + } + + p.lookForRightParenthesis-- + return &ParenthesisExpression{child}, nil +} + +func (p *Parser) parseKeyTerm() (Expression, error) { + token := p.l.mustLexNext() + + var value *StringLiteral + switch { + case p.l.isName(token): + value = &StringLiteral{ + Value: token.String(), + } + case p.l.isQuoting(token): + literal, err := p.parseQuotedString(token) + if err != nil { + return nil, err + } + + value = literal + default: + return nil, parserError(fmt.Sprintf("expecting key term, either a string or quoted string but got %s", p.l.getTokenType(token)), token.Pos) + } + + return &KeyTerm{ + Value: value, + }, nil +} + +func (p *Parser) parseQuotedString(startQuoting lex.Token) (*StringLiteral, error) { + builder := &strings.Builder{} + for { + token, err := p.l.Next() + if err != nil { + return nil, err + } + + if token.EOF() { + return nil, parserError(fmt.Sprintf("expecting closing quoting char %q, got end of input", startQuoting.Value), startQuoting.Pos) + } + + if p.l.isQuoting(token) { + value := builder.String() + if value == "" { + return nil, rangeParserError("an empty string is not valid", startQuoting.Pos, token.Pos) + } + + return &StringLiteral{ + Value: value, + QuotingChar: startQuoting.Value, + }, nil + } + + builder.WriteString(token.Value) + } +} diff --git a/starket-common/sqe/parser_bench_test.go b/starket-common/sqe/parser_bench_test.go new file mode 100644 index 0000000..9bdde62 --- /dev/null +++ b/starket-common/sqe/parser_bench_test.go @@ -0,0 +1,54 @@ +package sqe + +import ( + "context" + "strings" + "testing" +) + +func BenchmarkParseExpression(b *testing.B) { + tests := []struct { + name string + sqe string + }{ + {"single term", "action:data"}, + + // Those are kind of standard query that are parsed quite often + {"triple and term", "eosio data specificacct"}, + {"multiple and term", "data data.from: 'action' string"}, + {"multiple and/or term", "data (data.from || data.from) ('action' || expected) 'action' string"}, + + // Some convoluted big ORs list + {"big ORs list 100", buildFromOrToList(100)}, + {"big ORs list 1_000", buildFromOrToList(1000)}, + } + + for _, test := range tests { + b.Run(test.name, func(b *testing.B) { + setupBench(b) + for n := 0; n < b.N; n++ { + _, err := Parse(context.Background(), test.sqe) + if err != nil { + b.Error(err) + b.FailNow() + } + } + }) + } +} + +func buildFromOrToList(count int) string { + var elements []string + + // The count is divided by 2 since we add 2 addresses per iteration + for i := 0; i < count/2; i++ { + elements = append(elements, "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb") + } + + return "(" + strings.Join(elements, " || ") + ")" +} + +func setupBench(b *testing.B) { + b.ReportAllocs() + b.ResetTimer() +} diff --git a/starket-common/sqe/parser_test.go b/starket-common/sqe/parser_test.go new file mode 100644 index 0000000..55e1e3d --- /dev/null +++ b/starket-common/sqe/parser_test.go @@ -0,0 +1,317 @@ +package sqe + +import ( + "context" + "fmt" + "os" + "strings" + "testing" + + lex "github.com/alecthomas/participle/lexer" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +const ValidateOnlyThatItParses = "!__valiateOnlyThatItParses__!" + +func TestParser(t *testing.T) { + tests := []struct { + name string + sqe string + expected string + expectedErr error + }{ + { + "single_key_term", + `transfer`, + `transfer`, + nil, + }, + { + "single_key_term_space_before", + ` transfer`, + `transfer`, + nil, + }, + { + "single_key_term_space_after", + `transfer `, + `transfer`, + nil, + }, + { + "single_key_term_space_both", + ` transfer `, + `transfer`, + nil, + }, + { + "single_key_term_with_dot_in_it", + `some.action`, + `some.action`, + nil, + }, + { + "single_key_term_multi_spaces", + " \t transfer", + `transfer`, + nil, + }, + { + "single_key_term_with_dot", + `data.name`, + `data.name`, + nil, + }, + { + "double_quoted_string", + `"test || value AND other ( 10 )!"`, + `"test || value AND other ( 10 )!"`, + nil, + }, + { + "double_quoted_string_multi_spaces", + ` " test || value AND other ( 10 )!"`, + `" test || value AND other ( 10 )!"`, + nil, + }, + + { + "single_quoted_string", + `'test:value || value AND other ( 10 )!'`, + `'test:value || value AND other ( 10 )!'`, + nil, + }, + { + "single_quoted_string_multi_spaces", + ` ' test:value || value AND other ( 10 )!'`, + `' test:value || value AND other ( 10 )!'`, + nil, + }, + + { + "top_level_single_and_implicit", + `one two`, + "", + nil, + }, + { + "top_level_single_and_implicit_double_quotes", + `"one" two`, + `<"one" && two>`, + nil, + }, + { + "top_level_single_and", + `one && two`, + "", + nil, + }, + { + "top_level_single_and_legacy", + `one && two`, + "", + nil, + }, + + { + "top_level_single_or", + `one || two`, + "[one || two]", + nil, + }, + { + "top_level_single_or_legacy", + `one || two`, + "[one || two]", + nil, + }, + + { + "top_level_parenthesis_single_term", + `(one)`, + `(one)`, + nil, + }, + { + "top_level_parenthesis_and_term", + `(one && two)`, + `()`, + nil, + }, + { + "top_level_parenthesis_and_term_double_quote", + `(one && "two")`, + `()`, + nil, + }, + { + "top_level_parenthesis_or_term", + `(one || two)`, + `([one || two])`, + nil, + }, + { + "top_level_parenthesis_or_term_with_double_quotes", + `( "one" || two)`, + `(["one" || two])`, + nil, + }, + { + "top_level_parenthesis_with_spaces", + ` ( one || two ) `, + `([one || two])`, + nil, + }, + + { + "top_level_multi_and", + `a b c d`, + ``, + nil, + }, + { + "top_level_multi_or", + `a || b || c || d`, + `[a || b || c || d]`, + nil, + }, + + { + "precedence_and_or", + `a b || c`, + `[ || c]`, + nil, + }, + { + "precedence_or_and", + `a || b c`, + `[a || ]`, + nil, + }, + { + "precedence_and_or_and", + `a b || c d`, + `[ || ]`, + nil, + }, + { + "precedence_and_and_or", + `a b c || d`, + `[ || d]`, + nil, + }, + + { + "precedence_parenthesis_and_or_and", + `a (b || c) d`, + ``, + nil, + }, + { + "precedence_parenthesis_and_or", + `a (b || c)`, + ``, + nil, + }, + + { + "ported_big_example", + `"eos" (transfer || issue || matant) from to`, + `<"eos" && ([transfer || issue || matant]) && from && to>`, + nil, + }, + { + "ported_with_newlines", + "(a ||\n b)", + `([a || b])`, + nil, + }, + + { + "depthness_100_ors", + buildFromOrToList(100), + ValidateOnlyThatItParses, + nil, + }, + { + "depthness_1_000_ors", + buildFromOrToList(1000), + ValidateOnlyThatItParses, + nil, + }, + { + "depthness_2_500_ors", + buildFromOrToList(2500), + ValidateOnlyThatItParses, + nil, + }, + + { + "error_missing_expression_after_and", + `a && `, + "", + fmt.Errorf("missing expression after 'and' clause: %w", + &ParseError{"expected a key term, minus sign or left parenthesis, got end of input", pos(1, 5, 6)}, + ), + }, + { + "error_missing_expression_after_or", + `a || `, + "", + fmt.Errorf("missing expression after 'or' clause: %w", &ParseError{"expected a key term, minus sign or left parenthesis, got end of input", pos(1, 5, 6)}), + }, + { + "error_unstarted_right_parenthesis", + `a )`, + "", + &ParseError{"unexpected right parenthesis, expected right hand side expression or end of input", pos(1, 2, 3)}, + }, + { + "error_unclosed_over_left_parenthesis", + `( a`, + "", + &ParseError{"expecting closing parenthesis, got end of input", pos(1, 0, 1)}, + }, + { + "error_deepness_reached", + buildFromOrToList(MaxRecursionDeepness + 1), + "", + &ParseError{"expression is too long, too much ORs or parenthesis expressions", pos(1, 91251, 91252)}, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + if os.Getenv("DEBUG") != "" { + printTokens(t, test.sqe) + } + + parser, err := NewParser(strings.NewReader(test.sqe)) + require.NoError(t, err) + + expression, err := parser.Parse(context.Background()) + require.Equal(t, test.expectedErr, err) + + if test.expectedErr == nil && err == nil && test.expected != ValidateOnlyThatItParses { + assert.Equal(t, test.expected, expressionToString(expression), "Invalid parsing for SEQ %q", test.sqe) + } + }) + } +} + +func pos(line, offset, column int) lex.Position { + return lex.Position{Filename: "", Line: line, Offset: offset, Column: column} +} + +func printTokens(t *testing.T, input string) { + lexer, err := lexerDefinition.Lex(strings.NewReader(input)) + require.NoError(t, err) + + tokens, err := lex.ConsumeAll(lexer) + require.NoError(t, err) + + for _, token := range tokens { + fmt.Print(token.GoString()) + } +} diff --git a/starket-common/sqe/transformer.go b/starket-common/sqe/transformer.go new file mode 100644 index 0000000..7a94afa --- /dev/null +++ b/starket-common/sqe/transformer.go @@ -0,0 +1,38 @@ +// Copyright 2024 StreamingFast Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sqe + +type FieldTransformer interface { + // TransformFieldName receives the field name and allow receiver of the invocation to update its name. The field's + // name is updated if the invocation returns a nil error. + TransformFieldName(field string) (string, error) + + // TransformStringLiteral receives the field name (the updated one from a prior invocation of `TransformFieldName`) + // and a string literal (either a direct one or a sub-element from a `StringList`) and allows transformation of the + // `StringLiteral` value in place. + TransformStringLiteral(field string, value *StringLiteral) error +} + +type noOpTransformer struct{} + +func (noOpTransformer) TransformFieldName(field string) (string, error) { + return field, nil +} + +func (noOpTransformer) TransformStringLiteral(field string, value *StringLiteral) error { + return nil +} + +var NoOpFieldTransformer noOpTransformer diff --git a/starket-common/sqe/traversal.go b/starket-common/sqe/traversal.go new file mode 100644 index 0000000..a6f7c4a --- /dev/null +++ b/starket-common/sqe/traversal.go @@ -0,0 +1,113 @@ +package sqe + +import ( + "context" + "errors" +) + +type OnExpression func(ctx context.Context, expr Expression) error + +var ErrStopVisit = errors.New("stop") + +type DepthFirstVisitor struct { + beforeVisit OnExpression + afterVisit OnExpression + stopped bool +} + +func NewDepthFirstVisitor(beforeVisit, afterVisit OnExpression) *DepthFirstVisitor { + return &DepthFirstVisitor{beforeVisit: beforeVisit, afterVisit: afterVisit} +} + +func (v *DepthFirstVisitor) Visit_And(ctx context.Context, e *AndExpression) error { + return v.visit_binary(ctx, e, e.Children) +} + +func (v *DepthFirstVisitor) Visit_Or(ctx context.Context, e *OrExpression) error { + return v.visit_binary(ctx, e, e.Children) +} + +func (v *DepthFirstVisitor) visit_binary(ctx context.Context, parent Expression, children []Expression) error { + if stop, err := v.executeCallback(ctx, parent, v.beforeVisit); stop { + return err + } + + for _, child := range children { + err := child.Visit(ctx, v) + if v.stopped || err != nil { + return err + } + } + + if stop, err := v.executeCallback(ctx, parent, v.afterVisit); stop { + return err + } + + return nil +} + +func (v *DepthFirstVisitor) Visit_Parenthesis(ctx context.Context, e *ParenthesisExpression) error { + if stop, err := v.executeCallback(ctx, e, v.beforeVisit); stop { + return err + } + + if err := e.Child.Visit(ctx, v); err != nil { + return err + } + + if stop, err := v.executeCallback(ctx, e, v.afterVisit); stop { + return err + } + + return nil +} + +func (v *DepthFirstVisitor) Visit_Not(ctx context.Context, e *NotExpression) error { + if stop, err := v.executeCallback(ctx, e, v.beforeVisit); stop { + return err + } + + if err := e.Child.Visit(ctx, v); err != nil { + return err + } + + if stop, err := v.executeCallback(ctx, e, v.afterVisit); stop { + return err + } + + return nil +} + +func (v *DepthFirstVisitor) Visit_KeyTerm(ctx context.Context, e *KeyTerm) error { + if stop, err := v.executeCallback(ctx, e, v.beforeVisit); stop { + return err + } + + if stop, err := v.executeCallback(ctx, e, v.afterVisit); stop { + return err + } + + return nil +} + +func (v *DepthFirstVisitor) executeCallback(ctx context.Context, e Expression, callback OnExpression) (stop bool, err error) { + if callback == nil { + return false, nil + } + + if v.stopped { + return true, nil + } + + if err := callback(ctx, e); err != nil { + if err == ErrStopVisit { + v.stopped = true + return true, nil + } else { + v.stopped = true + return true, err + } + } + + return false, nil +} diff --git a/starket-common/sqe/types.go b/starket-common/sqe/types.go new file mode 100644 index 0000000..41841db --- /dev/null +++ b/starket-common/sqe/types.go @@ -0,0 +1,111 @@ +package sqe + +import ( + "context" + "fmt" +) + +type Visitor interface { + Visit_And(ctx context.Context, expr *AndExpression) error + Visit_Or(ctx context.Context, expr *OrExpression) error + Visit_Parenthesis(ctx context.Context, expr *ParenthesisExpression) error + Visit_Not(ctx context.Context, expr *NotExpression) error + Visit_KeyTerm(ctx context.Context, expr *KeyTerm) error +} + +type Expression interface { + Visit(ctx context.Context, visitor Visitor) error +} + +type HasChildrenExpression interface { + GetChildren() []Expression +} + +type AndExpression struct { + Children []Expression +} + +func andExpr(children ...Expression) *AndExpression { + return &AndExpression{Children: children} +} + +func (e *AndExpression) Visit(ctx context.Context, visitor Visitor) error { + return visitor.Visit_And(ctx, e) +} + +func (e *AndExpression) GetChildren() []Expression { + return e.Children +} + +type OrExpression struct { + Children []Expression +} + +func orExpr(children ...Expression) *OrExpression { + return &OrExpression{Children: children} +} + +func (e *OrExpression) Visit(ctx context.Context, visitor Visitor) error { + return visitor.Visit_Or(ctx, e) +} + +func (e *OrExpression) GetChildren() []Expression { + return e.Children +} + +type ParenthesisExpression struct { + Child Expression +} + +func parensExpr(expr Expression) *ParenthesisExpression { + return &ParenthesisExpression{Child: expr} +} + +func (e *ParenthesisExpression) Visit(ctx context.Context, visitor Visitor) error { + return visitor.Visit_Parenthesis(ctx, e) +} + +type NotExpression struct { + Child Expression +} + +func notExpr(expr Expression) *NotExpression { + return &NotExpression{Child: expr} +} + +func (e *NotExpression) Visit(ctx context.Context, visitor Visitor) error { + return visitor.Visit_Not(ctx, e) +} + +type KeyTerm struct { + Value *StringLiteral +} + +func keyTermExpr(value string) *KeyTerm { + return &KeyTerm{Value: &StringLiteral{Value: value}} +} + +func (e *KeyTerm) Visit(ctx context.Context, visitor Visitor) error { + return visitor.Visit_KeyTerm(ctx, e) +} + +type StringLiteral struct { + Value string + QuotingChar string +} + +func (e *StringLiteral) Literal() string { + return e.Value +} + +func (e *StringLiteral) SetValue(value string) { + e.Value = value +} + +func (e *StringLiteral) String() string { + if e.QuotingChar != "" { + return fmt.Sprintf("%s%s%s", e.QuotingChar, e.Value, e.QuotingChar) + } + + return e.Value +} diff --git a/starket-common/substreams.yaml b/starket-common/substreams.yaml new file mode 100644 index 0000000..fc60f2b --- /dev/null +++ b/starket-common/substreams.yaml @@ -0,0 +1,59 @@ +specVersion: v0.1.0 +package: + name: starknet_foundational + version: v0.1.0 + +protobuf: + files: + - starknet.proto + importPaths: + - ./proto/sf/substreams/starknet/type/v1 + +imports: + starknet: /Users/cbillett/devel/sf/substreams-starknet/starknet-v0.1.2.spkg + +binaries: + default: + type: wasip1/tinygo-v1 # wasm/rust-v1 + file: ./wasm.wasm + +network: starknet + +modules: + - name: all_transactions + kind: map + initialBlock: 0 + inputs: + - source: sf.starknet.type.v1.Block + output: + type: proto:sf.substreams.starknet.type.v1.Transactions + doc: | + `all_transaction` reads from the `sf.starknet.type.v1.Block` source and outputs a list of all transactions in the block. + + - name: index_transactions + kind: blockIndex + inputs: + - map: all_transactions + output: + type: proto:sf.substreams.index.v1.Keys + doc: | + `index_events` sets the keys corresponding to all event 'types' and 'attribute keys' in the block + + - name: filtered_transactions + kind: map + blockFilter: + module: index_transactions + query: + params: true + inputs: + - params: string + - map: all_transactions + output: + type: proto:sf.substreams.starknet.type.v1.Transactions + doc: | + `filtered_transactions` reads from `all_transactions` and applies a filter on keys, + only outputting the transactions that match the filter. + Example usage: `(tx:class_hash:0x0000000 && rc:type:0)` + +params: + filtered_transactions: "(rc:execution_status:1)" From 7a1a1ac1053343924c85e4d5ac537d3d8ba97cf1 Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Mon, 15 Jul 2024 12:35:34 -0400 Subject: [PATCH 10/23] added go releaser --- starket-common/.sfreleaser | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 starket-common/.sfreleaser diff --git a/starket-common/.sfreleaser b/starket-common/.sfreleaser new file mode 100755 index 0000000..c21752c --- /dev/null +++ b/starket-common/.sfreleaser @@ -0,0 +1,6 @@ +global: + binary: firestarknet + language: golang + variant: application +release: + goreleaser-docker-image: goreleaser/goreleaser-cross:v1.22 \ No newline at end of file From 886840ea29679cd3000184d7cbb6c8e68a85218c Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Mon, 15 Jul 2024 12:40:43 -0400 Subject: [PATCH 11/23] added missing file --- starket-common/.gitignore | 1 + starket-common/go.sum | 45 + .../pb/sf/starknet/type/v1/block.pb.go | 4045 +++ .../sf/starknet/type/v1/block_vtproto.pb.go | 22205 ++++++++++++++++ .../pb/sf/substreams/index/v1/keys.pb.go | 159 + .../sf/substreams/index/v1/keys_vtproto.pb.go | 338 + .../starknet/type/v1/starknet.pb.go | 194 + .../starknet/type/v1/starknet_vtproto.pb.go | 455 + .../pb/sf/substreams/v1/clock.pb.go | 256 + .../pb/sf/substreams/v1/clock_vtproto.pb.go | 834 + starket-common/proto/buf.gen.yaml | 13 + starket-common/proto/buf.lock | 13 + starket-common/proto/buf.yaml | 4 + 13 files changed, 28562 insertions(+) create mode 100644 starket-common/go.sum create mode 100644 starket-common/pb/sf/starknet/type/v1/block.pb.go create mode 100644 starket-common/pb/sf/starknet/type/v1/block_vtproto.pb.go create mode 100644 starket-common/pb/sf/substreams/index/v1/keys.pb.go create mode 100644 starket-common/pb/sf/substreams/index/v1/keys_vtproto.pb.go create mode 100644 starket-common/pb/sf/substreams/starknet/type/v1/starknet.pb.go create mode 100644 starket-common/pb/sf/substreams/starknet/type/v1/starknet_vtproto.pb.go create mode 100644 starket-common/pb/sf/substreams/v1/clock.pb.go create mode 100644 starket-common/pb/sf/substreams/v1/clock_vtproto.pb.go create mode 100644 starket-common/proto/buf.gen.yaml create mode 100644 starket-common/proto/buf.lock create mode 100644 starket-common/proto/buf.yaml diff --git a/starket-common/.gitignore b/starket-common/.gitignore index d1a75fe..e3816cc 100644 --- a/starket-common/.gitignore +++ b/starket-common/.gitignore @@ -1,2 +1,3 @@ .DS_Store wasm.wasm +.idea diff --git a/starket-common/go.sum b/starket-common/go.sum new file mode 100644 index 0000000..3843e5c --- /dev/null +++ b/starket-common/go.sum @@ -0,0 +1,45 @@ +github.com/NethermindEth/juno v0.3.1 h1:AW72LiAm9gqUeCVJWvepnZcTnpU4Vkl0KzPMxS+42FA= +github.com/NethermindEth/juno v0.3.1/go.mod h1:SGbTpgGaCsxhFsKOid7Ylnz//WZ8swtILk+NbHGsk/Q= +github.com/RoaringBitmap/roaring v1.9.1 h1:LXcSqGGGMKm+KAzUyWn7ZeREqoOkoMX+KwLOK1thc4I= +github.com/RoaringBitmap/roaring v1.9.1/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= +github.com/alecthomas/participle v0.7.1 h1:2bN7reTw//5f0cugJcTOnY/NYZcWQOaajW+BwZB5xWs= +github.com/alecthomas/participle v0.7.1/go.mod h1:HfdmEuwvr12HXQN44HPWXR0lHmVolVYe4dyL6lQ3duY= +github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= +github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA= +github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/consensys/gnark-crypto v0.10.1-0.20230414110055-e500f2f0ff3a h1:hUUl++56+8w2aG2NXdQGfU8cBT9ZZ8UP4R3s47dSFdQ= +github.com/consensys/gnark-crypto v0.10.1-0.20230414110055-e500f2f0ff3a/go.mod h1:Iq/P3HHl0ElSjsg2E1gsMwhAyxnxoKK5nVyZKd+/KhU= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fxamacker/cbor/v2 v2.4.0 h1:ri0ArlOR+5XunOP8CRUowT0pSJOwhW098ZCUyskZD88= +github.com/fxamacker/cbor/v2 v2.4.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= +github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= +github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= +github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= +github.com/planetscale/vtprotobuf v0.6.0 h1:nBeETjudeJ5ZgBHUz1fVHvbqUKnYOXNhsIEabROxmNA= +github.com/planetscale/vtprotobuf v0.6.0/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/protocolbuffers/protoscope v0.0.0-20221109213918-8e7a6aafa2c9 h1:arwj11zP0yJIxIRiDn22E0H8PxfF7TsTrc2wIPFIsf4= +github.com/protocolbuffers/protoscope v0.0.0-20221109213918-8e7a6aafa2c9/go.mod h1:SKZx6stCn03JN3BOWTwvVIO2ajMkb/zQdTceXYhKw/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/starket-common/pb/sf/starknet/type/v1/block.pb.go b/starket-common/pb/sf/starknet/type/v1/block.pb.go new file mode 100644 index 0000000..cd54c08 --- /dev/null +++ b/starket-common/pb/sf/starknet/type/v1/block.pb.go @@ -0,0 +1,4045 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: sf/starknet/type/v1/block.proto + +package typev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/timestamppb" + 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) +) + +// specifies whether the data of this block is published via blob data or calldata +type L1_DA_MODE int32 + +const ( + L1_DA_MODE_L1_DA_MODE_UNKNOWN L1_DA_MODE = 0 + L1_DA_MODE_CALLDATA L1_DA_MODE = 1 + L1_DA_MODE_BLOB L1_DA_MODE = 2 +) + +// Enum value maps for L1_DA_MODE. +var ( + L1_DA_MODE_name = map[int32]string{ + 0: "L1_DA_MODE_UNKNOWN", + 1: "CALLDATA", + 2: "BLOB", + } + L1_DA_MODE_value = map[string]int32{ + "L1_DA_MODE_UNKNOWN": 0, + "CALLDATA": 1, + "BLOB": 2, + } +) + +func (x L1_DA_MODE) Enum() *L1_DA_MODE { + p := new(L1_DA_MODE) + *p = x + return p +} + +func (x L1_DA_MODE) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (L1_DA_MODE) Descriptor() protoreflect.EnumDescriptor { + return file_sf_starknet_type_v1_block_proto_enumTypes[0].Descriptor() +} + +func (L1_DA_MODE) Type() protoreflect.EnumType { + return &file_sf_starknet_type_v1_block_proto_enumTypes[0] +} + +func (x L1_DA_MODE) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use L1_DA_MODE.Descriptor instead. +func (L1_DA_MODE) EnumDescriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{0} +} + +type FEE_DATA_AVAILABILITY_MODE int32 + +const ( + FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN FEE_DATA_AVAILABILITY_MODE = 0 + FEE_DATA_AVAILABILITY_MODE_L1 FEE_DATA_AVAILABILITY_MODE = 1 + FEE_DATA_AVAILABILITY_MODE_L2 FEE_DATA_AVAILABILITY_MODE = 2 +) + +// Enum value maps for FEE_DATA_AVAILABILITY_MODE. +var ( + FEE_DATA_AVAILABILITY_MODE_name = map[int32]string{ + 0: "FEE_DATA_AVAILABILITY_MODE_UNKNOWN", + 1: "L1", + 2: "L2", + } + FEE_DATA_AVAILABILITY_MODE_value = map[string]int32{ + "FEE_DATA_AVAILABILITY_MODE_UNKNOWN": 0, + "L1": 1, + "L2": 2, + } +) + +func (x FEE_DATA_AVAILABILITY_MODE) Enum() *FEE_DATA_AVAILABILITY_MODE { + p := new(FEE_DATA_AVAILABILITY_MODE) + *p = x + return p +} + +func (x FEE_DATA_AVAILABILITY_MODE) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FEE_DATA_AVAILABILITY_MODE) Descriptor() protoreflect.EnumDescriptor { + return file_sf_starknet_type_v1_block_proto_enumTypes[1].Descriptor() +} + +func (FEE_DATA_AVAILABILITY_MODE) Type() protoreflect.EnumType { + return &file_sf_starknet_type_v1_block_proto_enumTypes[1] +} + +func (x FEE_DATA_AVAILABILITY_MODE) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FEE_DATA_AVAILABILITY_MODE.Descriptor instead. +func (FEE_DATA_AVAILABILITY_MODE) EnumDescriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{1} +} + +type TRANSACTION_TYPE int32 + +const ( + TRANSACTION_TYPE_TRANSACTION_TYPE_UNKNOWN TRANSACTION_TYPE = 0 + TRANSACTION_TYPE_INVOKE TRANSACTION_TYPE = 1 + TRANSACTION_TYPE_DECLARE TRANSACTION_TYPE = 2 + TRANSACTION_TYPE_DEPLOY TRANSACTION_TYPE = 3 + TRANSACTION_TYPE_DEPLOY_ACCOUNT TRANSACTION_TYPE = 4 + TRANSACTION_TYPE_L1_HANDLER TRANSACTION_TYPE = 5 +) + +// Enum value maps for TRANSACTION_TYPE. +var ( + TRANSACTION_TYPE_name = map[int32]string{ + 0: "TRANSACTION_TYPE_UNKNOWN", + 1: "INVOKE", + 2: "DECLARE", + 3: "DEPLOY", + 4: "DEPLOY_ACCOUNT", + 5: "L1_HANDLER", + } + TRANSACTION_TYPE_value = map[string]int32{ + "TRANSACTION_TYPE_UNKNOWN": 0, + "INVOKE": 1, + "DECLARE": 2, + "DEPLOY": 3, + "DEPLOY_ACCOUNT": 4, + "L1_HANDLER": 5, + } +) + +func (x TRANSACTION_TYPE) Enum() *TRANSACTION_TYPE { + p := new(TRANSACTION_TYPE) + *p = x + return p +} + +func (x TRANSACTION_TYPE) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TRANSACTION_TYPE) Descriptor() protoreflect.EnumDescriptor { + return file_sf_starknet_type_v1_block_proto_enumTypes[2].Descriptor() +} + +func (TRANSACTION_TYPE) Type() protoreflect.EnumType { + return &file_sf_starknet_type_v1_block_proto_enumTypes[2] +} + +func (x TRANSACTION_TYPE) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TRANSACTION_TYPE.Descriptor instead. +func (TRANSACTION_TYPE) EnumDescriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{2} +} + +type EXECUTION_STATUS int32 + +const ( + EXECUTION_STATUS_EXECUTION_STATUS_UNKNOWN EXECUTION_STATUS = 0 + EXECUTION_STATUS_EXECUTION_STATUS_SUCCESS EXECUTION_STATUS = 1 + EXECUTION_STATUS_EXECUTION_STATUS_REVERTED EXECUTION_STATUS = 2 +) + +// Enum value maps for EXECUTION_STATUS. +var ( + EXECUTION_STATUS_name = map[int32]string{ + 0: "EXECUTION_STATUS_UNKNOWN", + 1: "EXECUTION_STATUS_SUCCESS", + 2: "EXECUTION_STATUS_REVERTED", + } + EXECUTION_STATUS_value = map[string]int32{ + "EXECUTION_STATUS_UNKNOWN": 0, + "EXECUTION_STATUS_SUCCESS": 1, + "EXECUTION_STATUS_REVERTED": 2, + } +) + +func (x EXECUTION_STATUS) Enum() *EXECUTION_STATUS { + p := new(EXECUTION_STATUS) + *p = x + return p +} + +func (x EXECUTION_STATUS) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EXECUTION_STATUS) Descriptor() protoreflect.EnumDescriptor { + return file_sf_starknet_type_v1_block_proto_enumTypes[3].Descriptor() +} + +func (EXECUTION_STATUS) Type() protoreflect.EnumType { + return &file_sf_starknet_type_v1_block_proto_enumTypes[3] +} + +func (x EXECUTION_STATUS) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EXECUTION_STATUS.Descriptor instead. +func (EXECUTION_STATUS) EnumDescriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{3} +} + +type Block struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockHash []byte `protobuf:"bytes,1,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + // The hash of this block's parent + ParentHash []byte `protobuf:"bytes,2,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` + BlockNumber uint64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + // The new global state root + NewRoot []byte `protobuf:"bytes,4,opt,name=new_root,json=newRoot,proto3" json:"new_root,omitempty"` + // The time in which the block was created + Timestamp uint64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // The StarkNet identity of the sequencer submitting this block + SequencerAddress []byte `protobuf:"bytes,6,opt,name=sequencer_address,json=sequencerAddress,proto3" json:"sequencer_address,omitempty"` + // The price of l1 gas in the block + L1GasPrice *ResourcePrice `protobuf:"bytes,7,opt,name=l1_gas_price,json=l1GasPrice,proto3" json:"l1_gas_price,omitempty"` + // The price of l1 data gas in the block + L1DataGasPrice *ResourcePrice `protobuf:"bytes,8,opt,name=l1_data_gas_price,json=l1DataGasPrice,proto3" json:"l1_data_gas_price,omitempty"` + // specifies whether the data of this block is published via blob data or calldata + L1DaMode L1_DA_MODE `protobuf:"varint,9,opt,name=l1_da_mode,json=l1DaMode,proto3,enum=sf.starknet.type.v1.L1_DA_MODE" json:"l1_da_mode,omitempty"` + // Semver of the current Starknet protocol + StarknetVersion string `protobuf:"bytes,10,opt,name=starknet_version,json=starknetVersion,proto3" json:"starknet_version,omitempty"` + // The transactions in this block + Transactions []*TransactionWithReceipt `protobuf:"bytes,11,rep,name=transactions,proto3" json:"transactions,omitempty"` + StateUpdate *StateUpdate `protobuf:"bytes,12,opt,name=state_update,json=stateUpdate,proto3" json:"state_update,omitempty"` +} + +func (x *Block) Reset() { + *x = Block{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Block) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Block) ProtoMessage() {} + +func (x *Block) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_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 Block.ProtoReflect.Descriptor instead. +func (*Block) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{0} +} + +func (x *Block) GetBlockHash() []byte { + if x != nil { + return x.BlockHash + } + return nil +} + +func (x *Block) GetParentHash() []byte { + if x != nil { + return x.ParentHash + } + return nil +} + +func (x *Block) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *Block) GetNewRoot() []byte { + if x != nil { + return x.NewRoot + } + return nil +} + +func (x *Block) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *Block) GetSequencerAddress() []byte { + if x != nil { + return x.SequencerAddress + } + return nil +} + +func (x *Block) GetL1GasPrice() *ResourcePrice { + if x != nil { + return x.L1GasPrice + } + return nil +} + +func (x *Block) GetL1DataGasPrice() *ResourcePrice { + if x != nil { + return x.L1DataGasPrice + } + return nil +} + +func (x *Block) GetL1DaMode() L1_DA_MODE { + if x != nil { + return x.L1DaMode + } + return L1_DA_MODE_L1_DA_MODE_UNKNOWN +} + +func (x *Block) GetStarknetVersion() string { + if x != nil { + return x.StarknetVersion + } + return "" +} + +func (x *Block) GetTransactions() []*TransactionWithReceipt { + if x != nil { + return x.Transactions + } + return nil +} + +func (x *Block) GetStateUpdate() *StateUpdate { + if x != nil { + return x.StateUpdate + } + return nil +} + +type ResourcePrice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PriceInFri []byte `protobuf:"bytes,1,opt,name=price_in_fri,json=priceInFri,proto3" json:"price_in_fri,omitempty"` + PriceInWei []byte `protobuf:"bytes,2,opt,name=price_in_wei,json=priceInWei,proto3" json:"price_in_wei,omitempty"` +} + +func (x *ResourcePrice) Reset() { + *x = ResourcePrice{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourcePrice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourcePrice) ProtoMessage() {} + +func (x *ResourcePrice) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_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 ResourcePrice.ProtoReflect.Descriptor instead. +func (*ResourcePrice) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{1} +} + +func (x *ResourcePrice) GetPriceInFri() []byte { + if x != nil { + return x.PriceInFri + } + return nil +} + +func (x *ResourcePrice) GetPriceInWei() []byte { + if x != nil { + return x.PriceInWei + } + return nil +} + +type TransactionWithReceipt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Transaction: + // + // *TransactionWithReceipt_InvokeTransactionV0 + // *TransactionWithReceipt_InvokeTransactionV1 + // *TransactionWithReceipt_InvokeTransactionV3 + // *TransactionWithReceipt_L1HandlerTransaction + // *TransactionWithReceipt_DeclareTransactionV0 + // *TransactionWithReceipt_DeclareTransactionV1 + // *TransactionWithReceipt_DeclareTransactionV2 + // *TransactionWithReceipt_DeclareTransactionV3 + // *TransactionWithReceipt_DeployTransactionV0 + // *TransactionWithReceipt_DeployAccountTransactionV1 + // *TransactionWithReceipt_DeployAccountTransactionV3 + Transaction isTransactionWithReceipt_Transaction `protobuf_oneof:"transaction"` + Receipt *TransactionReceipt `protobuf:"bytes,12,opt,name=receipt,proto3" json:"receipt,omitempty"` +} + +func (x *TransactionWithReceipt) Reset() { + *x = TransactionWithReceipt{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransactionWithReceipt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionWithReceipt) ProtoMessage() {} + +func (x *TransactionWithReceipt) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_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 TransactionWithReceipt.ProtoReflect.Descriptor instead. +func (*TransactionWithReceipt) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{2} +} + +func (m *TransactionWithReceipt) GetTransaction() isTransactionWithReceipt_Transaction { + if m != nil { + return m.Transaction + } + return nil +} + +func (x *TransactionWithReceipt) GetInvokeTransactionV0() *InvokeTransactionV0 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_InvokeTransactionV0); ok { + return x.InvokeTransactionV0 + } + return nil +} + +func (x *TransactionWithReceipt) GetInvokeTransactionV1() *InvokeTransactionV1 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_InvokeTransactionV1); ok { + return x.InvokeTransactionV1 + } + return nil +} + +func (x *TransactionWithReceipt) GetInvokeTransactionV3() *InvokeTransactionV3 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_InvokeTransactionV3); ok { + return x.InvokeTransactionV3 + } + return nil +} + +func (x *TransactionWithReceipt) GetL1HandlerTransaction() *L1HandlerTransaction { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_L1HandlerTransaction); ok { + return x.L1HandlerTransaction + } + return nil +} + +func (x *TransactionWithReceipt) GetDeclareTransactionV0() *DeclareTransactionV0 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeclareTransactionV0); ok { + return x.DeclareTransactionV0 + } + return nil +} + +func (x *TransactionWithReceipt) GetDeclareTransactionV1() *DeclareTransactionV1 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeclareTransactionV1); ok { + return x.DeclareTransactionV1 + } + return nil +} + +func (x *TransactionWithReceipt) GetDeclareTransactionV2() *DeclareTransactionV2 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeclareTransactionV2); ok { + return x.DeclareTransactionV2 + } + return nil +} + +func (x *TransactionWithReceipt) GetDeclareTransactionV3() *DeclareTransactionV3 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeclareTransactionV3); ok { + return x.DeclareTransactionV3 + } + return nil +} + +func (x *TransactionWithReceipt) GetDeployTransactionV0() *DeployTransactionV0 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeployTransactionV0); ok { + return x.DeployTransactionV0 + } + return nil +} + +func (x *TransactionWithReceipt) GetDeployAccountTransactionV1() *DeployAccountTransactionV1 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeployAccountTransactionV1); ok { + return x.DeployAccountTransactionV1 + } + return nil +} + +func (x *TransactionWithReceipt) GetDeployAccountTransactionV3() *DeployAccountTransactionV3 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeployAccountTransactionV3); ok { + return x.DeployAccountTransactionV3 + } + return nil +} + +func (x *TransactionWithReceipt) GetReceipt() *TransactionReceipt { + if x != nil { + return x.Receipt + } + return nil +} + +type isTransactionWithReceipt_Transaction interface { + isTransactionWithReceipt_Transaction() +} + +type TransactionWithReceipt_InvokeTransactionV0 struct { + InvokeTransactionV0 *InvokeTransactionV0 `protobuf:"bytes,1,opt,name=invoke_transaction_v0,json=invokeTransactionV0,proto3,oneof"` +} + +type TransactionWithReceipt_InvokeTransactionV1 struct { + InvokeTransactionV1 *InvokeTransactionV1 `protobuf:"bytes,2,opt,name=invoke_transaction_v1,json=invokeTransactionV1,proto3,oneof"` +} + +type TransactionWithReceipt_InvokeTransactionV3 struct { + InvokeTransactionV3 *InvokeTransactionV3 `protobuf:"bytes,3,opt,name=invoke_transaction_v3,json=invokeTransactionV3,proto3,oneof"` +} + +type TransactionWithReceipt_L1HandlerTransaction struct { + L1HandlerTransaction *L1HandlerTransaction `protobuf:"bytes,4,opt,name=l1_handler_transaction,json=l1HandlerTransaction,proto3,oneof"` //not versioned in api definition +} + +type TransactionWithReceipt_DeclareTransactionV0 struct { + DeclareTransactionV0 *DeclareTransactionV0 `protobuf:"bytes,5,opt,name=declare_transaction_v0,json=declareTransactionV0,proto3,oneof"` +} + +type TransactionWithReceipt_DeclareTransactionV1 struct { + DeclareTransactionV1 *DeclareTransactionV1 `protobuf:"bytes,6,opt,name=declare_transaction_v1,json=declareTransactionV1,proto3,oneof"` +} + +type TransactionWithReceipt_DeclareTransactionV2 struct { + DeclareTransactionV2 *DeclareTransactionV2 `protobuf:"bytes,7,opt,name=declare_transaction_v2,json=declareTransactionV2,proto3,oneof"` +} + +type TransactionWithReceipt_DeclareTransactionV3 struct { + DeclareTransactionV3 *DeclareTransactionV3 `protobuf:"bytes,8,opt,name=declare_transaction_v3,json=declareTransactionV3,proto3,oneof"` +} + +type TransactionWithReceipt_DeployTransactionV0 struct { + DeployTransactionV0 *DeployTransactionV0 `protobuf:"bytes,9,opt,name=deploy_transaction_v0,json=deployTransactionV0,proto3,oneof"` +} + +type TransactionWithReceipt_DeployAccountTransactionV1 struct { + DeployAccountTransactionV1 *DeployAccountTransactionV1 `protobuf:"bytes,10,opt,name=deploy_account_transaction_v1,json=deployAccountTransactionV1,proto3,oneof"` +} + +type TransactionWithReceipt_DeployAccountTransactionV3 struct { + DeployAccountTransactionV3 *DeployAccountTransactionV3 `protobuf:"bytes,11,opt,name=deploy_account_transaction_v3,json=deployAccountTransactionV3,proto3,oneof"` +} + +func (*TransactionWithReceipt_InvokeTransactionV0) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_InvokeTransactionV1) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_InvokeTransactionV3) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_L1HandlerTransaction) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_DeclareTransactionV0) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_DeclareTransactionV1) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_DeclareTransactionV2) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_DeclareTransactionV3) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_DeployTransactionV0) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_DeployAccountTransactionV1) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_DeployAccountTransactionV3) isTransactionWithReceipt_Transaction() {} + +type TransactionReceipt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hash identifying the transaction + TransactionHash []byte `protobuf:"bytes,1,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` + // The fee that was charged by the sequencer + ActualFee *ActualFee `protobuf:"bytes,2,opt,name=actual_fee,json=actualFee,proto3" json:"actual_fee,omitempty"` + // Execution status + ExecutionStatus EXECUTION_STATUS `protobuf:"varint,3,opt,name=execution_status,json=executionStatus,proto3,enum=sf.starknet.type.v1.EXECUTION_STATUS" json:"execution_status,omitempty"` + RevertReason string `protobuf:"bytes,4,opt,name=revert_reason,json=revertReason,proto3" json:"revert_reason,omitempty"` + Type TRANSACTION_TYPE `protobuf:"varint,5,opt,name=type,proto3,enum=sf.starknet.type.v1.TRANSACTION_TYPE" json:"type,omitempty"` + // Messages sent + MessageHash string `protobuf:"bytes,6,opt,name=message_hash,json=messageHash,proto3" json:"message_hash,omitempty"` + // The address of the deployed contract + MessagesSent []*MessagesSent `protobuf:"bytes,7,rep,name=messages_sent,json=messagesSent,proto3" json:"messages_sent,omitempty"` + // The events emitted as part of this transaction + Events []*Event `protobuf:"bytes,8,rep,name=events,proto3" json:"events,omitempty"` + // The resources consumed by the transaction + ExecutionResources *ExecutionResources `protobuf:"bytes,9,opt,name=execution_resources,json=executionResources,proto3" json:"execution_resources,omitempty"` + // The message hash as it appears on the L1 core contract + ContractAddress []byte `protobuf:"bytes,10,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` +} + +func (x *TransactionReceipt) Reset() { + *x = TransactionReceipt{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransactionReceipt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionReceipt) ProtoMessage() {} + +func (x *TransactionReceipt) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[3] + 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 TransactionReceipt.ProtoReflect.Descriptor instead. +func (*TransactionReceipt) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{3} +} + +func (x *TransactionReceipt) GetTransactionHash() []byte { + if x != nil { + return x.TransactionHash + } + return nil +} + +func (x *TransactionReceipt) GetActualFee() *ActualFee { + if x != nil { + return x.ActualFee + } + return nil +} + +func (x *TransactionReceipt) GetExecutionStatus() EXECUTION_STATUS { + if x != nil { + return x.ExecutionStatus + } + return EXECUTION_STATUS_EXECUTION_STATUS_UNKNOWN +} + +func (x *TransactionReceipt) GetRevertReason() string { + if x != nil { + return x.RevertReason + } + return "" +} + +func (x *TransactionReceipt) GetType() TRANSACTION_TYPE { + if x != nil { + return x.Type + } + return TRANSACTION_TYPE_TRANSACTION_TYPE_UNKNOWN +} + +func (x *TransactionReceipt) GetMessageHash() string { + if x != nil { + return x.MessageHash + } + return "" +} + +func (x *TransactionReceipt) GetMessagesSent() []*MessagesSent { + if x != nil { + return x.MessagesSent + } + return nil +} + +func (x *TransactionReceipt) GetEvents() []*Event { + if x != nil { + return x.Events + } + return nil +} + +func (x *TransactionReceipt) GetExecutionResources() *ExecutionResources { + if x != nil { + return x.ExecutionResources + } + return nil +} + +func (x *TransactionReceipt) GetContractAddress() []byte { + if x != nil { + return x.ContractAddress + } + return nil +} + +type MessagesSent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the L2 contract sending the message + FromAddress []byte `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + // The target L1 address the message is sent to + ToAddress []byte `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // The payload of the messageResourceBounds + Payload [][]byte `protobuf:"bytes,3,rep,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *MessagesSent) Reset() { + *x = MessagesSent{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MessagesSent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessagesSent) ProtoMessage() {} + +func (x *MessagesSent) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[4] + 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 MessagesSent.ProtoReflect.Descriptor instead. +func (*MessagesSent) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{4} +} + +func (x *MessagesSent) GetFromAddress() []byte { + if x != nil { + return x.FromAddress + } + return nil +} + +func (x *MessagesSent) GetToAddress() []byte { + if x != nil { + return x.ToAddress + } + return nil +} + +func (x *MessagesSent) GetPayload() [][]byte { + if x != nil { + return x.Payload + } + return nil +} + +type Event struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // From address + FromAddress []byte `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + Keys [][]byte `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"` + Data [][]byte `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"` +} + +func (x *Event) Reset() { + *x = Event{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[5] + 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 Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{5} +} + +func (x *Event) GetFromAddress() []byte { + if x != nil { + return x.FromAddress + } + return nil +} + +func (x *Event) GetKeys() [][]byte { + if x != nil { + return x.Keys + } + return nil +} + +func (x *Event) GetData() [][]byte { + if x != nil { + return x.Data + } + return nil +} + +type ExecutionResources struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The number of Cairo steps used + Steps uint64 `protobuf:"varint,1,opt,name=steps,proto3" json:"steps,omitempty"` + // The number of unused memory cells (each cell is roughly equivalent to a step) + MemoryHoles uint64 `protobuf:"varint,2,opt,name=memory_holes,json=memoryHoles,proto3" json:"memory_holes,omitempty"` + // The number of RANGE_CHECK builtin instances + RangeCheckBuiltinApplications uint64 `protobuf:"varint,3,opt,name=range_check_builtin_applications,json=rangeCheckBuiltinApplications,proto3" json:"range_check_builtin_applications,omitempty"` + // The number of Pedersen builtin instances + PedersenBuiltinApplications uint64 `protobuf:"varint,4,opt,name=pedersen_builtin_applications,json=pedersenBuiltinApplications,proto3" json:"pedersen_builtin_applications,omitempty"` + // The number of Poseidon builtin instances + PoseidonBuiltinApplications uint64 `protobuf:"varint,5,opt,name=poseidon_builtin_applications,json=poseidonBuiltinApplications,proto3" json:"poseidon_builtin_applications,omitempty"` + // the number of EC_OP builtin instances + EcOpBuiltinApplications uint64 `protobuf:"varint,6,opt,name=ec_op_builtin_applications,json=ecOpBuiltinApplications,proto3" json:"ec_op_builtin_applications,omitempty"` + // the number of ECDSA builtin instances + EcdsaBuiltinApplications uint64 `protobuf:"varint,7,opt,name=ecdsa_builtin_applications,json=ecdsaBuiltinApplications,proto3" json:"ecdsa_builtin_applications,omitempty"` + // the number of BITWISE builtin instances + BitwiseBuiltinApplications uint64 `protobuf:"varint,8,opt,name=bitwise_builtin_applications,json=bitwiseBuiltinApplications,proto3" json:"bitwise_builtin_applications,omitempty"` + // The number of KECCAK builtin instances + KeccakBuiltinApplications uint64 `protobuf:"varint,9,opt,name=keccak_builtin_applications,json=keccakBuiltinApplications,proto3" json:"keccak_builtin_applications,omitempty"` + // The number of accesses to the segment arena + SegmentArenaBuiltin uint64 `protobuf:"varint,10,opt,name=segment_arena_builtin,json=segmentArenaBuiltin,proto3" json:"segment_arena_builtin,omitempty"` + DataAvailability *DataAvailability `protobuf:"bytes,11,opt,name=data_availability,json=dataAvailability,proto3" json:"data_availability,omitempty"` +} + +func (x *ExecutionResources) Reset() { + *x = ExecutionResources{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionResources) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionResources) ProtoMessage() {} + +func (x *ExecutionResources) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[6] + 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 ExecutionResources.ProtoReflect.Descriptor instead. +func (*ExecutionResources) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{6} +} + +func (x *ExecutionResources) GetSteps() uint64 { + if x != nil { + return x.Steps + } + return 0 +} + +func (x *ExecutionResources) GetMemoryHoles() uint64 { + if x != nil { + return x.MemoryHoles + } + return 0 +} + +func (x *ExecutionResources) GetRangeCheckBuiltinApplications() uint64 { + if x != nil { + return x.RangeCheckBuiltinApplications + } + return 0 +} + +func (x *ExecutionResources) GetPedersenBuiltinApplications() uint64 { + if x != nil { + return x.PedersenBuiltinApplications + } + return 0 +} + +func (x *ExecutionResources) GetPoseidonBuiltinApplications() uint64 { + if x != nil { + return x.PoseidonBuiltinApplications + } + return 0 +} + +func (x *ExecutionResources) GetEcOpBuiltinApplications() uint64 { + if x != nil { + return x.EcOpBuiltinApplications + } + return 0 +} + +func (x *ExecutionResources) GetEcdsaBuiltinApplications() uint64 { + if x != nil { + return x.EcdsaBuiltinApplications + } + return 0 +} + +func (x *ExecutionResources) GetBitwiseBuiltinApplications() uint64 { + if x != nil { + return x.BitwiseBuiltinApplications + } + return 0 +} + +func (x *ExecutionResources) GetKeccakBuiltinApplications() uint64 { + if x != nil { + return x.KeccakBuiltinApplications + } + return 0 +} + +func (x *ExecutionResources) GetSegmentArenaBuiltin() uint64 { + if x != nil { + return x.SegmentArenaBuiltin + } + return 0 +} + +func (x *ExecutionResources) GetDataAvailability() *DataAvailability { + if x != nil { + return x.DataAvailability + } + return nil +} + +// invokes a specific function in the desired contract (not necessarily an account) +type InvokeTransactionV0 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximal fee that can be charged for including the transaction + MaxFee []byte `protobuf:"bytes,2,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,4,rep,name=signature,proto3" json:"signature,omitempty"` + ContractAddress []byte `protobuf:"bytes,5,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + EntryPointSelector []byte `protobuf:"bytes,6,opt,name=entry_point_selector,json=entryPointSelector,proto3" json:"entry_point_selector,omitempty"` + // The parameters passed to the function + Calldata [][]byte `protobuf:"bytes,7,rep,name=calldata,proto3" json:"calldata,omitempty"` +} + +func (x *InvokeTransactionV0) Reset() { + *x = InvokeTransactionV0{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvokeTransactionV0) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvokeTransactionV0) ProtoMessage() {} + +func (x *InvokeTransactionV0) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[7] + 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 InvokeTransactionV0.ProtoReflect.Descriptor instead. +func (*InvokeTransactionV0) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{7} +} + +func (x *InvokeTransactionV0) GetMaxFee() []byte { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *InvokeTransactionV0) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *InvokeTransactionV0) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *InvokeTransactionV0) GetContractAddress() []byte { + if x != nil { + return x.ContractAddress + } + return nil +} + +func (x *InvokeTransactionV0) GetEntryPointSelector() []byte { + if x != nil { + return x.EntryPointSelector + } + return nil +} + +func (x *InvokeTransactionV0) GetCalldata() [][]byte { + if x != nil { + return x.Calldata + } + return nil +} + +// initiates a transaction from a given account +type InvokeTransactionV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximal fee that can be charged for including the transaction + MaxFee []byte `protobuf:"bytes,1,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,3,rep,name=signature,proto3" json:"signature,omitempty"` + Nonce []byte `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` + // sender address + SenderAddress []byte `protobuf:"bytes,5,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // The data expected by the account's `execute` function (in most usecases, this includes the called contract address and a function selector) + Calldata [][]byte `protobuf:"bytes,6,rep,name=calldata,proto3" json:"calldata,omitempty"` +} + +func (x *InvokeTransactionV1) Reset() { + *x = InvokeTransactionV1{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvokeTransactionV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvokeTransactionV1) ProtoMessage() {} + +func (x *InvokeTransactionV1) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[8] + 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 InvokeTransactionV1.ProtoReflect.Descriptor instead. +func (*InvokeTransactionV1) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{8} +} + +func (x *InvokeTransactionV1) GetMaxFee() []byte { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *InvokeTransactionV1) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *InvokeTransactionV1) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *InvokeTransactionV1) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *InvokeTransactionV1) GetSenderAddress() []byte { + if x != nil { + return x.SenderAddress + } + return nil +} + +func (x *InvokeTransactionV1) GetCalldata() [][]byte { + if x != nil { + return x.Calldata + } + return nil +} + +// initiates a transaction from a given account +type InvokeTransactionV3 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SenderAddress []byte `protobuf:"bytes,2,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // The data expected by the account's `execute` function (in most usecases, this includes the called contract address and a function selector) + Calldata [][]byte `protobuf:"bytes,3,rep,name=calldata,proto3" json:"calldata,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,5,rep,name=signature,proto3" json:"signature,omitempty"` + Nonce []byte `protobuf:"bytes,6,opt,name=nonce,proto3" json:"nonce,omitempty"` + // resource bounds for the transaction execution + ResourceBounds *ResourceBounds `protobuf:"bytes,7,opt,name=resource_bounds,json=resourceBounds,proto3" json:"resource_bounds,omitempty"` + // the tip for the transaction + Tip []byte `protobuf:"bytes,8,opt,name=tip,proto3" json:"tip,omitempty"` + // data needed to allow the paymaster to pay for the transaction in native tokens + PaymasterData [][]byte `protobuf:"bytes,9,rep,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` + // data needed to deploy the account contract from which this tx will be initiated + AccountDeploymentData [][]byte `protobuf:"bytes,10,rep,name=account_deployment_data,json=accountDeploymentData,proto3" json:"account_deployment_data,omitempty"` + // The storage domain of the account's nonce (an account has a nonce per DA mode) + NonceDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,11,opt,name=nonce_data_availability_mode,json=nonceDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"nonce_data_availability_mode,omitempty"` + // The storage domain of the account's balance from which fee will be charged + FeeDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,12,opt,name=fee_data_availability_mode,json=feeDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"fee_data_availability_mode,omitempty"` +} + +func (x *InvokeTransactionV3) Reset() { + *x = InvokeTransactionV3{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvokeTransactionV3) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvokeTransactionV3) ProtoMessage() {} + +func (x *InvokeTransactionV3) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[9] + 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 InvokeTransactionV3.ProtoReflect.Descriptor instead. +func (*InvokeTransactionV3) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{9} +} + +func (x *InvokeTransactionV3) GetSenderAddress() []byte { + if x != nil { + return x.SenderAddress + } + return nil +} + +func (x *InvokeTransactionV3) GetCalldata() [][]byte { + if x != nil { + return x.Calldata + } + return nil +} + +func (x *InvokeTransactionV3) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *InvokeTransactionV3) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *InvokeTransactionV3) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *InvokeTransactionV3) GetResourceBounds() *ResourceBounds { + if x != nil { + return x.ResourceBounds + } + return nil +} + +func (x *InvokeTransactionV3) GetTip() []byte { + if x != nil { + return x.Tip + } + return nil +} + +func (x *InvokeTransactionV3) GetPaymasterData() [][]byte { + if x != nil { + return x.PaymasterData + } + return nil +} + +func (x *InvokeTransactionV3) GetAccountDeploymentData() [][]byte { + if x != nil { + return x.AccountDeploymentData + } + return nil +} + +func (x *InvokeTransactionV3) GetNonceDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { + if x != nil { + return x.NonceDataAvailabilityMode + } + return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN +} + +func (x *InvokeTransactionV3) GetFeeDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { + if x != nil { + return x.FeeDataAvailabilityMode + } + return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN +} + +// a call to an l1_handler on an L2 contract induced by a message from L1 +type L1HandlerTransaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Version of the transaction scheme + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Version of the transaction scheme + Nonce string `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + // The address of the contract whose class hash will be returned + ContractAddress []byte `protobuf:"bytes,4,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // Entry point selector + EntryPointSelector []byte `protobuf:"bytes,5,opt,name=entry_point_selector,json=entryPointSelector,proto3" json:"entry_point_selector,omitempty"` + // The parameters passed to the function + Calldata [][]byte `protobuf:"bytes,6,rep,name=calldata,proto3" json:"calldata,omitempty"` +} + +func (x *L1HandlerTransaction) Reset() { + *x = L1HandlerTransaction{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *L1HandlerTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*L1HandlerTransaction) ProtoMessage() {} + +func (x *L1HandlerTransaction) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[10] + 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 L1HandlerTransaction.ProtoReflect.Descriptor instead. +func (*L1HandlerTransaction) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{10} +} + +func (x *L1HandlerTransaction) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *L1HandlerTransaction) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *L1HandlerTransaction) GetContractAddress() []byte { + if x != nil { + return x.ContractAddress + } + return nil +} + +func (x *L1HandlerTransaction) GetEntryPointSelector() []byte { + if x != nil { + return x.EntryPointSelector + } + return nil +} + +func (x *L1HandlerTransaction) GetCalldata() [][]byte { + if x != nil { + return x.Calldata + } + return nil +} + +// Declare Contract Transaction V0 +type DeclareTransactionV0 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SenderAddress []byte `protobuf:"bytes,2,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // The maximal fee that can be charged for including the transaction + MaxFee []byte `protobuf:"bytes,3,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,5,rep,name=signature,proto3" json:"signature,omitempty"` + // The hash of the requested contract class + ClassHash []byte `protobuf:"bytes,6,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` +} + +func (x *DeclareTransactionV0) Reset() { + *x = DeclareTransactionV0{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeclareTransactionV0) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeclareTransactionV0) ProtoMessage() {} + +func (x *DeclareTransactionV0) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[11] + 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 DeclareTransactionV0.ProtoReflect.Descriptor instead. +func (*DeclareTransactionV0) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{11} +} + +func (x *DeclareTransactionV0) GetSenderAddress() []byte { + if x != nil { + return x.SenderAddress + } + return nil +} + +func (x *DeclareTransactionV0) GetMaxFee() []byte { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *DeclareTransactionV0) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *DeclareTransactionV0) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *DeclareTransactionV0) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +// Declare Contract Transaction V1 +type DeclareTransactionV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SenderAddress []byte `protobuf:"bytes,2,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // The maximal fee that can be charged for including the transaction + MaxFee []byte `protobuf:"bytes,3,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,5,rep,name=signature,proto3" json:"signature,omitempty"` + Nonce []byte `protobuf:"bytes,6,opt,name=nonce,proto3" json:"nonce,omitempty"` + // The hash of the requested contract class + ClassHash []byte `protobuf:"bytes,7,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` +} + +func (x *DeclareTransactionV1) Reset() { + *x = DeclareTransactionV1{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeclareTransactionV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeclareTransactionV1) ProtoMessage() {} + +func (x *DeclareTransactionV1) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[12] + 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 DeclareTransactionV1.ProtoReflect.Descriptor instead. +func (*DeclareTransactionV1) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{12} +} + +func (x *DeclareTransactionV1) GetSenderAddress() []byte { + if x != nil { + return x.SenderAddress + } + return nil +} + +func (x *DeclareTransactionV1) GetMaxFee() []byte { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *DeclareTransactionV1) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *DeclareTransactionV1) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *DeclareTransactionV1) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *DeclareTransactionV1) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +// Declare Contract Transaction V2 +type DeclareTransactionV2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SenderAddress []byte `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // The maximal fee that can be charged for including the transaction + CompiledClassHash []byte `protobuf:"bytes,2,opt,name=compiled_class_hash,json=compiledClassHash,proto3" json:"compiled_class_hash,omitempty"` + MaxFee []byte `protobuf:"bytes,3,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,5,rep,name=signature,proto3" json:"signature,omitempty"` + Nonce []byte `protobuf:"bytes,6,opt,name=nonce,proto3" json:"nonce,omitempty"` + // The hash of the requested contract class + ClassHash []byte `protobuf:"bytes,7,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` +} + +func (x *DeclareTransactionV2) Reset() { + *x = DeclareTransactionV2{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeclareTransactionV2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeclareTransactionV2) ProtoMessage() {} + +func (x *DeclareTransactionV2) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[13] + 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 DeclareTransactionV2.ProtoReflect.Descriptor instead. +func (*DeclareTransactionV2) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{13} +} + +func (x *DeclareTransactionV2) GetSenderAddress() []byte { + if x != nil { + return x.SenderAddress + } + return nil +} + +func (x *DeclareTransactionV2) GetCompiledClassHash() []byte { + if x != nil { + return x.CompiledClassHash + } + return nil +} + +func (x *DeclareTransactionV2) GetMaxFee() []byte { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *DeclareTransactionV2) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *DeclareTransactionV2) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *DeclareTransactionV2) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *DeclareTransactionV2) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +// Declare Contract Transaction V3 +type DeclareTransactionV3 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SenderAddress []byte `protobuf:"bytes,2,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // The hash of the Cairo assembly resulting from the Sierra compilation + CompiledClassHash []byte `protobuf:"bytes,3,opt,name=compiled_class_hash,json=compiledClassHash,proto3" json:"compiled_class_hash,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,5,rep,name=signature,proto3" json:"signature,omitempty"` + Nonce []byte `protobuf:"bytes,6,opt,name=nonce,proto3" json:"nonce,omitempty"` + // The hash of the requested contract class + ClassHash []byte `protobuf:"bytes,7,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + // resource bounds for the transaction execution + ResourceBounds *ResourceBounds `protobuf:"bytes,8,opt,name=resource_bounds,json=resourceBounds,proto3" json:"resource_bounds,omitempty"` + // the tip for the transaction + Tip []byte `protobuf:"bytes,9,opt,name=tip,proto3" json:"tip,omitempty"` + // data needed to allow the paymaster to pay for the transaction in native tokens + PaymasterData [][]byte `protobuf:"bytes,10,rep,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` + // data needed to deploy the account contract from which this tx will be initiated + AccountDeploymentData [][]byte `protobuf:"bytes,11,rep,name=account_deployment_data,json=accountDeploymentData,proto3" json:"account_deployment_data,omitempty"` + // The storage domain of the account's nonce (an account has a nonce per DA mode) + NonceDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,12,opt,name=nonce_data_availability_mode,json=nonceDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"nonce_data_availability_mode,omitempty"` + // The storage domain of the account's balance from which fee will be charged + FeeDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,13,opt,name=fee_data_availability_mode,json=feeDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"fee_data_availability_mode,omitempty"` +} + +func (x *DeclareTransactionV3) Reset() { + *x = DeclareTransactionV3{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeclareTransactionV3) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeclareTransactionV3) ProtoMessage() {} + +func (x *DeclareTransactionV3) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[14] + 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 DeclareTransactionV3.ProtoReflect.Descriptor instead. +func (*DeclareTransactionV3) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{14} +} + +func (x *DeclareTransactionV3) GetSenderAddress() []byte { + if x != nil { + return x.SenderAddress + } + return nil +} + +func (x *DeclareTransactionV3) GetCompiledClassHash() []byte { + if x != nil { + return x.CompiledClassHash + } + return nil +} + +func (x *DeclareTransactionV3) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *DeclareTransactionV3) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *DeclareTransactionV3) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *DeclareTransactionV3) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *DeclareTransactionV3) GetResourceBounds() *ResourceBounds { + if x != nil { + return x.ResourceBounds + } + return nil +} + +func (x *DeclareTransactionV3) GetTip() []byte { + if x != nil { + return x.Tip + } + return nil +} + +func (x *DeclareTransactionV3) GetPaymasterData() [][]byte { + if x != nil { + return x.PaymasterData + } + return nil +} + +func (x *DeclareTransactionV3) GetAccountDeploymentData() [][]byte { + if x != nil { + return x.AccountDeploymentData + } + return nil +} + +func (x *DeclareTransactionV3) GetNonceDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { + if x != nil { + return x.NonceDataAvailabilityMode + } + return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN +} + +func (x *DeclareTransactionV3) GetFeeDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { + if x != nil { + return x.FeeDataAvailabilityMode + } + return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN +} + +// deploys a new account contract +type DeployTransactionV0 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hash of the deployed contract's class + ClassHash []byte `protobuf:"bytes,1,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + // The salt for the address of the deployed contract + ContractAddressSalt []byte `protobuf:"bytes,3,opt,name=contract_address_salt,json=contractAddressSalt,proto3" json:"contract_address_salt,omitempty"` + // The parameters passed to the constructor + ConstructorCalldata [][]byte `protobuf:"bytes,4,rep,name=constructor_calldata,json=constructorCalldata,proto3" json:"constructor_calldata,omitempty"` +} + +func (x *DeployTransactionV0) Reset() { + *x = DeployTransactionV0{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployTransactionV0) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployTransactionV0) ProtoMessage() {} + +func (x *DeployTransactionV0) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[15] + 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 DeployTransactionV0.ProtoReflect.Descriptor instead. +func (*DeployTransactionV0) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{15} +} + +func (x *DeployTransactionV0) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *DeployTransactionV0) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *DeployTransactionV0) GetContractAddressSalt() []byte { + if x != nil { + return x.ContractAddressSalt + } + return nil +} + +func (x *DeployTransactionV0) GetConstructorCalldata() [][]byte { + if x != nil { + return x.ConstructorCalldata + } + return nil +} + +// Deploys an account contract, charges fee from the pre-funded account addresses +type DeployAccountTransactionV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximal fee that can be charged for including the transaction + MaxFee []byte `protobuf:"bytes,1,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,3,rep,name=signature,proto3" json:"signature,omitempty"` + Nonce []byte `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` + // The hash of the deployed contract's class + ClassHash []byte `protobuf:"bytes,5,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + // The salt for the address of the deployed contract + ContractAddressSalt []byte `protobuf:"bytes,6,opt,name=contract_address_salt,json=contractAddressSalt,proto3" json:"contract_address_salt,omitempty"` + // The parameters passed to the constructor + ConstructorCalldata [][]byte `protobuf:"bytes,7,rep,name=constructor_calldata,json=constructorCalldata,proto3" json:"constructor_calldata,omitempty"` +} + +func (x *DeployAccountTransactionV1) Reset() { + *x = DeployAccountTransactionV1{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployAccountTransactionV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployAccountTransactionV1) ProtoMessage() {} + +func (x *DeployAccountTransactionV1) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[16] + 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 DeployAccountTransactionV1.ProtoReflect.Descriptor instead. +func (*DeployAccountTransactionV1) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{16} +} + +func (x *DeployAccountTransactionV1) GetMaxFee() []byte { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *DeployAccountTransactionV1) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *DeployAccountTransactionV1) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *DeployAccountTransactionV1) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *DeployAccountTransactionV1) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *DeployAccountTransactionV1) GetContractAddressSalt() []byte { + if x != nil { + return x.ContractAddressSalt + } + return nil +} + +func (x *DeployAccountTransactionV1) GetConstructorCalldata() [][]byte { + if x != nil { + return x.ConstructorCalldata + } + return nil +} + +// Deploys an account contract, charges fee from the pre-funded account addresses +type DeployAccountTransactionV3 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Version of the transaction scheme + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,2,rep,name=signature,proto3" json:"signature,omitempty"` + Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + // The salt for the address of the deployed contract + ContractAddressSalt []byte `protobuf:"bytes,4,opt,name=contract_address_salt,json=contractAddressSalt,proto3" json:"contract_address_salt,omitempty"` + // The parameters passed to the constructor + ConstructorCalldata [][]byte `protobuf:"bytes,5,rep,name=constructor_calldata,json=constructorCalldata,proto3" json:"constructor_calldata,omitempty"` + // The hash of the deployed contract's class + ClassHash []byte `protobuf:"bytes,6,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + // resource bounds for the transaction execution + ResourceBounds *ResourceBounds `protobuf:"bytes,7,opt,name=resource_bounds,json=resourceBounds,proto3" json:"resource_bounds,omitempty"` + // the tip for the transaction + Tip []byte `protobuf:"bytes,8,opt,name=tip,proto3" json:"tip,omitempty"` + // data needed to allow the paymaster to pay for the transaction in native tokens + PaymasterData [][]byte `protobuf:"bytes,9,rep,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` + // The storage domain of the account's nonce (an account has a nonce per DA mode) + NonceDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,11,opt,name=nonce_data_availability_mode,json=nonceDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"nonce_data_availability_mode,omitempty"` + // The storage domain of the account's balance from which fee will be charged + FeeDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,12,opt,name=fee_data_availability_mode,json=feeDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"fee_data_availability_mode,omitempty"` +} + +func (x *DeployAccountTransactionV3) Reset() { + *x = DeployAccountTransactionV3{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployAccountTransactionV3) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployAccountTransactionV3) ProtoMessage() {} + +func (x *DeployAccountTransactionV3) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[17] + 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 DeployAccountTransactionV3.ProtoReflect.Descriptor instead. +func (*DeployAccountTransactionV3) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{17} +} + +func (x *DeployAccountTransactionV3) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *DeployAccountTransactionV3) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *DeployAccountTransactionV3) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *DeployAccountTransactionV3) GetContractAddressSalt() []byte { + if x != nil { + return x.ContractAddressSalt + } + return nil +} + +func (x *DeployAccountTransactionV3) GetConstructorCalldata() [][]byte { + if x != nil { + return x.ConstructorCalldata + } + return nil +} + +func (x *DeployAccountTransactionV3) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *DeployAccountTransactionV3) GetResourceBounds() *ResourceBounds { + if x != nil { + return x.ResourceBounds + } + return nil +} + +func (x *DeployAccountTransactionV3) GetTip() []byte { + if x != nil { + return x.Tip + } + return nil +} + +func (x *DeployAccountTransactionV3) GetPaymasterData() [][]byte { + if x != nil { + return x.PaymasterData + } + return nil +} + +func (x *DeployAccountTransactionV3) GetNonceDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { + if x != nil { + return x.NonceDataAvailabilityMode + } + return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN +} + +func (x *DeployAccountTransactionV3) GetFeeDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { + if x != nil { + return x.FeeDataAvailabilityMode + } + return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN +} + +type ResourceBounds struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The max amount and max price per unit of L1 gas used in this tx + L1Gas *Resource `protobuf:"bytes,1,opt,name=l1_gas,json=l1Gas,proto3" json:"l1_gas,omitempty"` + // The max amount and max price per unit of L2 gas used in this tx + L2Gas *Resource `protobuf:"bytes,2,opt,name=l2_gas,json=l2Gas,proto3" json:"l2_gas,omitempty"` +} + +func (x *ResourceBounds) Reset() { + *x = ResourceBounds{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceBounds) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceBounds) ProtoMessage() {} + +func (x *ResourceBounds) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[18] + 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 ResourceBounds.ProtoReflect.Descriptor instead. +func (*ResourceBounds) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{18} +} + +func (x *ResourceBounds) GetL1Gas() *Resource { + if x != nil { + return x.L1Gas + } + return nil +} + +func (x *ResourceBounds) GetL2Gas() *Resource { + if x != nil { + return x.L2Gas + } + return nil +} + +type Resource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the max amount of the resource that can be used in the tx + MaxAmount string `protobuf:"bytes,1,opt,name=max_amount,json=maxAmount,proto3" json:"max_amount,omitempty"` + // the max price per unit of this resource for this tx + MaxPricePerUnit string `protobuf:"bytes,2,opt,name=max_price_per_unit,json=maxPricePerUnit,proto3" json:"max_price_per_unit,omitempty"` +} + +func (x *Resource) Reset() { + *x = Resource{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Resource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Resource) ProtoMessage() {} + +func (x *Resource) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[19] + 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 Resource.ProtoReflect.Descriptor instead. +func (*Resource) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{19} +} + +func (x *Resource) GetMaxAmount() string { + if x != nil { + return x.MaxAmount + } + return "" +} + +func (x *Resource) GetMaxPricePerUnit() string { + if x != nil { + return x.MaxPricePerUnit + } + return "" +} + +type Receipt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The fee that was charged by the sequencer + ActualFee *ActualFee `protobuf:"bytes,1,opt,name=actual_fee,json=actualFee,proto3" json:"actual_fee,omitempty"` +} + +func (x *Receipt) Reset() { + *x = Receipt{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Receipt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Receipt) ProtoMessage() {} + +func (x *Receipt) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[20] + 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 Receipt.ProtoReflect.Descriptor instead. +func (*Receipt) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{20} +} + +func (x *Receipt) GetActualFee() *ActualFee { + if x != nil { + return x.ActualFee + } + return nil +} + +type ActualFee struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // amount paid + Amount []byte `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` + // units in which the fee is given + Unit string `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"` +} + +func (x *ActualFee) Reset() { + *x = ActualFee{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActualFee) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActualFee) ProtoMessage() {} + +func (x *ActualFee) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[21] + 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 ActualFee.ProtoReflect.Descriptor instead. +func (*ActualFee) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{21} +} + +func (x *ActualFee) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *ActualFee) GetUnit() string { + if x != nil { + return x.Unit + } + return "" +} + +type DataAvailability struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the data gas consumed by this transaction's data, 0 if it uses gas for DA + L1Gas uint64 `protobuf:"varint,1,opt,name=l1_gas,json=l1Gas,proto3" json:"l1_gas,omitempty"` + // the gas consumed by this transaction's data, 0 if it uses data gas for DA + L1DataGas uint64 `protobuf:"varint,2,opt,name=l1_data_gas,json=l1DataGas,proto3" json:"l1_data_gas,omitempty"` +} + +func (x *DataAvailability) Reset() { + *x = DataAvailability{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataAvailability) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataAvailability) ProtoMessage() {} + +func (x *DataAvailability) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[22] + 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 DataAvailability.ProtoReflect.Descriptor instead. +func (*DataAvailability) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{22} +} + +func (x *DataAvailability) GetL1Gas() uint64 { + if x != nil { + return x.L1Gas + } + return 0 +} + +func (x *DataAvailability) GetL1DataGas() uint64 { + if x != nil { + return x.L1DataGas + } + return 0 +} + +// State update +type StateUpdate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The new global state root + NewRoot []byte `protobuf:"bytes,2,opt,name=new_root,json=newRoot,proto3" json:"new_root,omitempty"` + // The previous global state root + OldRoot []byte `protobuf:"bytes,1,opt,name=old_root,json=oldRoot,proto3" json:"old_root,omitempty"` + // The change in state applied in this block, given as a mapping of addresses to the new values and/or new contracts + StateDiff *StateDiff `protobuf:"bytes,3,opt,name=state_diff,json=stateDiff,proto3" json:"state_diff,omitempty"` +} + +func (x *StateUpdate) Reset() { + *x = StateUpdate{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StateUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StateUpdate) ProtoMessage() {} + +func (x *StateUpdate) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[23] + 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 StateUpdate.ProtoReflect.Descriptor instead. +func (*StateUpdate) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{23} +} + +func (x *StateUpdate) GetNewRoot() []byte { + if x != nil { + return x.NewRoot + } + return nil +} + +func (x *StateUpdate) GetOldRoot() []byte { + if x != nil { + return x.OldRoot + } + return nil +} + +func (x *StateUpdate) GetStateDiff() *StateDiff { + if x != nil { + return x.StateDiff + } + return nil +} + +// The change in state applied in this block, given as a mapping of addresses to the new values and/or new contracts +type StateDiff struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The changes in the storage per contract address + StorageDiffs []*ContractStorageDiff `protobuf:"bytes,1,rep,name=storage_diffs,json=storageDiffs,proto3" json:"storage_diffs,omitempty"` + // The hash of the declared class + DeprecatedDeclaredClasses [][]byte `protobuf:"bytes,2,rep,name=deprecated_declared_classes,json=deprecatedDeclaredClasses,proto3" json:"deprecated_declared_classes,omitempty"` + // The declared class hash and compiled class hash + DeclaredClasses []*DeclaredClass `protobuf:"bytes,3,rep,name=declared_classes,json=declaredClasses,proto3" json:"declared_classes,omitempty"` + // A new contract deployed as part of the state update + DeployedContracts []*DeployedContract `protobuf:"bytes,4,rep,name=deployed_contracts,json=deployedContracts,proto3" json:"deployed_contracts,omitempty"` + // The list of contracts whose class was replaced + ReplacedClasses []*ReplacedClass `protobuf:"bytes,5,rep,name=replaced_classes,json=replacedClasses,proto3" json:"replaced_classes,omitempty"` + // The updated nonce per contract address + Nonces []*NonceDiff `protobuf:"bytes,6,rep,name=nonces,proto3" json:"nonces,omitempty"` //Do we need this? +} + +func (x *StateDiff) Reset() { + *x = StateDiff{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StateDiff) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StateDiff) ProtoMessage() {} + +func (x *StateDiff) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[24] + 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 StateDiff.ProtoReflect.Descriptor instead. +func (*StateDiff) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{24} +} + +func (x *StateDiff) GetStorageDiffs() []*ContractStorageDiff { + if x != nil { + return x.StorageDiffs + } + return nil +} + +func (x *StateDiff) GetDeprecatedDeclaredClasses() [][]byte { + if x != nil { + return x.DeprecatedDeclaredClasses + } + return nil +} + +func (x *StateDiff) GetDeclaredClasses() []*DeclaredClass { + if x != nil { + return x.DeclaredClasses + } + return nil +} + +func (x *StateDiff) GetDeployedContracts() []*DeployedContract { + if x != nil { + return x.DeployedContracts + } + return nil +} + +func (x *StateDiff) GetReplacedClasses() []*ReplacedClass { + if x != nil { + return x.ReplacedClasses + } + return nil +} + +func (x *StateDiff) GetNonces() []*NonceDiff { + if x != nil { + return x.Nonces + } + return nil +} + +type NonceDiff struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // "The address of the contract + ContractAddress []byte `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // The nonce for the given address at the end of the block + Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` +} + +func (x *NonceDiff) Reset() { + *x = NonceDiff{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NonceDiff) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NonceDiff) ProtoMessage() {} + +func (x *NonceDiff) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[25] + 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 NonceDiff.ProtoReflect.Descriptor instead. +func (*NonceDiff) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{25} +} + +func (x *NonceDiff) GetContractAddress() []byte { + if x != nil { + return x.ContractAddress + } + return nil +} + +func (x *NonceDiff) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +type ReplacedClass struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the contract whose class was replaced + ContractAddress []byte `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // The new class hash + ClassHash []byte `protobuf:"bytes,2,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` +} + +func (x *ReplacedClass) Reset() { + *x = ReplacedClass{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReplacedClass) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReplacedClass) ProtoMessage() {} + +func (x *ReplacedClass) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[26] + 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 ReplacedClass.ProtoReflect.Descriptor instead. +func (*ReplacedClass) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{26} +} + +func (x *ReplacedClass) GetContractAddress() []byte { + if x != nil { + return x.ContractAddress + } + return nil +} + +func (x *ReplacedClass) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +type DeployedContract struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the contract + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // The hash of the contract code + ClassHash []byte `protobuf:"bytes,2,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` +} + +func (x *DeployedContract) Reset() { + *x = DeployedContract{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployedContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployedContract) ProtoMessage() {} + +func (x *DeployedContract) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[27] + 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 DeployedContract.ProtoReflect.Descriptor instead. +func (*DeployedContract) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{27} +} + +func (x *DeployedContract) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *DeployedContract) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +type DeclaredClass struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hash of the declared class + ClassHash []byte `protobuf:"bytes,1,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + // The Cairo assembly hash corresponding to the declared class + CompiledClassHash []byte `protobuf:"bytes,2,opt,name=compiled_class_hash,json=compiledClassHash,proto3" json:"compiled_class_hash,omitempty"` +} + +func (x *DeclaredClass) Reset() { + *x = DeclaredClass{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeclaredClass) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeclaredClass) ProtoMessage() {} + +func (x *DeclaredClass) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[28] + 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 DeclaredClass.ProtoReflect.Descriptor instead. +func (*DeclaredClass) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{28} +} + +func (x *DeclaredClass) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *DeclaredClass) GetCompiledClassHash() []byte { + if x != nil { + return x.CompiledClassHash + } + return nil +} + +type ContractStorageDiff struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the contract + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // The changes in the storage of the contract + StorageEntries []*StorageEntries `protobuf:"bytes,2,rep,name=storage_entries,json=storageEntries,proto3" json:"storage_entries,omitempty"` +} + +func (x *ContractStorageDiff) Reset() { + *x = ContractStorageDiff{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContractStorageDiff) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContractStorageDiff) ProtoMessage() {} + +func (x *ContractStorageDiff) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[29] + 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 ContractStorageDiff.ProtoReflect.Descriptor instead. +func (*ContractStorageDiff) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{29} +} + +func (x *ContractStorageDiff) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *ContractStorageDiff) GetStorageEntries() []*StorageEntries { + if x != nil { + return x.StorageEntries + } + return nil +} + +type StorageEntries struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The key of the changed value + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // The new value applied to the given address + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *StorageEntries) Reset() { + *x = StorageEntries{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageEntries) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageEntries) ProtoMessage() {} + +func (x *StorageEntries) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[30] + 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 StorageEntries.ProtoReflect.Descriptor instead. +func (*StorageEntries) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{30} +} + +func (x *StorageEntries) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} + +func (x *StorageEntries) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +var File_sf_starknet_type_v1_block_proto protoreflect.FileDescriptor + +var file_sf_starknet_type_v1_block_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x73, 0x66, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x13, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x04, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x52, 0x6f, 0x6f, 0x74, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2b, 0x0a, + 0x11, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x44, 0x0a, 0x0c, 0x6c, 0x31, + 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x52, 0x0a, 0x6c, 0x31, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x12, 0x4d, 0x0a, 0x11, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x67, 0x61, 0x73, 0x5f, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, + 0x0e, 0x6c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, + 0x3d, 0x0a, 0x0a, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, + 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x31, 0x5f, 0x44, 0x41, 0x5f, + 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x08, 0x6c, 0x31, 0x44, 0x61, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x29, + 0x0a, 0x10, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, + 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x0c, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x0c, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, + 0x53, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x12, 0x20, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x72, 0x69, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x46, + 0x72, 0x69, 0x12, 0x20, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x5f, 0x77, + 0x65, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x63, 0x65, 0x49, + 0x6e, 0x57, 0x65, 0x69, 0x22, 0xc5, 0x09, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, + 0x5e, 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x48, 0x00, 0x52, 0x13, 0x69, 0x6e, 0x76, 0x6f, + 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x12, + 0x5e, 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x13, 0x69, 0x6e, 0x76, 0x6f, + 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, + 0x5e, 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x48, 0x00, 0x52, 0x13, 0x69, 0x6e, 0x76, 0x6f, + 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x12, + 0x61, 0x0a, 0x16, 0x6c, 0x31, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x29, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, 0x6c, 0x31, + 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x61, 0x0a, 0x16, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x30, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x48, 0x00, 0x52, + 0x14, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x12, 0x61, 0x0a, 0x16, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x31, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, + 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, + 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, + 0x48, 0x00, 0x52, 0x14, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, 0x61, 0x0a, 0x16, 0x64, 0x65, 0x63, 0x6c, + 0x61, 0x72, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x76, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, + 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x56, 0x32, 0x48, 0x00, 0x52, 0x14, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x12, 0x61, 0x0a, 0x16, 0x64, + 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x76, 0x33, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x48, 0x00, 0x52, 0x14, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, + 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x12, 0x5e, + 0x0a, 0x15, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x30, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x48, 0x00, 0x52, 0x13, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x12, 0x74, + 0x0a, 0x1d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x31, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, + 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x1a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x56, 0x31, 0x12, 0x74, 0x0a, 0x1d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x76, 0x33, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x48, 0x00, 0x52, 0x1a, + 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x12, 0x41, 0x0a, 0x07, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x70, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, + 0x65, 0x69, 0x70, 0x74, 0x52, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x42, 0x0d, 0x0a, + 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd4, 0x04, 0x0a, + 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x70, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x3d, + 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, + 0x65, 0x65, 0x52, 0x09, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x12, 0x50, 0x0a, + 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, + 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x58, + 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x52, 0x0f, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x46, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, + 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x66, 0x2e, 0x73, + 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x66, 0x2e, + 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x58, + 0x0a, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x52, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0x6a, 0x0a, 0x0c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x53, + 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 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, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, + 0x52, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, + 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, + 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, + 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x22, 0xa3, 0x05, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, + 0x65, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, + 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x6c, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x48, 0x6f, + 0x6c, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x20, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1d, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, + 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x1d, + 0x70, 0x65, 0x64, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, + 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x1b, 0x70, 0x65, 0x64, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x42, 0x75, 0x69, + 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x42, 0x0a, 0x1d, 0x70, 0x6f, 0x73, 0x65, 0x69, 0x64, 0x6f, 0x6e, 0x5f, 0x62, 0x75, 0x69, + 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1b, 0x70, 0x6f, 0x73, 0x65, 0x69, 0x64, 0x6f, + 0x6e, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x65, 0x63, 0x5f, 0x6f, 0x70, 0x5f, 0x62, 0x75, + 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x65, 0x63, 0x4f, 0x70, 0x42, 0x75, + 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x3c, 0x0a, 0x1a, 0x65, 0x63, 0x64, 0x73, 0x61, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, + 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x18, 0x65, 0x63, 0x64, 0x73, 0x61, 0x42, 0x75, 0x69, 0x6c, + 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x40, 0x0a, 0x1c, 0x62, 0x69, 0x74, 0x77, 0x69, 0x73, 0x65, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, + 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1a, 0x62, 0x69, 0x74, 0x77, 0x69, 0x73, 0x65, 0x42, 0x75, + 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x3e, 0x0a, 0x1b, 0x6b, 0x65, 0x63, 0x63, 0x61, 0x6b, 0x5f, 0x62, 0x75, 0x69, 0x6c, + 0x74, 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x6b, 0x65, 0x63, 0x63, 0x61, 0x6b, 0x42, 0x75, + 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x72, 0x65, + 0x6e, 0x61, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x13, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x42, 0x75, + 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x12, 0x52, 0x0a, 0x11, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x10, 0x64, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xdf, 0x01, 0x0a, 0x13, 0x49, 0x6e, + 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, + 0x30, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, + 0x14, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, + 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0c, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x22, 0xbf, 0x01, 0x0a, 0x13, + 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x56, 0x31, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x22, 0xc5, 0x04, + 0x0a, 0x13, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, + 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, + 0x75, 0x6e, 0x64, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, + 0x75, 0x6e, 0x64, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x03, 0x74, 0x69, 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, + 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, + 0x17, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x15, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x70, 0x0a, 0x1c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, + 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x19, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x6c, 0x0a, 0x1a, 0x66, 0x65, 0x65, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, + 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x17, 0x66, 0x65, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x14, 0x4c, 0x31, 0x48, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x29, + 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x63, + 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x63, + 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x22, 0xad, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6c, + 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, + 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, + 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0xc3, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6c, + 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, + 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, + 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0xf3, 0x01, + 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, + 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x17, 0x0a, + 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, + 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, + 0x61, 0x73, 0x68, 0x22, 0xf9, 0x04, 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x12, 0x25, 0x0a, 0x0e, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, + 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x66, 0x2e, 0x73, + 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x0e, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x10, + 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x69, 0x70, + 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, + 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x17, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x15, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x70, 0x0a, 0x1c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, + 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, + 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, + 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x19, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, + 0x65, 0x12, 0x6c, 0x0a, 0x1a, 0x66, 0x65, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, + 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, + 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, + 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x17, 0x66, 0x65, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x22, + 0xb5, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x61, 0x6c, 0x74, 0x12, 0x31, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0c, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x43, + 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x22, 0x89, 0x02, 0x0a, 0x1a, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x32, 0x0a, 0x15, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x61, 0x6c, 0x74, + 0x12, 0x31, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x5f, + 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x13, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x64, + 0x61, 0x74, 0x61, 0x22, 0xd7, 0x04, 0x0a, 0x1a, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x56, 0x33, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x61, 0x6c, 0x74, 0x12, 0x31, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0c, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x43, + 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, + 0x75, 0x6e, 0x64, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, + 0x75, 0x6e, 0x64, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x03, 0x74, 0x69, 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, + 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x70, 0x0a, + 0x1c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, + 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, 0x44, 0x41, + 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, + 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x19, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, + 0x6c, 0x0a, 0x1a, 0x66, 0x65, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, + 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, 0x44, 0x41, + 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, + 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x17, 0x66, 0x65, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x7c, 0x0a, + 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, + 0x34, 0x0a, 0x06, 0x6c, 0x31, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x05, + 0x6c, 0x31, 0x47, 0x61, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x6c, 0x32, 0x5f, 0x67, 0x61, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, + 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x05, 0x6c, 0x32, 0x47, 0x61, 0x73, 0x22, 0x56, 0x0a, 0x08, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x78, + 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x63, 0x65, 0x50, 0x65, 0x72, 0x55, + 0x6e, 0x69, 0x74, 0x22, 0x48, 0x0a, 0x07, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x3d, + 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, + 0x65, 0x65, 0x52, 0x09, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x22, 0x37, 0x0a, + 0x09, 0x41, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x49, 0x0a, 0x10, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6c, 0x31, + 0x5f, 0x67, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x31, 0x47, 0x61, + 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x67, 0x61, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x47, 0x61, + 0x73, 0x22, 0x82, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x19, 0x0a, 0x08, + 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, + 0x6f, 0x6c, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x3d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x5f, 0x64, 0x69, 0x66, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x22, 0xc6, 0x03, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x44, 0x69, 0x66, 0x66, 0x12, 0x4d, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, + 0x64, 0x69, 0x66, 0x66, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x69, + 0x66, 0x66, 0x73, 0x12, 0x3e, 0x0a, 0x1b, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x19, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x5f, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x52, 0x0f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x65, 0x73, 0x12, 0x54, 0x0a, 0x12, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x11, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, + 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, + 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, + 0x6e, 0x63, 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x22, + 0x4c, 0x0a, 0x09, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x44, 0x69, 0x66, 0x66, 0x12, 0x29, 0x0a, 0x10, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x59, 0x0a, + 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x29, + 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0x4b, 0x0a, 0x10, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0x5e, 0x0a, 0x0d, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, + 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0x7d, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x69, 0x66, 0x66, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x52, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x22, 0x38, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x45, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0x3c, + 0x0a, 0x0a, 0x4c, 0x31, 0x5f, 0x44, 0x41, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x12, 0x16, 0x0a, 0x12, + 0x4c, 0x31, 0x5f, 0x44, 0x41, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4c, 0x4c, 0x44, 0x41, 0x54, 0x41, + 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4c, 0x4f, 0x42, 0x10, 0x02, 0x2a, 0x54, 0x0a, 0x1a, + 0x46, 0x45, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, + 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x12, 0x26, 0x0a, 0x22, 0x46, 0x45, + 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x49, 0x4c, + 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x31, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x32, + 0x10, 0x02, 0x2a, 0x79, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x12, 0x1c, 0x0a, 0x18, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x4e, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x01, + 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x43, 0x4c, 0x41, 0x52, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, + 0x06, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x50, + 0x4c, 0x4f, 0x59, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x04, 0x12, 0x0e, 0x0a, + 0x0a, 0x4c, 0x31, 0x5f, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x52, 0x10, 0x05, 0x2a, 0x6d, 0x0a, + 0x10, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x1c, 0x0a, 0x18, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, + 0x19, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x45, 0x44, 0x10, 0x02, 0x42, 0xfb, 0x01, 0x0a, + 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x65, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, + 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2d, 0x66, 0x6f, 0x75, 0x6e, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x70, 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x53, 0x53, 0x54, 0xaa, 0x02, 0x13, 0x53, 0x66, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, + 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x53, 0x66, 0x5c, 0x53, + 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x1f, 0x53, 0x66, 0x5c, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x5c, 0x54, 0x79, + 0x70, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x16, 0x53, 0x66, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, + 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_sf_starknet_type_v1_block_proto_rawDescOnce sync.Once + file_sf_starknet_type_v1_block_proto_rawDescData = file_sf_starknet_type_v1_block_proto_rawDesc +) + +func file_sf_starknet_type_v1_block_proto_rawDescGZIP() []byte { + file_sf_starknet_type_v1_block_proto_rawDescOnce.Do(func() { + file_sf_starknet_type_v1_block_proto_rawDescData = protoimpl.X.CompressGZIP(file_sf_starknet_type_v1_block_proto_rawDescData) + }) + return file_sf_starknet_type_v1_block_proto_rawDescData +} + +var file_sf_starknet_type_v1_block_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_sf_starknet_type_v1_block_proto_msgTypes = make([]protoimpl.MessageInfo, 31) +var file_sf_starknet_type_v1_block_proto_goTypes = []interface{}{ + (L1_DA_MODE)(0), // 0: sf.starknet.type.v1.L1_DA_MODE + (FEE_DATA_AVAILABILITY_MODE)(0), // 1: sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE + (TRANSACTION_TYPE)(0), // 2: sf.starknet.type.v1.TRANSACTION_TYPE + (EXECUTION_STATUS)(0), // 3: sf.starknet.type.v1.EXECUTION_STATUS + (*Block)(nil), // 4: sf.starknet.type.v1.Block + (*ResourcePrice)(nil), // 5: sf.starknet.type.v1.ResourcePrice + (*TransactionWithReceipt)(nil), // 6: sf.starknet.type.v1.TransactionWithReceipt + (*TransactionReceipt)(nil), // 7: sf.starknet.type.v1.TransactionReceipt + (*MessagesSent)(nil), // 8: sf.starknet.type.v1.MessagesSent + (*Event)(nil), // 9: sf.starknet.type.v1.Event + (*ExecutionResources)(nil), // 10: sf.starknet.type.v1.ExecutionResources + (*InvokeTransactionV0)(nil), // 11: sf.starknet.type.v1.InvokeTransactionV0 + (*InvokeTransactionV1)(nil), // 12: sf.starknet.type.v1.InvokeTransactionV1 + (*InvokeTransactionV3)(nil), // 13: sf.starknet.type.v1.InvokeTransactionV3 + (*L1HandlerTransaction)(nil), // 14: sf.starknet.type.v1.L1HandlerTransaction + (*DeclareTransactionV0)(nil), // 15: sf.starknet.type.v1.DeclareTransactionV0 + (*DeclareTransactionV1)(nil), // 16: sf.starknet.type.v1.DeclareTransactionV1 + (*DeclareTransactionV2)(nil), // 17: sf.starknet.type.v1.DeclareTransactionV2 + (*DeclareTransactionV3)(nil), // 18: sf.starknet.type.v1.DeclareTransactionV3 + (*DeployTransactionV0)(nil), // 19: sf.starknet.type.v1.DeployTransactionV0 + (*DeployAccountTransactionV1)(nil), // 20: sf.starknet.type.v1.DeployAccountTransactionV1 + (*DeployAccountTransactionV3)(nil), // 21: sf.starknet.type.v1.DeployAccountTransactionV3 + (*ResourceBounds)(nil), // 22: sf.starknet.type.v1.ResourceBounds + (*Resource)(nil), // 23: sf.starknet.type.v1.Resource + (*Receipt)(nil), // 24: sf.starknet.type.v1.Receipt + (*ActualFee)(nil), // 25: sf.starknet.type.v1.ActualFee + (*DataAvailability)(nil), // 26: sf.starknet.type.v1.DataAvailability + (*StateUpdate)(nil), // 27: sf.starknet.type.v1.StateUpdate + (*StateDiff)(nil), // 28: sf.starknet.type.v1.StateDiff + (*NonceDiff)(nil), // 29: sf.starknet.type.v1.NonceDiff + (*ReplacedClass)(nil), // 30: sf.starknet.type.v1.ReplacedClass + (*DeployedContract)(nil), // 31: sf.starknet.type.v1.DeployedContract + (*DeclaredClass)(nil), // 32: sf.starknet.type.v1.DeclaredClass + (*ContractStorageDiff)(nil), // 33: sf.starknet.type.v1.ContractStorageDiff + (*StorageEntries)(nil), // 34: sf.starknet.type.v1.StorageEntries +} +var file_sf_starknet_type_v1_block_proto_depIdxs = []int32{ + 5, // 0: sf.starknet.type.v1.Block.l1_gas_price:type_name -> sf.starknet.type.v1.ResourcePrice + 5, // 1: sf.starknet.type.v1.Block.l1_data_gas_price:type_name -> sf.starknet.type.v1.ResourcePrice + 0, // 2: sf.starknet.type.v1.Block.l1_da_mode:type_name -> sf.starknet.type.v1.L1_DA_MODE + 6, // 3: sf.starknet.type.v1.Block.transactions:type_name -> sf.starknet.type.v1.TransactionWithReceipt + 27, // 4: sf.starknet.type.v1.Block.state_update:type_name -> sf.starknet.type.v1.StateUpdate + 11, // 5: sf.starknet.type.v1.TransactionWithReceipt.invoke_transaction_v0:type_name -> sf.starknet.type.v1.InvokeTransactionV0 + 12, // 6: sf.starknet.type.v1.TransactionWithReceipt.invoke_transaction_v1:type_name -> sf.starknet.type.v1.InvokeTransactionV1 + 13, // 7: sf.starknet.type.v1.TransactionWithReceipt.invoke_transaction_v3:type_name -> sf.starknet.type.v1.InvokeTransactionV3 + 14, // 8: sf.starknet.type.v1.TransactionWithReceipt.l1_handler_transaction:type_name -> sf.starknet.type.v1.L1HandlerTransaction + 15, // 9: sf.starknet.type.v1.TransactionWithReceipt.declare_transaction_v0:type_name -> sf.starknet.type.v1.DeclareTransactionV0 + 16, // 10: sf.starknet.type.v1.TransactionWithReceipt.declare_transaction_v1:type_name -> sf.starknet.type.v1.DeclareTransactionV1 + 17, // 11: sf.starknet.type.v1.TransactionWithReceipt.declare_transaction_v2:type_name -> sf.starknet.type.v1.DeclareTransactionV2 + 18, // 12: sf.starknet.type.v1.TransactionWithReceipt.declare_transaction_v3:type_name -> sf.starknet.type.v1.DeclareTransactionV3 + 19, // 13: sf.starknet.type.v1.TransactionWithReceipt.deploy_transaction_v0:type_name -> sf.starknet.type.v1.DeployTransactionV0 + 20, // 14: sf.starknet.type.v1.TransactionWithReceipt.deploy_account_transaction_v1:type_name -> sf.starknet.type.v1.DeployAccountTransactionV1 + 21, // 15: sf.starknet.type.v1.TransactionWithReceipt.deploy_account_transaction_v3:type_name -> sf.starknet.type.v1.DeployAccountTransactionV3 + 7, // 16: sf.starknet.type.v1.TransactionWithReceipt.receipt:type_name -> sf.starknet.type.v1.TransactionReceipt + 25, // 17: sf.starknet.type.v1.TransactionReceipt.actual_fee:type_name -> sf.starknet.type.v1.ActualFee + 3, // 18: sf.starknet.type.v1.TransactionReceipt.execution_status:type_name -> sf.starknet.type.v1.EXECUTION_STATUS + 2, // 19: sf.starknet.type.v1.TransactionReceipt.type:type_name -> sf.starknet.type.v1.TRANSACTION_TYPE + 8, // 20: sf.starknet.type.v1.TransactionReceipt.messages_sent:type_name -> sf.starknet.type.v1.MessagesSent + 9, // 21: sf.starknet.type.v1.TransactionReceipt.events:type_name -> sf.starknet.type.v1.Event + 10, // 22: sf.starknet.type.v1.TransactionReceipt.execution_resources:type_name -> sf.starknet.type.v1.ExecutionResources + 26, // 23: sf.starknet.type.v1.ExecutionResources.data_availability:type_name -> sf.starknet.type.v1.DataAvailability + 22, // 24: sf.starknet.type.v1.InvokeTransactionV3.resource_bounds:type_name -> sf.starknet.type.v1.ResourceBounds + 1, // 25: sf.starknet.type.v1.InvokeTransactionV3.nonce_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE + 1, // 26: sf.starknet.type.v1.InvokeTransactionV3.fee_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE + 22, // 27: sf.starknet.type.v1.DeclareTransactionV3.resource_bounds:type_name -> sf.starknet.type.v1.ResourceBounds + 1, // 28: sf.starknet.type.v1.DeclareTransactionV3.nonce_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE + 1, // 29: sf.starknet.type.v1.DeclareTransactionV3.fee_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE + 22, // 30: sf.starknet.type.v1.DeployAccountTransactionV3.resource_bounds:type_name -> sf.starknet.type.v1.ResourceBounds + 1, // 31: sf.starknet.type.v1.DeployAccountTransactionV3.nonce_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE + 1, // 32: sf.starknet.type.v1.DeployAccountTransactionV3.fee_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE + 23, // 33: sf.starknet.type.v1.ResourceBounds.l1_gas:type_name -> sf.starknet.type.v1.Resource + 23, // 34: sf.starknet.type.v1.ResourceBounds.l2_gas:type_name -> sf.starknet.type.v1.Resource + 25, // 35: sf.starknet.type.v1.Receipt.actual_fee:type_name -> sf.starknet.type.v1.ActualFee + 28, // 36: sf.starknet.type.v1.StateUpdate.state_diff:type_name -> sf.starknet.type.v1.StateDiff + 33, // 37: sf.starknet.type.v1.StateDiff.storage_diffs:type_name -> sf.starknet.type.v1.ContractStorageDiff + 32, // 38: sf.starknet.type.v1.StateDiff.declared_classes:type_name -> sf.starknet.type.v1.DeclaredClass + 31, // 39: sf.starknet.type.v1.StateDiff.deployed_contracts:type_name -> sf.starknet.type.v1.DeployedContract + 30, // 40: sf.starknet.type.v1.StateDiff.replaced_classes:type_name -> sf.starknet.type.v1.ReplacedClass + 29, // 41: sf.starknet.type.v1.StateDiff.nonces:type_name -> sf.starknet.type.v1.NonceDiff + 34, // 42: sf.starknet.type.v1.ContractStorageDiff.storage_entries:type_name -> sf.starknet.type.v1.StorageEntries + 43, // [43:43] is the sub-list for method output_type + 43, // [43:43] is the sub-list for method input_type + 43, // [43:43] is the sub-list for extension type_name + 43, // [43:43] is the sub-list for extension extendee + 0, // [0:43] is the sub-list for field type_name +} + +func init() { file_sf_starknet_type_v1_block_proto_init() } +func file_sf_starknet_type_v1_block_proto_init() { + if File_sf_starknet_type_v1_block_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sf_starknet_type_v1_block_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Block); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourcePrice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransactionWithReceipt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransactionReceipt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MessagesSent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionResources); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvokeTransactionV0); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvokeTransactionV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvokeTransactionV3); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*L1HandlerTransaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeclareTransactionV0); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeclareTransactionV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeclareTransactionV2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeclareTransactionV3); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployTransactionV0); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployAccountTransactionV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployAccountTransactionV3); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceBounds); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Resource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Receipt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActualFee); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataAvailability); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateUpdate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateDiff); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NonceDiff); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReplacedClass); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployedContract); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeclaredClass); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContractStorageDiff); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageEntries); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*TransactionWithReceipt_InvokeTransactionV0)(nil), + (*TransactionWithReceipt_InvokeTransactionV1)(nil), + (*TransactionWithReceipt_InvokeTransactionV3)(nil), + (*TransactionWithReceipt_L1HandlerTransaction)(nil), + (*TransactionWithReceipt_DeclareTransactionV0)(nil), + (*TransactionWithReceipt_DeclareTransactionV1)(nil), + (*TransactionWithReceipt_DeclareTransactionV2)(nil), + (*TransactionWithReceipt_DeclareTransactionV3)(nil), + (*TransactionWithReceipt_DeployTransactionV0)(nil), + (*TransactionWithReceipt_DeployAccountTransactionV1)(nil), + (*TransactionWithReceipt_DeployAccountTransactionV3)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_sf_starknet_type_v1_block_proto_rawDesc, + NumEnums: 4, + NumMessages: 31, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sf_starknet_type_v1_block_proto_goTypes, + DependencyIndexes: file_sf_starknet_type_v1_block_proto_depIdxs, + EnumInfos: file_sf_starknet_type_v1_block_proto_enumTypes, + MessageInfos: file_sf_starknet_type_v1_block_proto_msgTypes, + }.Build() + File_sf_starknet_type_v1_block_proto = out.File + file_sf_starknet_type_v1_block_proto_rawDesc = nil + file_sf_starknet_type_v1_block_proto_goTypes = nil + file_sf_starknet_type_v1_block_proto_depIdxs = nil +} diff --git a/starket-common/pb/sf/starknet/type/v1/block_vtproto.pb.go b/starket-common/pb/sf/starknet/type/v1/block_vtproto.pb.go new file mode 100644 index 0000000..62ea601 --- /dev/null +++ b/starket-common/pb/sf/starknet/type/v1/block_vtproto.pb.go @@ -0,0 +1,22205 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.6.0 +// source: sf/starknet/type/v1/block.proto + +package typev1 + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + proto "google.golang.org/protobuf/proto" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + unsafe "unsafe" +) + +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) +) + +func (m *Block) CloneVT() *Block { + if m == nil { + return (*Block)(nil) + } + r := new(Block) + r.BlockNumber = m.BlockNumber + r.Timestamp = m.Timestamp + r.L1GasPrice = m.L1GasPrice.CloneVT() + r.L1DataGasPrice = m.L1DataGasPrice.CloneVT() + r.L1DaMode = m.L1DaMode + r.StarknetVersion = m.StarknetVersion + r.StateUpdate = m.StateUpdate.CloneVT() + if rhs := m.BlockHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.BlockHash = tmpBytes + } + if rhs := m.ParentHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ParentHash = tmpBytes + } + if rhs := m.NewRoot; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.NewRoot = tmpBytes + } + if rhs := m.SequencerAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.SequencerAddress = tmpBytes + } + if rhs := m.Transactions; rhs != nil { + tmpContainer := make([]*TransactionWithReceipt, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Transactions = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Block) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ResourcePrice) CloneVT() *ResourcePrice { + if m == nil { + return (*ResourcePrice)(nil) + } + r := new(ResourcePrice) + if rhs := m.PriceInFri; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.PriceInFri = tmpBytes + } + if rhs := m.PriceInWei; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.PriceInWei = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ResourcePrice) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *TransactionWithReceipt) CloneVT() *TransactionWithReceipt { + if m == nil { + return (*TransactionWithReceipt)(nil) + } + r := new(TransactionWithReceipt) + r.Receipt = m.Receipt.CloneVT() + if m.Transaction != nil { + r.Transaction = m.Transaction.(interface { + CloneVT() isTransactionWithReceipt_Transaction + }).CloneVT() + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *TransactionWithReceipt) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *TransactionWithReceipt_InvokeTransactionV0) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_InvokeTransactionV0)(nil) + } + r := new(TransactionWithReceipt_InvokeTransactionV0) + r.InvokeTransactionV0 = m.InvokeTransactionV0.CloneVT() + return r +} + +func (m *TransactionWithReceipt_InvokeTransactionV1) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_InvokeTransactionV1)(nil) + } + r := new(TransactionWithReceipt_InvokeTransactionV1) + r.InvokeTransactionV1 = m.InvokeTransactionV1.CloneVT() + return r +} + +func (m *TransactionWithReceipt_InvokeTransactionV3) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_InvokeTransactionV3)(nil) + } + r := new(TransactionWithReceipt_InvokeTransactionV3) + r.InvokeTransactionV3 = m.InvokeTransactionV3.CloneVT() + return r +} + +func (m *TransactionWithReceipt_L1HandlerTransaction) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_L1HandlerTransaction)(nil) + } + r := new(TransactionWithReceipt_L1HandlerTransaction) + r.L1HandlerTransaction = m.L1HandlerTransaction.CloneVT() + return r +} + +func (m *TransactionWithReceipt_DeclareTransactionV0) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_DeclareTransactionV0)(nil) + } + r := new(TransactionWithReceipt_DeclareTransactionV0) + r.DeclareTransactionV0 = m.DeclareTransactionV0.CloneVT() + return r +} + +func (m *TransactionWithReceipt_DeclareTransactionV1) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_DeclareTransactionV1)(nil) + } + r := new(TransactionWithReceipt_DeclareTransactionV1) + r.DeclareTransactionV1 = m.DeclareTransactionV1.CloneVT() + return r +} + +func (m *TransactionWithReceipt_DeclareTransactionV2) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_DeclareTransactionV2)(nil) + } + r := new(TransactionWithReceipt_DeclareTransactionV2) + r.DeclareTransactionV2 = m.DeclareTransactionV2.CloneVT() + return r +} + +func (m *TransactionWithReceipt_DeclareTransactionV3) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_DeclareTransactionV3)(nil) + } + r := new(TransactionWithReceipt_DeclareTransactionV3) + r.DeclareTransactionV3 = m.DeclareTransactionV3.CloneVT() + return r +} + +func (m *TransactionWithReceipt_DeployTransactionV0) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_DeployTransactionV0)(nil) + } + r := new(TransactionWithReceipt_DeployTransactionV0) + r.DeployTransactionV0 = m.DeployTransactionV0.CloneVT() + return r +} + +func (m *TransactionWithReceipt_DeployAccountTransactionV1) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_DeployAccountTransactionV1)(nil) + } + r := new(TransactionWithReceipt_DeployAccountTransactionV1) + r.DeployAccountTransactionV1 = m.DeployAccountTransactionV1.CloneVT() + return r +} + +func (m *TransactionWithReceipt_DeployAccountTransactionV3) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_DeployAccountTransactionV3)(nil) + } + r := new(TransactionWithReceipt_DeployAccountTransactionV3) + r.DeployAccountTransactionV3 = m.DeployAccountTransactionV3.CloneVT() + return r +} + +func (m *TransactionReceipt) CloneVT() *TransactionReceipt { + if m == nil { + return (*TransactionReceipt)(nil) + } + r := new(TransactionReceipt) + r.ActualFee = m.ActualFee.CloneVT() + r.ExecutionStatus = m.ExecutionStatus + r.RevertReason = m.RevertReason + r.Type = m.Type + r.MessageHash = m.MessageHash + r.ExecutionResources = m.ExecutionResources.CloneVT() + if rhs := m.TransactionHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.TransactionHash = tmpBytes + } + if rhs := m.MessagesSent; rhs != nil { + tmpContainer := make([]*MessagesSent, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.MessagesSent = tmpContainer + } + if rhs := m.Events; rhs != nil { + tmpContainer := make([]*Event, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Events = tmpContainer + } + if rhs := m.ContractAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddress = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *TransactionReceipt) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *MessagesSent) CloneVT() *MessagesSent { + if m == nil { + return (*MessagesSent)(nil) + } + r := new(MessagesSent) + if rhs := m.FromAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.FromAddress = tmpBytes + } + if rhs := m.ToAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ToAddress = tmpBytes + } + if rhs := m.Payload; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Payload = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *MessagesSent) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Event) CloneVT() *Event { + if m == nil { + return (*Event)(nil) + } + r := new(Event) + if rhs := m.FromAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.FromAddress = tmpBytes + } + if rhs := m.Keys; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Keys = tmpContainer + } + if rhs := m.Data; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Data = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Event) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ExecutionResources) CloneVT() *ExecutionResources { + if m == nil { + return (*ExecutionResources)(nil) + } + r := new(ExecutionResources) + r.Steps = m.Steps + r.MemoryHoles = m.MemoryHoles + r.RangeCheckBuiltinApplications = m.RangeCheckBuiltinApplications + r.PedersenBuiltinApplications = m.PedersenBuiltinApplications + r.PoseidonBuiltinApplications = m.PoseidonBuiltinApplications + r.EcOpBuiltinApplications = m.EcOpBuiltinApplications + r.EcdsaBuiltinApplications = m.EcdsaBuiltinApplications + r.BitwiseBuiltinApplications = m.BitwiseBuiltinApplications + r.KeccakBuiltinApplications = m.KeccakBuiltinApplications + r.SegmentArenaBuiltin = m.SegmentArenaBuiltin + r.DataAvailability = m.DataAvailability.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ExecutionResources) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *InvokeTransactionV0) CloneVT() *InvokeTransactionV0 { + if m == nil { + return (*InvokeTransactionV0)(nil) + } + r := new(InvokeTransactionV0) + r.Version = m.Version + if rhs := m.MaxFee; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.MaxFee = tmpBytes + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.ContractAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddress = tmpBytes + } + if rhs := m.EntryPointSelector; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.EntryPointSelector = tmpBytes + } + if rhs := m.Calldata; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Calldata = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *InvokeTransactionV0) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *InvokeTransactionV1) CloneVT() *InvokeTransactionV1 { + if m == nil { + return (*InvokeTransactionV1)(nil) + } + r := new(InvokeTransactionV1) + r.Version = m.Version + if rhs := m.MaxFee; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.MaxFee = tmpBytes + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if rhs := m.SenderAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.SenderAddress = tmpBytes + } + if rhs := m.Calldata; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Calldata = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *InvokeTransactionV1) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *InvokeTransactionV3) CloneVT() *InvokeTransactionV3 { + if m == nil { + return (*InvokeTransactionV3)(nil) + } + r := new(InvokeTransactionV3) + r.Version = m.Version + r.ResourceBounds = m.ResourceBounds.CloneVT() + r.NonceDataAvailabilityMode = m.NonceDataAvailabilityMode + r.FeeDataAvailabilityMode = m.FeeDataAvailabilityMode + if rhs := m.SenderAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.SenderAddress = tmpBytes + } + if rhs := m.Calldata; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Calldata = tmpContainer + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if rhs := m.Tip; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Tip = tmpBytes + } + if rhs := m.PaymasterData; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.PaymasterData = tmpContainer + } + if rhs := m.AccountDeploymentData; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.AccountDeploymentData = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *InvokeTransactionV3) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *L1HandlerTransaction) CloneVT() *L1HandlerTransaction { + if m == nil { + return (*L1HandlerTransaction)(nil) + } + r := new(L1HandlerTransaction) + r.Version = m.Version + r.Nonce = m.Nonce + if rhs := m.ContractAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddress = tmpBytes + } + if rhs := m.EntryPointSelector; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.EntryPointSelector = tmpBytes + } + if rhs := m.Calldata; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Calldata = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *L1HandlerTransaction) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeclareTransactionV0) CloneVT() *DeclareTransactionV0 { + if m == nil { + return (*DeclareTransactionV0)(nil) + } + r := new(DeclareTransactionV0) + r.Version = m.Version + if rhs := m.SenderAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.SenderAddress = tmpBytes + } + if rhs := m.MaxFee; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.MaxFee = tmpBytes + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeclareTransactionV0) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeclareTransactionV1) CloneVT() *DeclareTransactionV1 { + if m == nil { + return (*DeclareTransactionV1)(nil) + } + r := new(DeclareTransactionV1) + r.Version = m.Version + if rhs := m.SenderAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.SenderAddress = tmpBytes + } + if rhs := m.MaxFee; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.MaxFee = tmpBytes + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeclareTransactionV1) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeclareTransactionV2) CloneVT() *DeclareTransactionV2 { + if m == nil { + return (*DeclareTransactionV2)(nil) + } + r := new(DeclareTransactionV2) + r.Version = m.Version + if rhs := m.SenderAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.SenderAddress = tmpBytes + } + if rhs := m.CompiledClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.CompiledClassHash = tmpBytes + } + if rhs := m.MaxFee; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.MaxFee = tmpBytes + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeclareTransactionV2) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeclareTransactionV3) CloneVT() *DeclareTransactionV3 { + if m == nil { + return (*DeclareTransactionV3)(nil) + } + r := new(DeclareTransactionV3) + r.Version = m.Version + r.ResourceBounds = m.ResourceBounds.CloneVT() + r.NonceDataAvailabilityMode = m.NonceDataAvailabilityMode + r.FeeDataAvailabilityMode = m.FeeDataAvailabilityMode + if rhs := m.SenderAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.SenderAddress = tmpBytes + } + if rhs := m.CompiledClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.CompiledClassHash = tmpBytes + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if rhs := m.Tip; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Tip = tmpBytes + } + if rhs := m.PaymasterData; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.PaymasterData = tmpContainer + } + if rhs := m.AccountDeploymentData; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.AccountDeploymentData = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeclareTransactionV3) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeployTransactionV0) CloneVT() *DeployTransactionV0 { + if m == nil { + return (*DeployTransactionV0)(nil) + } + r := new(DeployTransactionV0) + r.Version = m.Version + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if rhs := m.ContractAddressSalt; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddressSalt = tmpBytes + } + if rhs := m.ConstructorCalldata; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.ConstructorCalldata = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeployTransactionV0) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeployAccountTransactionV1) CloneVT() *DeployAccountTransactionV1 { + if m == nil { + return (*DeployAccountTransactionV1)(nil) + } + r := new(DeployAccountTransactionV1) + r.Version = m.Version + if rhs := m.MaxFee; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.MaxFee = tmpBytes + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if rhs := m.ContractAddressSalt; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddressSalt = tmpBytes + } + if rhs := m.ConstructorCalldata; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.ConstructorCalldata = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeployAccountTransactionV1) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeployAccountTransactionV3) CloneVT() *DeployAccountTransactionV3 { + if m == nil { + return (*DeployAccountTransactionV3)(nil) + } + r := new(DeployAccountTransactionV3) + r.Version = m.Version + r.ResourceBounds = m.ResourceBounds.CloneVT() + r.NonceDataAvailabilityMode = m.NonceDataAvailabilityMode + r.FeeDataAvailabilityMode = m.FeeDataAvailabilityMode + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if rhs := m.ContractAddressSalt; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddressSalt = tmpBytes + } + if rhs := m.ConstructorCalldata; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.ConstructorCalldata = tmpContainer + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if rhs := m.Tip; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Tip = tmpBytes + } + if rhs := m.PaymasterData; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.PaymasterData = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeployAccountTransactionV3) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ResourceBounds) CloneVT() *ResourceBounds { + if m == nil { + return (*ResourceBounds)(nil) + } + r := new(ResourceBounds) + r.L1Gas = m.L1Gas.CloneVT() + r.L2Gas = m.L2Gas.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ResourceBounds) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Resource) CloneVT() *Resource { + if m == nil { + return (*Resource)(nil) + } + r := new(Resource) + r.MaxAmount = m.MaxAmount + r.MaxPricePerUnit = m.MaxPricePerUnit + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Resource) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Receipt) CloneVT() *Receipt { + if m == nil { + return (*Receipt)(nil) + } + r := new(Receipt) + r.ActualFee = m.ActualFee.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Receipt) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ActualFee) CloneVT() *ActualFee { + if m == nil { + return (*ActualFee)(nil) + } + r := new(ActualFee) + r.Unit = m.Unit + if rhs := m.Amount; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Amount = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ActualFee) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DataAvailability) CloneVT() *DataAvailability { + if m == nil { + return (*DataAvailability)(nil) + } + r := new(DataAvailability) + r.L1Gas = m.L1Gas + r.L1DataGas = m.L1DataGas + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DataAvailability) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *StateUpdate) CloneVT() *StateUpdate { + if m == nil { + return (*StateUpdate)(nil) + } + r := new(StateUpdate) + r.StateDiff = m.StateDiff.CloneVT() + if rhs := m.NewRoot; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.NewRoot = tmpBytes + } + if rhs := m.OldRoot; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.OldRoot = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *StateUpdate) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *StateDiff) CloneVT() *StateDiff { + if m == nil { + return (*StateDiff)(nil) + } + r := new(StateDiff) + if rhs := m.StorageDiffs; rhs != nil { + tmpContainer := make([]*ContractStorageDiff, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.StorageDiffs = tmpContainer + } + if rhs := m.DeprecatedDeclaredClasses; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.DeprecatedDeclaredClasses = tmpContainer + } + if rhs := m.DeclaredClasses; rhs != nil { + tmpContainer := make([]*DeclaredClass, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.DeclaredClasses = tmpContainer + } + if rhs := m.DeployedContracts; rhs != nil { + tmpContainer := make([]*DeployedContract, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.DeployedContracts = tmpContainer + } + if rhs := m.ReplacedClasses; rhs != nil { + tmpContainer := make([]*ReplacedClass, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.ReplacedClasses = tmpContainer + } + if rhs := m.Nonces; rhs != nil { + tmpContainer := make([]*NonceDiff, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Nonces = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *StateDiff) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *NonceDiff) CloneVT() *NonceDiff { + if m == nil { + return (*NonceDiff)(nil) + } + r := new(NonceDiff) + if rhs := m.ContractAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddress = tmpBytes + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *NonceDiff) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ReplacedClass) CloneVT() *ReplacedClass { + if m == nil { + return (*ReplacedClass)(nil) + } + r := new(ReplacedClass) + if rhs := m.ContractAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddress = tmpBytes + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ReplacedClass) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeployedContract) CloneVT() *DeployedContract { + if m == nil { + return (*DeployedContract)(nil) + } + r := new(DeployedContract) + if rhs := m.Address; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Address = tmpBytes + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeployedContract) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeclaredClass) CloneVT() *DeclaredClass { + if m == nil { + return (*DeclaredClass)(nil) + } + r := new(DeclaredClass) + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if rhs := m.CompiledClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.CompiledClassHash = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeclaredClass) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ContractStorageDiff) CloneVT() *ContractStorageDiff { + if m == nil { + return (*ContractStorageDiff)(nil) + } + r := new(ContractStorageDiff) + if rhs := m.Address; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Address = tmpBytes + } + if rhs := m.StorageEntries; rhs != nil { + tmpContainer := make([]*StorageEntries, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.StorageEntries = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ContractStorageDiff) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *StorageEntries) CloneVT() *StorageEntries { + if m == nil { + return (*StorageEntries)(nil) + } + r := new(StorageEntries) + if rhs := m.Key; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Key = tmpBytes + } + if rhs := m.Value; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Value = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *StorageEntries) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (this *Block) EqualVT(that *Block) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.BlockHash) != string(that.BlockHash) { + return false + } + if string(this.ParentHash) != string(that.ParentHash) { + return false + } + if this.BlockNumber != that.BlockNumber { + return false + } + if string(this.NewRoot) != string(that.NewRoot) { + return false + } + if this.Timestamp != that.Timestamp { + return false + } + if string(this.SequencerAddress) != string(that.SequencerAddress) { + return false + } + if !this.L1GasPrice.EqualVT(that.L1GasPrice) { + return false + } + if !this.L1DataGasPrice.EqualVT(that.L1DataGasPrice) { + return false + } + if this.L1DaMode != that.L1DaMode { + return false + } + if this.StarknetVersion != that.StarknetVersion { + return false + } + if len(this.Transactions) != len(that.Transactions) { + return false + } + for i, vx := range this.Transactions { + vy := that.Transactions[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &TransactionWithReceipt{} + } + if q == nil { + q = &TransactionWithReceipt{} + } + if !p.EqualVT(q) { + return false + } + } + } + if !this.StateUpdate.EqualVT(that.StateUpdate) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Block) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Block) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ResourcePrice) EqualVT(that *ResourcePrice) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.PriceInFri) != string(that.PriceInFri) { + return false + } + if string(this.PriceInWei) != string(that.PriceInWei) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ResourcePrice) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ResourcePrice) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *TransactionWithReceipt) EqualVT(that *TransactionWithReceipt) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Transaction == nil && that.Transaction != nil { + return false + } else if this.Transaction != nil { + if that.Transaction == nil { + return false + } + if !this.Transaction.(interface { + EqualVT(isTransactionWithReceipt_Transaction) bool + }).EqualVT(that.Transaction) { + return false + } + } + if !this.Receipt.EqualVT(that.Receipt) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TransactionWithReceipt) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TransactionWithReceipt) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *TransactionWithReceipt_InvokeTransactionV0) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_InvokeTransactionV0) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.InvokeTransactionV0, that.InvokeTransactionV0; p != q { + if p == nil { + p = &InvokeTransactionV0{} + } + if q == nil { + q = &InvokeTransactionV0{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_InvokeTransactionV1) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_InvokeTransactionV1) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.InvokeTransactionV1, that.InvokeTransactionV1; p != q { + if p == nil { + p = &InvokeTransactionV1{} + } + if q == nil { + q = &InvokeTransactionV1{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_InvokeTransactionV3) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_InvokeTransactionV3) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.InvokeTransactionV3, that.InvokeTransactionV3; p != q { + if p == nil { + p = &InvokeTransactionV3{} + } + if q == nil { + q = &InvokeTransactionV3{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_L1HandlerTransaction) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_L1HandlerTransaction) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.L1HandlerTransaction, that.L1HandlerTransaction; p != q { + if p == nil { + p = &L1HandlerTransaction{} + } + if q == nil { + q = &L1HandlerTransaction{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_DeclareTransactionV0) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_DeclareTransactionV0) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.DeclareTransactionV0, that.DeclareTransactionV0; p != q { + if p == nil { + p = &DeclareTransactionV0{} + } + if q == nil { + q = &DeclareTransactionV0{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_DeclareTransactionV1) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_DeclareTransactionV1) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.DeclareTransactionV1, that.DeclareTransactionV1; p != q { + if p == nil { + p = &DeclareTransactionV1{} + } + if q == nil { + q = &DeclareTransactionV1{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_DeclareTransactionV2) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_DeclareTransactionV2) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.DeclareTransactionV2, that.DeclareTransactionV2; p != q { + if p == nil { + p = &DeclareTransactionV2{} + } + if q == nil { + q = &DeclareTransactionV2{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_DeclareTransactionV3) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_DeclareTransactionV3) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.DeclareTransactionV3, that.DeclareTransactionV3; p != q { + if p == nil { + p = &DeclareTransactionV3{} + } + if q == nil { + q = &DeclareTransactionV3{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_DeployTransactionV0) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_DeployTransactionV0) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.DeployTransactionV0, that.DeployTransactionV0; p != q { + if p == nil { + p = &DeployTransactionV0{} + } + if q == nil { + q = &DeployTransactionV0{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_DeployAccountTransactionV1) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_DeployAccountTransactionV1) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.DeployAccountTransactionV1, that.DeployAccountTransactionV1; p != q { + if p == nil { + p = &DeployAccountTransactionV1{} + } + if q == nil { + q = &DeployAccountTransactionV1{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_DeployAccountTransactionV3) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_DeployAccountTransactionV3) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.DeployAccountTransactionV3, that.DeployAccountTransactionV3; p != q { + if p == nil { + p = &DeployAccountTransactionV3{} + } + if q == nil { + q = &DeployAccountTransactionV3{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionReceipt) EqualVT(that *TransactionReceipt) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.TransactionHash) != string(that.TransactionHash) { + return false + } + if !this.ActualFee.EqualVT(that.ActualFee) { + return false + } + if this.ExecutionStatus != that.ExecutionStatus { + return false + } + if this.RevertReason != that.RevertReason { + return false + } + if this.Type != that.Type { + return false + } + if this.MessageHash != that.MessageHash { + return false + } + if len(this.MessagesSent) != len(that.MessagesSent) { + return false + } + for i, vx := range this.MessagesSent { + vy := that.MessagesSent[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &MessagesSent{} + } + if q == nil { + q = &MessagesSent{} + } + if !p.EqualVT(q) { + return false + } + } + } + if len(this.Events) != len(that.Events) { + return false + } + for i, vx := range this.Events { + vy := that.Events[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &Event{} + } + if q == nil { + q = &Event{} + } + if !p.EqualVT(q) { + return false + } + } + } + if !this.ExecutionResources.EqualVT(that.ExecutionResources) { + return false + } + if string(this.ContractAddress) != string(that.ContractAddress) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TransactionReceipt) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TransactionReceipt) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *MessagesSent) EqualVT(that *MessagesSent) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.FromAddress) != string(that.FromAddress) { + return false + } + if string(this.ToAddress) != string(that.ToAddress) { + return false + } + if len(this.Payload) != len(that.Payload) { + return false + } + for i, vx := range this.Payload { + vy := that.Payload[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *MessagesSent) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*MessagesSent) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Event) EqualVT(that *Event) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.FromAddress) != string(that.FromAddress) { + return false + } + if len(this.Keys) != len(that.Keys) { + return false + } + for i, vx := range this.Keys { + vy := that.Keys[i] + if string(vx) != string(vy) { + return false + } + } + if len(this.Data) != len(that.Data) { + return false + } + for i, vx := range this.Data { + vy := that.Data[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Event) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Event) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ExecutionResources) EqualVT(that *ExecutionResources) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Steps != that.Steps { + return false + } + if this.MemoryHoles != that.MemoryHoles { + return false + } + if this.RangeCheckBuiltinApplications != that.RangeCheckBuiltinApplications { + return false + } + if this.PedersenBuiltinApplications != that.PedersenBuiltinApplications { + return false + } + if this.PoseidonBuiltinApplications != that.PoseidonBuiltinApplications { + return false + } + if this.EcOpBuiltinApplications != that.EcOpBuiltinApplications { + return false + } + if this.EcdsaBuiltinApplications != that.EcdsaBuiltinApplications { + return false + } + if this.BitwiseBuiltinApplications != that.BitwiseBuiltinApplications { + return false + } + if this.KeccakBuiltinApplications != that.KeccakBuiltinApplications { + return false + } + if this.SegmentArenaBuiltin != that.SegmentArenaBuiltin { + return false + } + if !this.DataAvailability.EqualVT(that.DataAvailability) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ExecutionResources) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ExecutionResources) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *InvokeTransactionV0) EqualVT(that *InvokeTransactionV0) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.MaxFee) != string(that.MaxFee) { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.ContractAddress) != string(that.ContractAddress) { + return false + } + if string(this.EntryPointSelector) != string(that.EntryPointSelector) { + return false + } + if len(this.Calldata) != len(that.Calldata) { + return false + } + for i, vx := range this.Calldata { + vy := that.Calldata[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *InvokeTransactionV0) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*InvokeTransactionV0) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *InvokeTransactionV1) EqualVT(that *InvokeTransactionV1) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.MaxFee) != string(that.MaxFee) { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + if string(this.SenderAddress) != string(that.SenderAddress) { + return false + } + if len(this.Calldata) != len(that.Calldata) { + return false + } + for i, vx := range this.Calldata { + vy := that.Calldata[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *InvokeTransactionV1) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*InvokeTransactionV1) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *InvokeTransactionV3) EqualVT(that *InvokeTransactionV3) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.SenderAddress) != string(that.SenderAddress) { + return false + } + if len(this.Calldata) != len(that.Calldata) { + return false + } + for i, vx := range this.Calldata { + vy := that.Calldata[i] + if string(vx) != string(vy) { + return false + } + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + if !this.ResourceBounds.EqualVT(that.ResourceBounds) { + return false + } + if string(this.Tip) != string(that.Tip) { + return false + } + if len(this.PaymasterData) != len(that.PaymasterData) { + return false + } + for i, vx := range this.PaymasterData { + vy := that.PaymasterData[i] + if string(vx) != string(vy) { + return false + } + } + if len(this.AccountDeploymentData) != len(that.AccountDeploymentData) { + return false + } + for i, vx := range this.AccountDeploymentData { + vy := that.AccountDeploymentData[i] + if string(vx) != string(vy) { + return false + } + } + if this.NonceDataAvailabilityMode != that.NonceDataAvailabilityMode { + return false + } + if this.FeeDataAvailabilityMode != that.FeeDataAvailabilityMode { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *InvokeTransactionV3) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*InvokeTransactionV3) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *L1HandlerTransaction) EqualVT(that *L1HandlerTransaction) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Version != that.Version { + return false + } + if this.Nonce != that.Nonce { + return false + } + if string(this.ContractAddress) != string(that.ContractAddress) { + return false + } + if string(this.EntryPointSelector) != string(that.EntryPointSelector) { + return false + } + if len(this.Calldata) != len(that.Calldata) { + return false + } + for i, vx := range this.Calldata { + vy := that.Calldata[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *L1HandlerTransaction) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*L1HandlerTransaction) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeclareTransactionV0) EqualVT(that *DeclareTransactionV0) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.SenderAddress) != string(that.SenderAddress) { + return false + } + if string(this.MaxFee) != string(that.MaxFee) { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeclareTransactionV0) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeclareTransactionV0) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeclareTransactionV1) EqualVT(that *DeclareTransactionV1) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.SenderAddress) != string(that.SenderAddress) { + return false + } + if string(this.MaxFee) != string(that.MaxFee) { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeclareTransactionV1) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeclareTransactionV1) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeclareTransactionV2) EqualVT(that *DeclareTransactionV2) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.SenderAddress) != string(that.SenderAddress) { + return false + } + if string(this.CompiledClassHash) != string(that.CompiledClassHash) { + return false + } + if string(this.MaxFee) != string(that.MaxFee) { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeclareTransactionV2) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeclareTransactionV2) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeclareTransactionV3) EqualVT(that *DeclareTransactionV3) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.SenderAddress) != string(that.SenderAddress) { + return false + } + if string(this.CompiledClassHash) != string(that.CompiledClassHash) { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + if !this.ResourceBounds.EqualVT(that.ResourceBounds) { + return false + } + if string(this.Tip) != string(that.Tip) { + return false + } + if len(this.PaymasterData) != len(that.PaymasterData) { + return false + } + for i, vx := range this.PaymasterData { + vy := that.PaymasterData[i] + if string(vx) != string(vy) { + return false + } + } + if len(this.AccountDeploymentData) != len(that.AccountDeploymentData) { + return false + } + for i, vx := range this.AccountDeploymentData { + vy := that.AccountDeploymentData[i] + if string(vx) != string(vy) { + return false + } + } + if this.NonceDataAvailabilityMode != that.NonceDataAvailabilityMode { + return false + } + if this.FeeDataAvailabilityMode != that.FeeDataAvailabilityMode { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeclareTransactionV3) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeclareTransactionV3) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeployTransactionV0) EqualVT(that *DeployTransactionV0) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + if this.Version != that.Version { + return false + } + if string(this.ContractAddressSalt) != string(that.ContractAddressSalt) { + return false + } + if len(this.ConstructorCalldata) != len(that.ConstructorCalldata) { + return false + } + for i, vx := range this.ConstructorCalldata { + vy := that.ConstructorCalldata[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeployTransactionV0) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeployTransactionV0) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeployAccountTransactionV1) EqualVT(that *DeployAccountTransactionV1) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.MaxFee) != string(that.MaxFee) { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + if string(this.ContractAddressSalt) != string(that.ContractAddressSalt) { + return false + } + if len(this.ConstructorCalldata) != len(that.ConstructorCalldata) { + return false + } + for i, vx := range this.ConstructorCalldata { + vy := that.ConstructorCalldata[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeployAccountTransactionV1) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeployAccountTransactionV1) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeployAccountTransactionV3) EqualVT(that *DeployAccountTransactionV3) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + if string(this.ContractAddressSalt) != string(that.ContractAddressSalt) { + return false + } + if len(this.ConstructorCalldata) != len(that.ConstructorCalldata) { + return false + } + for i, vx := range this.ConstructorCalldata { + vy := that.ConstructorCalldata[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + if !this.ResourceBounds.EqualVT(that.ResourceBounds) { + return false + } + if string(this.Tip) != string(that.Tip) { + return false + } + if len(this.PaymasterData) != len(that.PaymasterData) { + return false + } + for i, vx := range this.PaymasterData { + vy := that.PaymasterData[i] + if string(vx) != string(vy) { + return false + } + } + if this.NonceDataAvailabilityMode != that.NonceDataAvailabilityMode { + return false + } + if this.FeeDataAvailabilityMode != that.FeeDataAvailabilityMode { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeployAccountTransactionV3) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeployAccountTransactionV3) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ResourceBounds) EqualVT(that *ResourceBounds) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.L1Gas.EqualVT(that.L1Gas) { + return false + } + if !this.L2Gas.EqualVT(that.L2Gas) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ResourceBounds) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ResourceBounds) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Resource) EqualVT(that *Resource) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.MaxAmount != that.MaxAmount { + return false + } + if this.MaxPricePerUnit != that.MaxPricePerUnit { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Resource) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Resource) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Receipt) EqualVT(that *Receipt) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.ActualFee.EqualVT(that.ActualFee) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Receipt) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Receipt) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ActualFee) EqualVT(that *ActualFee) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.Amount) != string(that.Amount) { + return false + } + if this.Unit != that.Unit { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ActualFee) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ActualFee) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DataAvailability) EqualVT(that *DataAvailability) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.L1Gas != that.L1Gas { + return false + } + if this.L1DataGas != that.L1DataGas { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DataAvailability) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DataAvailability) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *StateUpdate) EqualVT(that *StateUpdate) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.OldRoot) != string(that.OldRoot) { + return false + } + if string(this.NewRoot) != string(that.NewRoot) { + return false + } + if !this.StateDiff.EqualVT(that.StateDiff) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *StateUpdate) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*StateUpdate) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *StateDiff) EqualVT(that *StateDiff) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.StorageDiffs) != len(that.StorageDiffs) { + return false + } + for i, vx := range this.StorageDiffs { + vy := that.StorageDiffs[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &ContractStorageDiff{} + } + if q == nil { + q = &ContractStorageDiff{} + } + if !p.EqualVT(q) { + return false + } + } + } + if len(this.DeprecatedDeclaredClasses) != len(that.DeprecatedDeclaredClasses) { + return false + } + for i, vx := range this.DeprecatedDeclaredClasses { + vy := that.DeprecatedDeclaredClasses[i] + if string(vx) != string(vy) { + return false + } + } + if len(this.DeclaredClasses) != len(that.DeclaredClasses) { + return false + } + for i, vx := range this.DeclaredClasses { + vy := that.DeclaredClasses[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &DeclaredClass{} + } + if q == nil { + q = &DeclaredClass{} + } + if !p.EqualVT(q) { + return false + } + } + } + if len(this.DeployedContracts) != len(that.DeployedContracts) { + return false + } + for i, vx := range this.DeployedContracts { + vy := that.DeployedContracts[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &DeployedContract{} + } + if q == nil { + q = &DeployedContract{} + } + if !p.EqualVT(q) { + return false + } + } + } + if len(this.ReplacedClasses) != len(that.ReplacedClasses) { + return false + } + for i, vx := range this.ReplacedClasses { + vy := that.ReplacedClasses[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &ReplacedClass{} + } + if q == nil { + q = &ReplacedClass{} + } + if !p.EqualVT(q) { + return false + } + } + } + if len(this.Nonces) != len(that.Nonces) { + return false + } + for i, vx := range this.Nonces { + vy := that.Nonces[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &NonceDiff{} + } + if q == nil { + q = &NonceDiff{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *StateDiff) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*StateDiff) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *NonceDiff) EqualVT(that *NonceDiff) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.ContractAddress) != string(that.ContractAddress) { + return false + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *NonceDiff) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*NonceDiff) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ReplacedClass) EqualVT(that *ReplacedClass) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.ContractAddress) != string(that.ContractAddress) { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ReplacedClass) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ReplacedClass) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeployedContract) EqualVT(that *DeployedContract) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.Address) != string(that.Address) { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeployedContract) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeployedContract) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeclaredClass) EqualVT(that *DeclaredClass) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + if string(this.CompiledClassHash) != string(that.CompiledClassHash) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeclaredClass) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeclaredClass) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ContractStorageDiff) EqualVT(that *ContractStorageDiff) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.Address) != string(that.Address) { + return false + } + if len(this.StorageEntries) != len(that.StorageEntries) { + return false + } + for i, vx := range this.StorageEntries { + vy := that.StorageEntries[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &StorageEntries{} + } + if q == nil { + q = &StorageEntries{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ContractStorageDiff) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ContractStorageDiff) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *StorageEntries) EqualVT(that *StorageEntries) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.Key) != string(that.Key) { + return false + } + if string(this.Value) != string(that.Value) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *StorageEntries) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*StorageEntries) + if !ok { + return false + } + return this.EqualVT(that) +} +func (m *Block) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Block) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Block) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.StateUpdate != nil { + size, err := m.StateUpdate.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + } + if len(m.Transactions) > 0 { + for iNdEx := len(m.Transactions) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Transactions[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + } + if len(m.StarknetVersion) > 0 { + i -= len(m.StarknetVersion) + copy(dAtA[i:], m.StarknetVersion) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StarknetVersion))) + i-- + dAtA[i] = 0x52 + } + if m.L1DaMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1DaMode)) + i-- + dAtA[i] = 0x48 + } + if m.L1DataGasPrice != nil { + size, err := m.L1DataGasPrice.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + if m.L1GasPrice != nil { + size, err := m.L1GasPrice.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + if len(m.SequencerAddress) > 0 { + i -= len(m.SequencerAddress) + copy(dAtA[i:], m.SequencerAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SequencerAddress))) + i-- + dAtA[i] = 0x32 + } + if m.Timestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x28 + } + if len(m.NewRoot) > 0 { + i -= len(m.NewRoot) + copy(dAtA[i:], m.NewRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NewRoot))) + i-- + dAtA[i] = 0x22 + } + if m.BlockNumber != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.BlockNumber)) + i-- + dAtA[i] = 0x18 + } + if len(m.ParentHash) > 0 { + i -= len(m.ParentHash) + copy(dAtA[i:], m.ParentHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResourcePrice) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourcePrice) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ResourcePrice) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.PriceInWei) > 0 { + i -= len(m.PriceInWei) + copy(dAtA[i:], m.PriceInWei) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PriceInWei))) + i-- + dAtA[i] = 0x12 + } + if len(m.PriceInFri) > 0 { + i -= len(m.PriceInFri) + copy(dAtA[i:], m.PriceInFri) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PriceInFri))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TransactionWithReceipt) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TransactionWithReceipt) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if vtmsg, ok := m.Transaction.(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if m.Receipt != nil { + size, err := m.Receipt.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + } + return len(dAtA) - i, nil +} + +func (m *TransactionWithReceipt_InvokeTransactionV0) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_InvokeTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.InvokeTransactionV0 != nil { + size, err := m.InvokeTransactionV0.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_InvokeTransactionV1) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_InvokeTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.InvokeTransactionV1 != nil { + size, err := m.InvokeTransactionV1.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_InvokeTransactionV3) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_InvokeTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.InvokeTransactionV3 != nil { + size, err := m.InvokeTransactionV3.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_L1HandlerTransaction) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_L1HandlerTransaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.L1HandlerTransaction != nil { + size, err := m.L1HandlerTransaction.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV0) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV0 != nil { + size, err := m.DeclareTransactionV0.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV1) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV1 != nil { + size, err := m.DeclareTransactionV1.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV2) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV2 != nil { + size, err := m.DeclareTransactionV2.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV3) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV3 != nil { + size, err := m.DeclareTransactionV3.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeployTransactionV0) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeployTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeployTransactionV0 != nil { + size, err := m.DeployTransactionV0.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x4a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeployAccountTransactionV1) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeployAccountTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeployAccountTransactionV1 != nil { + size, err := m.DeployAccountTransactionV1.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x52 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeployAccountTransactionV3) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeployAccountTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeployAccountTransactionV3 != nil { + size, err := m.DeployAccountTransactionV3.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + return len(dAtA) - i, nil +} +func (m *TransactionReceipt) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TransactionReceipt) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionReceipt) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x52 + } + if m.ExecutionResources != nil { + size, err := m.ExecutionResources.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x4a + } + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Events[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + } + if len(m.MessagesSent) > 0 { + for iNdEx := len(m.MessagesSent) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.MessagesSent[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + } + if len(m.MessageHash) > 0 { + i -= len(m.MessageHash) + copy(dAtA[i:], m.MessageHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MessageHash))) + i-- + dAtA[i] = 0x32 + } + if m.Type != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x28 + } + if len(m.RevertReason) > 0 { + i -= len(m.RevertReason) + copy(dAtA[i:], m.RevertReason) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RevertReason))) + i-- + dAtA[i] = 0x22 + } + if m.ExecutionStatus != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ExecutionStatus)) + i-- + dAtA[i] = 0x18 + } + if m.ActualFee != nil { + size, err := m.ActualFee.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.TransactionHash) > 0 { + i -= len(m.TransactionHash) + copy(dAtA[i:], m.TransactionHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TransactionHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MessagesSent) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MessagesSent) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *MessagesSent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Payload) > 0 { + for iNdEx := len(m.Payload) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Payload[iNdEx]) + copy(dAtA[i:], m.Payload[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.ToAddress) > 0 { + i -= len(m.ToAddress) + copy(dAtA[i:], m.ToAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ToAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.FromAddress) > 0 { + i -= len(m.FromAddress) + copy(dAtA[i:], m.FromAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FromAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Event) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Event) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Event) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Data) > 0 { + for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Data[iNdEx]) + copy(dAtA[i:], m.Data[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.FromAddress) > 0 { + i -= len(m.FromAddress) + copy(dAtA[i:], m.FromAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FromAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExecutionResources) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExecutionResources) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ExecutionResources) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.DataAvailability != nil { + size, err := m.DataAvailability.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + if m.SegmentArenaBuiltin != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SegmentArenaBuiltin)) + i-- + dAtA[i] = 0x50 + } + if m.KeccakBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.KeccakBuiltinApplications)) + i-- + dAtA[i] = 0x48 + } + if m.BitwiseBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.BitwiseBuiltinApplications)) + i-- + dAtA[i] = 0x40 + } + if m.EcdsaBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.EcdsaBuiltinApplications)) + i-- + dAtA[i] = 0x38 + } + if m.EcOpBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.EcOpBuiltinApplications)) + i-- + dAtA[i] = 0x30 + } + if m.PoseidonBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PoseidonBuiltinApplications)) + i-- + dAtA[i] = 0x28 + } + if m.PedersenBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PedersenBuiltinApplications)) + i-- + dAtA[i] = 0x20 + } + if m.RangeCheckBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RangeCheckBuiltinApplications)) + i-- + dAtA[i] = 0x18 + } + if m.MemoryHoles != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MemoryHoles)) + i-- + dAtA[i] = 0x10 + } + if m.Steps != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Steps)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *InvokeTransactionV0) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InvokeTransactionV0) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *InvokeTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.EntryPointSelector) > 0 { + i -= len(m.EntryPointSelector) + copy(dAtA[i:], m.EntryPointSelector) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EntryPointSelector))) + i-- + dAtA[i] = 0x32 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x2a + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *InvokeTransactionV1) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InvokeTransactionV1) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *InvokeTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x2a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x22 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *InvokeTransactionV3) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InvokeTransactionV3) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *InvokeTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.FeeDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) + i-- + dAtA[i] = 0x60 + } + if m.NonceDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) + i-- + dAtA[i] = 0x58 + } + if len(m.AccountDeploymentData) > 0 { + for iNdEx := len(m.AccountDeploymentData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AccountDeploymentData[iNdEx]) + copy(dAtA[i:], m.AccountDeploymentData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountDeploymentData[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + if len(m.PaymasterData) > 0 { + for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PaymasterData[iNdEx]) + copy(dAtA[i:], m.PaymasterData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0x42 + } + if m.ResourceBounds != nil { + size, err := m.ResourceBounds.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *L1HandlerTransaction) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *L1HandlerTransaction) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *L1HandlerTransaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.EntryPointSelector) > 0 { + i -= len(m.EntryPointSelector) + copy(dAtA[i:], m.EntryPointSelector) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EntryPointSelector))) + i-- + dAtA[i] = 0x2a + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x1a + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV0) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV0) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeclareTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x1a + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV1) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV1) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeclareTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x1a + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV2) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV2) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeclareTransactionV2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x1a + } + if len(m.CompiledClassHash) > 0 { + i -= len(m.CompiledClassHash) + copy(dAtA[i:], m.CompiledClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV3) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV3) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeclareTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.FeeDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) + i-- + dAtA[i] = 0x68 + } + if m.NonceDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) + i-- + dAtA[i] = 0x60 + } + if len(m.AccountDeploymentData) > 0 { + for iNdEx := len(m.AccountDeploymentData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AccountDeploymentData[iNdEx]) + copy(dAtA[i:], m.AccountDeploymentData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountDeploymentData[iNdEx]))) + i-- + dAtA[i] = 0x5a + } + } + if len(m.PaymasterData) > 0 { + for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PaymasterData[iNdEx]) + copy(dAtA[i:], m.PaymasterData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0x4a + } + if m.ResourceBounds != nil { + size, err := m.ResourceBounds.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.CompiledClassHash) > 0 { + i -= len(m.CompiledClassHash) + copy(dAtA[i:], m.CompiledClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) + i-- + dAtA[i] = 0x1a + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *DeployTransactionV0) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployTransactionV0) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeployTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ConstructorCalldata) > 0 { + for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ConstructorCalldata[iNdEx]) + copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.ContractAddressSalt) > 0 { + i -= len(m.ContractAddressSalt) + copy(dAtA[i:], m.ContractAddressSalt) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) + i-- + dAtA[i] = 0x1a + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeployAccountTransactionV1) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployAccountTransactionV1) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeployAccountTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ConstructorCalldata) > 0 { + for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ConstructorCalldata[iNdEx]) + copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.ContractAddressSalt) > 0 { + i -= len(m.ContractAddressSalt) + copy(dAtA[i:], m.ContractAddressSalt) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) + i-- + dAtA[i] = 0x32 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x2a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x22 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeployAccountTransactionV3) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployAccountTransactionV3) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeployAccountTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.FeeDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) + i-- + dAtA[i] = 0x60 + } + if m.NonceDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) + i-- + dAtA[i] = 0x58 + } + if len(m.PaymasterData) > 0 { + for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PaymasterData[iNdEx]) + copy(dAtA[i:], m.PaymasterData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0x42 + } + if m.ResourceBounds != nil { + size, err := m.ResourceBounds.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x32 + } + if len(m.ConstructorCalldata) > 0 { + for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ConstructorCalldata[iNdEx]) + copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.ContractAddressSalt) > 0 { + i -= len(m.ContractAddressSalt) + copy(dAtA[i:], m.ContractAddressSalt) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) + i-- + dAtA[i] = 0x22 + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x1a + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResourceBounds) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceBounds) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ResourceBounds) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.L2Gas != nil { + size, err := m.L2Gas.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.L1Gas != nil { + size, err := m.L1Gas.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Resource) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resource) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Resource) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.MaxPricePerUnit) > 0 { + i -= len(m.MaxPricePerUnit) + copy(dAtA[i:], m.MaxPricePerUnit) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxPricePerUnit))) + i-- + dAtA[i] = 0x12 + } + if len(m.MaxAmount) > 0 { + i -= len(m.MaxAmount) + copy(dAtA[i:], m.MaxAmount) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxAmount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Receipt) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Receipt) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Receipt) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.ActualFee != nil { + size, err := m.ActualFee.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ActualFee) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ActualFee) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ActualFee) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Unit) > 0 { + i -= len(m.Unit) + copy(dAtA[i:], m.Unit) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Unit))) + i-- + dAtA[i] = 0x12 + } + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DataAvailability) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DataAvailability) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataAvailability) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.L1DataGas != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1DataGas)) + i-- + dAtA[i] = 0x10 + } + if m.L1Gas != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1Gas)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *StateUpdate) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StateUpdate) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StateUpdate) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.StateDiff != nil { + size, err := m.StateDiff.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.NewRoot) > 0 { + i -= len(m.NewRoot) + copy(dAtA[i:], m.NewRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NewRoot))) + i-- + dAtA[i] = 0x12 + } + if len(m.OldRoot) > 0 { + i -= len(m.OldRoot) + copy(dAtA[i:], m.OldRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OldRoot))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StateDiff) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StateDiff) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StateDiff) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Nonces) > 0 { + for iNdEx := len(m.Nonces) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Nonces[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + } + if len(m.ReplacedClasses) > 0 { + for iNdEx := len(m.ReplacedClasses) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.ReplacedClasses[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + } + if len(m.DeployedContracts) > 0 { + for iNdEx := len(m.DeployedContracts) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.DeployedContracts[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if len(m.DeclaredClasses) > 0 { + for iNdEx := len(m.DeclaredClasses) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.DeclaredClasses[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.DeprecatedDeclaredClasses) > 0 { + for iNdEx := len(m.DeprecatedDeclaredClasses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DeprecatedDeclaredClasses[iNdEx]) + copy(dAtA[i:], m.DeprecatedDeclaredClasses[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeprecatedDeclaredClasses[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.StorageDiffs) > 0 { + for iNdEx := len(m.StorageDiffs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.StorageDiffs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *NonceDiff) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NonceDiff) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *NonceDiff) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x12 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ReplacedClass) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ReplacedClass) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ReplacedClass) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeployedContract) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployedContract) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeployedContract) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeclaredClass) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclaredClass) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeclaredClass) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.CompiledClassHash) > 0 { + i -= len(m.CompiledClassHash) + copy(dAtA[i:], m.CompiledClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ContractStorageDiff) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContractStorageDiff) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ContractStorageDiff) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.StorageEntries) > 0 { + for iNdEx := len(m.StorageEntries) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.StorageEntries[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StorageEntries) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageEntries) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StorageEntries) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Block) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Block) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Block) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.StateUpdate != nil { + size, err := m.StateUpdate.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + } + if len(m.Transactions) > 0 { + for iNdEx := len(m.Transactions) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Transactions[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + } + if len(m.StarknetVersion) > 0 { + i -= len(m.StarknetVersion) + copy(dAtA[i:], m.StarknetVersion) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StarknetVersion))) + i-- + dAtA[i] = 0x52 + } + if m.L1DaMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1DaMode)) + i-- + dAtA[i] = 0x48 + } + if m.L1DataGasPrice != nil { + size, err := m.L1DataGasPrice.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + if m.L1GasPrice != nil { + size, err := m.L1GasPrice.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + if len(m.SequencerAddress) > 0 { + i -= len(m.SequencerAddress) + copy(dAtA[i:], m.SequencerAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SequencerAddress))) + i-- + dAtA[i] = 0x32 + } + if m.Timestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x28 + } + if len(m.NewRoot) > 0 { + i -= len(m.NewRoot) + copy(dAtA[i:], m.NewRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NewRoot))) + i-- + dAtA[i] = 0x22 + } + if m.BlockNumber != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.BlockNumber)) + i-- + dAtA[i] = 0x18 + } + if len(m.ParentHash) > 0 { + i -= len(m.ParentHash) + copy(dAtA[i:], m.ParentHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResourcePrice) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourcePrice) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ResourcePrice) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.PriceInWei) > 0 { + i -= len(m.PriceInWei) + copy(dAtA[i:], m.PriceInWei) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PriceInWei))) + i-- + dAtA[i] = 0x12 + } + if len(m.PriceInFri) > 0 { + i -= len(m.PriceInFri) + copy(dAtA[i:], m.PriceInFri) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PriceInFri))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TransactionWithReceipt) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TransactionWithReceipt) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Receipt != nil { + size, err := m.Receipt.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV3); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV1); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_DeployTransactionV0); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV3); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV2); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV1); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV0); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_L1HandlerTransaction); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV3); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV1); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV0); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + return len(dAtA) - i, nil +} + +func (m *TransactionWithReceipt_InvokeTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_InvokeTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.InvokeTransactionV0 != nil { + size, err := m.InvokeTransactionV0.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_InvokeTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_InvokeTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.InvokeTransactionV1 != nil { + size, err := m.InvokeTransactionV1.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_InvokeTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_InvokeTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.InvokeTransactionV3 != nil { + size, err := m.InvokeTransactionV3.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_L1HandlerTransaction) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_L1HandlerTransaction) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.L1HandlerTransaction != nil { + size, err := m.L1HandlerTransaction.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV0 != nil { + size, err := m.DeclareTransactionV0.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV1 != nil { + size, err := m.DeclareTransactionV1.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV2) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV2 != nil { + size, err := m.DeclareTransactionV2.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV3 != nil { + size, err := m.DeclareTransactionV3.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeployTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeployTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeployTransactionV0 != nil { + size, err := m.DeployTransactionV0.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x4a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeployAccountTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeployAccountTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeployAccountTransactionV1 != nil { + size, err := m.DeployAccountTransactionV1.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x52 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeployAccountTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeployAccountTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeployAccountTransactionV3 != nil { + size, err := m.DeployAccountTransactionV3.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + return len(dAtA) - i, nil +} +func (m *TransactionReceipt) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TransactionReceipt) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionReceipt) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x52 + } + if m.ExecutionResources != nil { + size, err := m.ExecutionResources.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x4a + } + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Events[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + } + if len(m.MessagesSent) > 0 { + for iNdEx := len(m.MessagesSent) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.MessagesSent[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + } + if len(m.MessageHash) > 0 { + i -= len(m.MessageHash) + copy(dAtA[i:], m.MessageHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MessageHash))) + i-- + dAtA[i] = 0x32 + } + if m.Type != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x28 + } + if len(m.RevertReason) > 0 { + i -= len(m.RevertReason) + copy(dAtA[i:], m.RevertReason) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RevertReason))) + i-- + dAtA[i] = 0x22 + } + if m.ExecutionStatus != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ExecutionStatus)) + i-- + dAtA[i] = 0x18 + } + if m.ActualFee != nil { + size, err := m.ActualFee.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.TransactionHash) > 0 { + i -= len(m.TransactionHash) + copy(dAtA[i:], m.TransactionHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TransactionHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MessagesSent) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MessagesSent) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *MessagesSent) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Payload) > 0 { + for iNdEx := len(m.Payload) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Payload[iNdEx]) + copy(dAtA[i:], m.Payload[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.ToAddress) > 0 { + i -= len(m.ToAddress) + copy(dAtA[i:], m.ToAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ToAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.FromAddress) > 0 { + i -= len(m.FromAddress) + copy(dAtA[i:], m.FromAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FromAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Event) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Event) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Event) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Data) > 0 { + for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Data[iNdEx]) + copy(dAtA[i:], m.Data[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.FromAddress) > 0 { + i -= len(m.FromAddress) + copy(dAtA[i:], m.FromAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FromAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExecutionResources) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExecutionResources) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ExecutionResources) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.DataAvailability != nil { + size, err := m.DataAvailability.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + if m.SegmentArenaBuiltin != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SegmentArenaBuiltin)) + i-- + dAtA[i] = 0x50 + } + if m.KeccakBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.KeccakBuiltinApplications)) + i-- + dAtA[i] = 0x48 + } + if m.BitwiseBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.BitwiseBuiltinApplications)) + i-- + dAtA[i] = 0x40 + } + if m.EcdsaBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.EcdsaBuiltinApplications)) + i-- + dAtA[i] = 0x38 + } + if m.EcOpBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.EcOpBuiltinApplications)) + i-- + dAtA[i] = 0x30 + } + if m.PoseidonBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PoseidonBuiltinApplications)) + i-- + dAtA[i] = 0x28 + } + if m.PedersenBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PedersenBuiltinApplications)) + i-- + dAtA[i] = 0x20 + } + if m.RangeCheckBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RangeCheckBuiltinApplications)) + i-- + dAtA[i] = 0x18 + } + if m.MemoryHoles != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MemoryHoles)) + i-- + dAtA[i] = 0x10 + } + if m.Steps != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Steps)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *InvokeTransactionV0) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InvokeTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *InvokeTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.EntryPointSelector) > 0 { + i -= len(m.EntryPointSelector) + copy(dAtA[i:], m.EntryPointSelector) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EntryPointSelector))) + i-- + dAtA[i] = 0x32 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x2a + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *InvokeTransactionV1) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InvokeTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *InvokeTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x2a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x22 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *InvokeTransactionV3) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InvokeTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *InvokeTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.FeeDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) + i-- + dAtA[i] = 0x60 + } + if m.NonceDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) + i-- + dAtA[i] = 0x58 + } + if len(m.AccountDeploymentData) > 0 { + for iNdEx := len(m.AccountDeploymentData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AccountDeploymentData[iNdEx]) + copy(dAtA[i:], m.AccountDeploymentData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountDeploymentData[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + if len(m.PaymasterData) > 0 { + for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PaymasterData[iNdEx]) + copy(dAtA[i:], m.PaymasterData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0x42 + } + if m.ResourceBounds != nil { + size, err := m.ResourceBounds.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *L1HandlerTransaction) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *L1HandlerTransaction) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *L1HandlerTransaction) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.EntryPointSelector) > 0 { + i -= len(m.EntryPointSelector) + copy(dAtA[i:], m.EntryPointSelector) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EntryPointSelector))) + i-- + dAtA[i] = 0x2a + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x1a + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV0) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeclareTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x1a + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV1) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeclareTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x1a + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV2) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV2) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeclareTransactionV2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x1a + } + if len(m.CompiledClassHash) > 0 { + i -= len(m.CompiledClassHash) + copy(dAtA[i:], m.CompiledClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV3) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeclareTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.FeeDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) + i-- + dAtA[i] = 0x68 + } + if m.NonceDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) + i-- + dAtA[i] = 0x60 + } + if len(m.AccountDeploymentData) > 0 { + for iNdEx := len(m.AccountDeploymentData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AccountDeploymentData[iNdEx]) + copy(dAtA[i:], m.AccountDeploymentData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountDeploymentData[iNdEx]))) + i-- + dAtA[i] = 0x5a + } + } + if len(m.PaymasterData) > 0 { + for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PaymasterData[iNdEx]) + copy(dAtA[i:], m.PaymasterData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0x4a + } + if m.ResourceBounds != nil { + size, err := m.ResourceBounds.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.CompiledClassHash) > 0 { + i -= len(m.CompiledClassHash) + copy(dAtA[i:], m.CompiledClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) + i-- + dAtA[i] = 0x1a + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *DeployTransactionV0) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeployTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ConstructorCalldata) > 0 { + for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ConstructorCalldata[iNdEx]) + copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.ContractAddressSalt) > 0 { + i -= len(m.ContractAddressSalt) + copy(dAtA[i:], m.ContractAddressSalt) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) + i-- + dAtA[i] = 0x1a + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeployAccountTransactionV1) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployAccountTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeployAccountTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ConstructorCalldata) > 0 { + for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ConstructorCalldata[iNdEx]) + copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.ContractAddressSalt) > 0 { + i -= len(m.ContractAddressSalt) + copy(dAtA[i:], m.ContractAddressSalt) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) + i-- + dAtA[i] = 0x32 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x2a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x22 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeployAccountTransactionV3) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployAccountTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeployAccountTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.FeeDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) + i-- + dAtA[i] = 0x60 + } + if m.NonceDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) + i-- + dAtA[i] = 0x58 + } + if len(m.PaymasterData) > 0 { + for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PaymasterData[iNdEx]) + copy(dAtA[i:], m.PaymasterData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0x42 + } + if m.ResourceBounds != nil { + size, err := m.ResourceBounds.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x32 + } + if len(m.ConstructorCalldata) > 0 { + for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ConstructorCalldata[iNdEx]) + copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.ContractAddressSalt) > 0 { + i -= len(m.ContractAddressSalt) + copy(dAtA[i:], m.ContractAddressSalt) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) + i-- + dAtA[i] = 0x22 + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x1a + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResourceBounds) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceBounds) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ResourceBounds) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.L2Gas != nil { + size, err := m.L2Gas.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.L1Gas != nil { + size, err := m.L1Gas.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Resource) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resource) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Resource) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.MaxPricePerUnit) > 0 { + i -= len(m.MaxPricePerUnit) + copy(dAtA[i:], m.MaxPricePerUnit) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxPricePerUnit))) + i-- + dAtA[i] = 0x12 + } + if len(m.MaxAmount) > 0 { + i -= len(m.MaxAmount) + copy(dAtA[i:], m.MaxAmount) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxAmount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Receipt) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Receipt) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Receipt) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.ActualFee != nil { + size, err := m.ActualFee.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ActualFee) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ActualFee) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ActualFee) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Unit) > 0 { + i -= len(m.Unit) + copy(dAtA[i:], m.Unit) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Unit))) + i-- + dAtA[i] = 0x12 + } + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DataAvailability) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DataAvailability) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DataAvailability) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.L1DataGas != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1DataGas)) + i-- + dAtA[i] = 0x10 + } + if m.L1Gas != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1Gas)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *StateUpdate) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StateUpdate) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StateUpdate) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.StateDiff != nil { + size, err := m.StateDiff.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.NewRoot) > 0 { + i -= len(m.NewRoot) + copy(dAtA[i:], m.NewRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NewRoot))) + i-- + dAtA[i] = 0x12 + } + if len(m.OldRoot) > 0 { + i -= len(m.OldRoot) + copy(dAtA[i:], m.OldRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OldRoot))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StateDiff) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StateDiff) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StateDiff) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Nonces) > 0 { + for iNdEx := len(m.Nonces) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Nonces[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + } + if len(m.ReplacedClasses) > 0 { + for iNdEx := len(m.ReplacedClasses) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.ReplacedClasses[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + } + if len(m.DeployedContracts) > 0 { + for iNdEx := len(m.DeployedContracts) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.DeployedContracts[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if len(m.DeclaredClasses) > 0 { + for iNdEx := len(m.DeclaredClasses) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.DeclaredClasses[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.DeprecatedDeclaredClasses) > 0 { + for iNdEx := len(m.DeprecatedDeclaredClasses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DeprecatedDeclaredClasses[iNdEx]) + copy(dAtA[i:], m.DeprecatedDeclaredClasses[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeprecatedDeclaredClasses[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.StorageDiffs) > 0 { + for iNdEx := len(m.StorageDiffs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.StorageDiffs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *NonceDiff) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NonceDiff) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *NonceDiff) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x12 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ReplacedClass) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ReplacedClass) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ReplacedClass) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeployedContract) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployedContract) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeployedContract) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeclaredClass) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclaredClass) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeclaredClass) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.CompiledClassHash) > 0 { + i -= len(m.CompiledClassHash) + copy(dAtA[i:], m.CompiledClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ContractStorageDiff) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContractStorageDiff) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ContractStorageDiff) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.StorageEntries) > 0 { + for iNdEx := len(m.StorageEntries) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.StorageEntries[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StorageEntries) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageEntries) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StorageEntries) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Block) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ParentHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.BlockNumber != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.BlockNumber)) + } + l = len(m.NewRoot) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Timestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) + } + l = len(m.SequencerAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.L1GasPrice != nil { + l = m.L1GasPrice.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.L1DataGasPrice != nil { + l = m.L1DataGasPrice.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.L1DaMode != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.L1DaMode)) + } + l = len(m.StarknetVersion) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Transactions) > 0 { + for _, e := range m.Transactions { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.StateUpdate != nil { + l = m.StateUpdate.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ResourcePrice) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PriceInFri) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.PriceInWei) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *TransactionWithReceipt) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.Transaction.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + if m.Receipt != nil { + l = m.Receipt.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *TransactionWithReceipt_InvokeTransactionV0) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.InvokeTransactionV0 != nil { + l = m.InvokeTransactionV0.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_InvokeTransactionV1) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.InvokeTransactionV1 != nil { + l = m.InvokeTransactionV1.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_InvokeTransactionV3) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.InvokeTransactionV3 != nil { + l = m.InvokeTransactionV3.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_L1HandlerTransaction) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.L1HandlerTransaction != nil { + l = m.L1HandlerTransaction.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_DeclareTransactionV0) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DeclareTransactionV0 != nil { + l = m.DeclareTransactionV0.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_DeclareTransactionV1) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DeclareTransactionV1 != nil { + l = m.DeclareTransactionV1.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_DeclareTransactionV2) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DeclareTransactionV2 != nil { + l = m.DeclareTransactionV2.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_DeclareTransactionV3) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DeclareTransactionV3 != nil { + l = m.DeclareTransactionV3.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_DeployTransactionV0) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DeployTransactionV0 != nil { + l = m.DeployTransactionV0.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_DeployAccountTransactionV1) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DeployAccountTransactionV1 != nil { + l = m.DeployAccountTransactionV1.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_DeployAccountTransactionV3) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DeployAccountTransactionV3 != nil { + l = m.DeployAccountTransactionV3.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionReceipt) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TransactionHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ActualFee != nil { + l = m.ActualFee.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ExecutionStatus != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.ExecutionStatus)) + } + l = len(m.RevertReason) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Type != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Type)) + } + l = len(m.MessageHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.MessagesSent) > 0 { + for _, e := range m.MessagesSent { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.ExecutionResources != nil { + l = m.ExecutionResources.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *MessagesSent) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FromAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ToAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Payload) > 0 { + for _, b := range m.Payload { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *Event) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FromAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Keys) > 0 { + for _, b := range m.Keys { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.Data) > 0 { + for _, b := range m.Data { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *ExecutionResources) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Steps != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Steps)) + } + if m.MemoryHoles != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.MemoryHoles)) + } + if m.RangeCheckBuiltinApplications != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.RangeCheckBuiltinApplications)) + } + if m.PedersenBuiltinApplications != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.PedersenBuiltinApplications)) + } + if m.PoseidonBuiltinApplications != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.PoseidonBuiltinApplications)) + } + if m.EcOpBuiltinApplications != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.EcOpBuiltinApplications)) + } + if m.EcdsaBuiltinApplications != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.EcdsaBuiltinApplications)) + } + if m.BitwiseBuiltinApplications != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.BitwiseBuiltinApplications)) + } + if m.KeccakBuiltinApplications != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.KeccakBuiltinApplications)) + } + if m.SegmentArenaBuiltin != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.SegmentArenaBuiltin)) + } + if m.DataAvailability != nil { + l = m.DataAvailability.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *InvokeTransactionV0) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MaxFee) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.EntryPointSelector) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Calldata) > 0 { + for _, b := range m.Calldata { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *InvokeTransactionV1) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MaxFee) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Calldata) > 0 { + for _, b := range m.Calldata { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *InvokeTransactionV3) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Calldata) > 0 { + for _, b := range m.Calldata { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ResourceBounds != nil { + l = m.ResourceBounds.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Tip) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.PaymasterData) > 0 { + for _, b := range m.PaymasterData { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.AccountDeploymentData) > 0 { + for _, b := range m.AccountDeploymentData { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.NonceDataAvailabilityMode != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.NonceDataAvailabilityMode)) + } + if m.FeeDataAvailabilityMode != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.FeeDataAvailabilityMode)) + } + n += len(m.unknownFields) + return n +} + +func (m *L1HandlerTransaction) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.EntryPointSelector) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Calldata) > 0 { + for _, b := range m.Calldata { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *DeclareTransactionV0) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.MaxFee) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeclareTransactionV1) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.MaxFee) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeclareTransactionV2) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.CompiledClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.MaxFee) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeclareTransactionV3) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.CompiledClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ResourceBounds != nil { + l = m.ResourceBounds.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Tip) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.PaymasterData) > 0 { + for _, b := range m.PaymasterData { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.AccountDeploymentData) > 0 { + for _, b := range m.AccountDeploymentData { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.NonceDataAvailabilityMode != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.NonceDataAvailabilityMode)) + } + if m.FeeDataAvailabilityMode != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.FeeDataAvailabilityMode)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeployTransactionV0) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ContractAddressSalt) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.ConstructorCalldata) > 0 { + for _, b := range m.ConstructorCalldata { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *DeployAccountTransactionV1) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MaxFee) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ContractAddressSalt) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.ConstructorCalldata) > 0 { + for _, b := range m.ConstructorCalldata { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *DeployAccountTransactionV3) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ContractAddressSalt) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.ConstructorCalldata) > 0 { + for _, b := range m.ConstructorCalldata { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ResourceBounds != nil { + l = m.ResourceBounds.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Tip) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.PaymasterData) > 0 { + for _, b := range m.PaymasterData { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.NonceDataAvailabilityMode != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.NonceDataAvailabilityMode)) + } + if m.FeeDataAvailabilityMode != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.FeeDataAvailabilityMode)) + } + n += len(m.unknownFields) + return n +} + +func (m *ResourceBounds) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.L1Gas != nil { + l = m.L1Gas.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.L2Gas != nil { + l = m.L2Gas.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Resource) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MaxAmount) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.MaxPricePerUnit) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Receipt) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ActualFee != nil { + l = m.ActualFee.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ActualFee) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Amount) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Unit) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DataAvailability) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.L1Gas != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.L1Gas)) + } + if m.L1DataGas != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.L1DataGas)) + } + n += len(m.unknownFields) + return n +} + +func (m *StateUpdate) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OldRoot) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.NewRoot) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.StateDiff != nil { + l = m.StateDiff.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *StateDiff) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StorageDiffs) > 0 { + for _, e := range m.StorageDiffs { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.DeprecatedDeclaredClasses) > 0 { + for _, b := range m.DeprecatedDeclaredClasses { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.DeclaredClasses) > 0 { + for _, e := range m.DeclaredClasses { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.DeployedContracts) > 0 { + for _, e := range m.DeployedContracts { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.ReplacedClasses) > 0 { + for _, e := range m.ReplacedClasses { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.Nonces) > 0 { + for _, e := range m.Nonces { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *NonceDiff) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ReplacedClass) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeployedContract) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeclaredClass) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.CompiledClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ContractStorageDiff) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.StorageEntries) > 0 { + for _, e := range m.StorageEntries { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *StorageEntries) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Block) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Block: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = append(m.BlockHash[:0], dAtA[iNdEx:postIndex]...) + if m.BlockHash == nil { + m.BlockHash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParentHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ParentHash = append(m.ParentHash[:0], dAtA[iNdEx:postIndex]...) + if m.ParentHash == nil { + m.ParentHash = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) + } + m.BlockNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewRoot", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewRoot = append(m.NewRoot[:0], dAtA[iNdEx:postIndex]...) + if m.NewRoot == nil { + m.NewRoot = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SequencerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SequencerAddress = append(m.SequencerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.SequencerAddress == nil { + m.SequencerAddress = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1GasPrice", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L1GasPrice == nil { + m.L1GasPrice = &ResourcePrice{} + } + if err := m.L1GasPrice.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DataGasPrice", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L1DataGasPrice == nil { + m.L1DataGasPrice = &ResourcePrice{} + } + if err := m.L1DataGasPrice.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DaMode", wireType) + } + m.L1DaMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.L1DaMode |= L1_DA_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StarknetVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StarknetVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Transactions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Transactions = append(m.Transactions, &TransactionWithReceipt{}) + if err := m.Transactions[len(m.Transactions)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StateUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StateUpdate == nil { + m.StateUpdate = &StateUpdate{} + } + if err := m.StateUpdate.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourcePrice) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourcePrice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourcePrice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceInFri", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PriceInFri = append(m.PriceInFri[:0], dAtA[iNdEx:postIndex]...) + if m.PriceInFri == nil { + m.PriceInFri = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceInWei", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PriceInWei = append(m.PriceInWei[:0], dAtA[iNdEx:postIndex]...) + if m.PriceInWei == nil { + m.PriceInWei = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TransactionWithReceipt) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TransactionWithReceipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransactionWithReceipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV0", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV0); ok { + if err := oneof.InvokeTransactionV0.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &InvokeTransactionV0{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_InvokeTransactionV0{InvokeTransactionV0: v} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV1); ok { + if err := oneof.InvokeTransactionV1.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &InvokeTransactionV1{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_InvokeTransactionV1{InvokeTransactionV1: v} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV3); ok { + if err := oneof.InvokeTransactionV3.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &InvokeTransactionV3{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_InvokeTransactionV3{InvokeTransactionV3: v} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1HandlerTransaction", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_L1HandlerTransaction); ok { + if err := oneof.L1HandlerTransaction.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &L1HandlerTransaction{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_L1HandlerTransaction{L1HandlerTransaction: v} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV0", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV0); ok { + if err := oneof.DeclareTransactionV0.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV0{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV0{DeclareTransactionV0: v} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV1); ok { + if err := oneof.DeclareTransactionV1.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV1{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV1{DeclareTransactionV1: v} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV2); ok { + if err := oneof.DeclareTransactionV2.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV2{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV2{DeclareTransactionV2: v} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV3); ok { + if err := oneof.DeclareTransactionV3.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV3{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV3{DeclareTransactionV3: v} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployTransactionV0", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployTransactionV0); ok { + if err := oneof.DeployTransactionV0.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeployTransactionV0{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeployTransactionV0{DeployTransactionV0: v} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployAccountTransactionV1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV1); ok { + if err := oneof.DeployAccountTransactionV1.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeployAccountTransactionV1{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeployAccountTransactionV1{DeployAccountTransactionV1: v} + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployAccountTransactionV3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV3); ok { + if err := oneof.DeployAccountTransactionV3.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeployAccountTransactionV3{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeployAccountTransactionV3{DeployAccountTransactionV3: v} + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Receipt == nil { + m.Receipt = &TransactionReceipt{} + } + if err := m.Receipt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TransactionReceipt) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TransactionReceipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransactionReceipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TransactionHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TransactionHash = append(m.TransactionHash[:0], dAtA[iNdEx:postIndex]...) + if m.TransactionHash == nil { + m.TransactionHash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActualFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ActualFee == nil { + m.ActualFee = &ActualFee{} + } + if err := m.ActualFee.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionStatus", wireType) + } + m.ExecutionStatus = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExecutionStatus |= EXECUTION_STATUS(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RevertReason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RevertReason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= TRANSACTION_TYPE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MessageHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MessageHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MessagesSent", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MessagesSent = append(m.MessagesSent, &MessagesSent{}) + if err := m.MessagesSent[len(m.MessagesSent)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Events = append(m.Events, &Event{}) + if err := m.Events[len(m.Events)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionResources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExecutionResources == nil { + m.ExecutionResources = &ExecutionResources{} + } + if err := m.ExecutionResources.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = append(m.ContractAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddress == nil { + m.ContractAddress = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MessagesSent) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MessagesSent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MessagesSent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) + if m.FromAddress == nil { + m.FromAddress = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ToAddress == nil { + m.ToAddress = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload, make([]byte, postIndex-iNdEx)) + copy(m.Payload[len(m.Payload)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Event) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) + if m.FromAddress == nil { + m.FromAddress = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keys = append(m.Keys, make([]byte, postIndex-iNdEx)) + copy(m.Keys[len(m.Keys)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data, make([]byte, postIndex-iNdEx)) + copy(m.Data[len(m.Data)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecutionResources) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecutionResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecutionResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Steps", wireType) + } + m.Steps = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Steps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryHoles", wireType) + } + m.MemoryHoles = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryHoles |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RangeCheckBuiltinApplications", wireType) + } + m.RangeCheckBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RangeCheckBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PedersenBuiltinApplications", wireType) + } + m.PedersenBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PedersenBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoseidonBuiltinApplications", wireType) + } + m.PoseidonBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoseidonBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EcOpBuiltinApplications", wireType) + } + m.EcOpBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EcOpBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EcdsaBuiltinApplications", wireType) + } + m.EcdsaBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EcdsaBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BitwiseBuiltinApplications", wireType) + } + m.BitwiseBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BitwiseBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field KeccakBuiltinApplications", wireType) + } + m.KeccakBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.KeccakBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SegmentArenaBuiltin", wireType) + } + m.SegmentArenaBuiltin = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SegmentArenaBuiltin |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DataAvailability", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DataAvailability == nil { + m.DataAvailability = &DataAvailability{} + } + if err := m.DataAvailability.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InvokeTransactionV0) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InvokeTransactionV0: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InvokeTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) + if m.MaxFee == nil { + m.MaxFee = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = append(m.ContractAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddress == nil { + m.ContractAddress = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EntryPointSelector", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EntryPointSelector = append(m.EntryPointSelector[:0], dAtA[iNdEx:postIndex]...) + if m.EntryPointSelector == nil { + m.EntryPointSelector = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, make([]byte, postIndex-iNdEx)) + copy(m.Calldata[len(m.Calldata)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InvokeTransactionV1) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InvokeTransactionV1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InvokeTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) + if m.MaxFee == nil { + m.MaxFee = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) + if m.SenderAddress == nil { + m.SenderAddress = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, make([]byte, postIndex-iNdEx)) + copy(m.Calldata[len(m.Calldata)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InvokeTransactionV3) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InvokeTransactionV3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InvokeTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) + if m.SenderAddress == nil { + m.SenderAddress = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, make([]byte, postIndex-iNdEx)) + copy(m.Calldata[len(m.Calldata)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceBounds == nil { + m.ResourceBounds = &ResourceBounds{} + } + if err := m.ResourceBounds.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = append(m.Tip[:0], dAtA[iNdEx:postIndex]...) + if m.Tip == nil { + m.Tip = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymasterData = append(m.PaymasterData, make([]byte, postIndex-iNdEx)) + copy(m.PaymasterData[len(m.PaymasterData)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountDeploymentData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountDeploymentData = append(m.AccountDeploymentData, make([]byte, postIndex-iNdEx)) + copy(m.AccountDeploymentData[len(m.AccountDeploymentData)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) + } + m.NonceDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) + } + m.FeeDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *L1HandlerTransaction) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: L1HandlerTransaction: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: L1HandlerTransaction: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = append(m.ContractAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddress == nil { + m.ContractAddress = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EntryPointSelector", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EntryPointSelector = append(m.EntryPointSelector[:0], dAtA[iNdEx:postIndex]...) + if m.EntryPointSelector == nil { + m.EntryPointSelector = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, make([]byte, postIndex-iNdEx)) + copy(m.Calldata[len(m.Calldata)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV0) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV0: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) + if m.SenderAddress == nil { + m.SenderAddress = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) + if m.MaxFee == nil { + m.MaxFee = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV1) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) + if m.SenderAddress == nil { + m.SenderAddress = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) + if m.MaxFee == nil { + m.MaxFee = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV2) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV2: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV2: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) + if m.SenderAddress == nil { + m.SenderAddress = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompiledClassHash = append(m.CompiledClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.CompiledClassHash == nil { + m.CompiledClassHash = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) + if m.MaxFee == nil { + m.MaxFee = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV3) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) + if m.SenderAddress == nil { + m.SenderAddress = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompiledClassHash = append(m.CompiledClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.CompiledClassHash == nil { + m.CompiledClassHash = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceBounds == nil { + m.ResourceBounds = &ResourceBounds{} + } + if err := m.ResourceBounds.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = append(m.Tip[:0], dAtA[iNdEx:postIndex]...) + if m.Tip == nil { + m.Tip = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymasterData = append(m.PaymasterData, make([]byte, postIndex-iNdEx)) + copy(m.PaymasterData[len(m.PaymasterData)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountDeploymentData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountDeploymentData = append(m.AccountDeploymentData, make([]byte, postIndex-iNdEx)) + copy(m.AccountDeploymentData[len(m.AccountDeploymentData)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) + } + m.NonceDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) + } + m.FeeDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployTransactionV0) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployTransactionV0: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddressSalt = append(m.ContractAddressSalt[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddressSalt == nil { + m.ContractAddressSalt = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConstructorCalldata = append(m.ConstructorCalldata, make([]byte, postIndex-iNdEx)) + copy(m.ConstructorCalldata[len(m.ConstructorCalldata)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployAccountTransactionV1) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployAccountTransactionV1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployAccountTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) + if m.MaxFee == nil { + m.MaxFee = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddressSalt = append(m.ContractAddressSalt[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddressSalt == nil { + m.ContractAddressSalt = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConstructorCalldata = append(m.ConstructorCalldata, make([]byte, postIndex-iNdEx)) + copy(m.ConstructorCalldata[len(m.ConstructorCalldata)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployAccountTransactionV3) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployAccountTransactionV3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployAccountTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddressSalt = append(m.ContractAddressSalt[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddressSalt == nil { + m.ContractAddressSalt = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConstructorCalldata = append(m.ConstructorCalldata, make([]byte, postIndex-iNdEx)) + copy(m.ConstructorCalldata[len(m.ConstructorCalldata)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceBounds == nil { + m.ResourceBounds = &ResourceBounds{} + } + if err := m.ResourceBounds.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = append(m.Tip[:0], dAtA[iNdEx:postIndex]...) + if m.Tip == nil { + m.Tip = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymasterData = append(m.PaymasterData, make([]byte, postIndex-iNdEx)) + copy(m.PaymasterData[len(m.PaymasterData)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) + } + m.NonceDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) + } + m.FeeDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceBounds) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceBounds: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceBounds: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1Gas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L1Gas == nil { + m.L1Gas = &Resource{} + } + if err := m.L1Gas.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L2Gas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L2Gas == nil { + m.L2Gas = &Resource{} + } + if err := m.L2Gas.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Resource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxAmount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxPricePerUnit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxPricePerUnit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Receipt) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Receipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Receipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActualFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ActualFee == nil { + m.ActualFee = &ActualFee{} + } + if err := m.ActualFee.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ActualFee) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ActualFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ActualFee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount[:0], dAtA[iNdEx:postIndex]...) + if m.Amount == nil { + m.Amount = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Unit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DataAvailability) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DataAvailability: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DataAvailability: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1Gas", wireType) + } + m.L1Gas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.L1Gas |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DataGas", wireType) + } + m.L1DataGas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.L1DataGas |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StateUpdate) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StateUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StateUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OldRoot", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OldRoot = append(m.OldRoot[:0], dAtA[iNdEx:postIndex]...) + if m.OldRoot == nil { + m.OldRoot = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewRoot", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewRoot = append(m.NewRoot[:0], dAtA[iNdEx:postIndex]...) + if m.NewRoot == nil { + m.NewRoot = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StateDiff", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StateDiff == nil { + m.StateDiff = &StateDiff{} + } + if err := m.StateDiff.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StateDiff) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StateDiff: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StateDiff: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageDiffs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageDiffs = append(m.StorageDiffs, &ContractStorageDiff{}) + if err := m.StorageDiffs[len(m.StorageDiffs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedDeclaredClasses", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeprecatedDeclaredClasses = append(m.DeprecatedDeclaredClasses, make([]byte, postIndex-iNdEx)) + copy(m.DeprecatedDeclaredClasses[len(m.DeprecatedDeclaredClasses)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclaredClasses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeclaredClasses = append(m.DeclaredClasses, &DeclaredClass{}) + if err := m.DeclaredClasses[len(m.DeclaredClasses)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployedContracts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeployedContracts = append(m.DeployedContracts, &DeployedContract{}) + if err := m.DeployedContracts[len(m.DeployedContracts)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReplacedClasses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReplacedClasses = append(m.ReplacedClasses, &ReplacedClass{}) + if err := m.ReplacedClasses[len(m.ReplacedClasses)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonces", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonces = append(m.Nonces, &NonceDiff{}) + if err := m.Nonces[len(m.Nonces)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NonceDiff) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NonceDiff: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NonceDiff: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = append(m.ContractAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddress == nil { + m.ContractAddress = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ReplacedClass) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReplacedClass: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReplacedClass: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = append(m.ContractAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddress == nil { + m.ContractAddress = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployedContract) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployedContract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployedContract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclaredClass) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclaredClass: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclaredClass: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompiledClassHash = append(m.CompiledClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.CompiledClassHash == nil { + m.CompiledClassHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContractStorageDiff) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContractStorageDiff: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContractStorageDiff: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageEntries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageEntries = append(m.StorageEntries, &StorageEntries{}) + if err := m.StorageEntries[len(m.StorageEntries)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageEntries) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageEntries: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageEntries: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Block) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Block: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParentHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ParentHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) + } + m.BlockNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewRoot", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewRoot = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SequencerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SequencerAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1GasPrice", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L1GasPrice == nil { + m.L1GasPrice = &ResourcePrice{} + } + if err := m.L1GasPrice.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DataGasPrice", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L1DataGasPrice == nil { + m.L1DataGasPrice = &ResourcePrice{} + } + if err := m.L1DataGasPrice.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DaMode", wireType) + } + m.L1DaMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.L1DaMode |= L1_DA_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StarknetVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.StarknetVersion = stringValue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Transactions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Transactions = append(m.Transactions, &TransactionWithReceipt{}) + if err := m.Transactions[len(m.Transactions)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StateUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StateUpdate == nil { + m.StateUpdate = &StateUpdate{} + } + if err := m.StateUpdate.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourcePrice) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourcePrice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourcePrice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceInFri", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PriceInFri = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceInWei", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PriceInWei = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TransactionWithReceipt) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TransactionWithReceipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransactionWithReceipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV0", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV0); ok { + if err := oneof.InvokeTransactionV0.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &InvokeTransactionV0{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_InvokeTransactionV0{InvokeTransactionV0: v} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV1); ok { + if err := oneof.InvokeTransactionV1.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &InvokeTransactionV1{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_InvokeTransactionV1{InvokeTransactionV1: v} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV3); ok { + if err := oneof.InvokeTransactionV3.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &InvokeTransactionV3{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_InvokeTransactionV3{InvokeTransactionV3: v} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1HandlerTransaction", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_L1HandlerTransaction); ok { + if err := oneof.L1HandlerTransaction.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &L1HandlerTransaction{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_L1HandlerTransaction{L1HandlerTransaction: v} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV0", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV0); ok { + if err := oneof.DeclareTransactionV0.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV0{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV0{DeclareTransactionV0: v} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV1); ok { + if err := oneof.DeclareTransactionV1.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV1{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV1{DeclareTransactionV1: v} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV2); ok { + if err := oneof.DeclareTransactionV2.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV2{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV2{DeclareTransactionV2: v} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV3); ok { + if err := oneof.DeclareTransactionV3.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV3{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV3{DeclareTransactionV3: v} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployTransactionV0", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployTransactionV0); ok { + if err := oneof.DeployTransactionV0.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeployTransactionV0{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeployTransactionV0{DeployTransactionV0: v} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployAccountTransactionV1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV1); ok { + if err := oneof.DeployAccountTransactionV1.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeployAccountTransactionV1{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeployAccountTransactionV1{DeployAccountTransactionV1: v} + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployAccountTransactionV3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV3); ok { + if err := oneof.DeployAccountTransactionV3.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeployAccountTransactionV3{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeployAccountTransactionV3{DeployAccountTransactionV3: v} + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Receipt == nil { + m.Receipt = &TransactionReceipt{} + } + if err := m.Receipt.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TransactionReceipt) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TransactionReceipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransactionReceipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TransactionHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TransactionHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActualFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ActualFee == nil { + m.ActualFee = &ActualFee{} + } + if err := m.ActualFee.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionStatus", wireType) + } + m.ExecutionStatus = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExecutionStatus |= EXECUTION_STATUS(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RevertReason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.RevertReason = stringValue + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= TRANSACTION_TYPE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MessageHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.MessageHash = stringValue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MessagesSent", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MessagesSent = append(m.MessagesSent, &MessagesSent{}) + if err := m.MessagesSent[len(m.MessagesSent)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Events = append(m.Events, &Event{}) + if err := m.Events[len(m.Events)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionResources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExecutionResources == nil { + m.ExecutionResources = &ExecutionResources{} + } + if err := m.ExecutionResources.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MessagesSent) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MessagesSent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MessagesSent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FromAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ToAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Event) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FromAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keys = append(m.Keys, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecutionResources) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecutionResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecutionResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Steps", wireType) + } + m.Steps = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Steps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryHoles", wireType) + } + m.MemoryHoles = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryHoles |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RangeCheckBuiltinApplications", wireType) + } + m.RangeCheckBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RangeCheckBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PedersenBuiltinApplications", wireType) + } + m.PedersenBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PedersenBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoseidonBuiltinApplications", wireType) + } + m.PoseidonBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoseidonBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EcOpBuiltinApplications", wireType) + } + m.EcOpBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EcOpBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EcdsaBuiltinApplications", wireType) + } + m.EcdsaBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EcdsaBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BitwiseBuiltinApplications", wireType) + } + m.BitwiseBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BitwiseBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field KeccakBuiltinApplications", wireType) + } + m.KeccakBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.KeccakBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SegmentArenaBuiltin", wireType) + } + m.SegmentArenaBuiltin = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SegmentArenaBuiltin |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DataAvailability", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DataAvailability == nil { + m.DataAvailability = &DataAvailability{} + } + if err := m.DataAvailability.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InvokeTransactionV0) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InvokeTransactionV0: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InvokeTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EntryPointSelector", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EntryPointSelector = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InvokeTransactionV1) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InvokeTransactionV1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InvokeTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InvokeTransactionV3) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InvokeTransactionV3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InvokeTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceBounds == nil { + m.ResourceBounds = &ResourceBounds{} + } + if err := m.ResourceBounds.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymasterData = append(m.PaymasterData, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountDeploymentData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountDeploymentData = append(m.AccountDeploymentData, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) + } + m.NonceDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) + } + m.FeeDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *L1HandlerTransaction) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: L1HandlerTransaction: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: L1HandlerTransaction: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Nonce = stringValue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EntryPointSelector", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EntryPointSelector = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV0) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV0: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV1) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV2) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV2: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV2: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompiledClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV3) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompiledClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceBounds == nil { + m.ResourceBounds = &ResourceBounds{} + } + if err := m.ResourceBounds.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymasterData = append(m.PaymasterData, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountDeploymentData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountDeploymentData = append(m.AccountDeploymentData, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) + } + m.NonceDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) + } + m.FeeDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployTransactionV0) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployTransactionV0: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddressSalt = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConstructorCalldata = append(m.ConstructorCalldata, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployAccountTransactionV1) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployAccountTransactionV1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployAccountTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddressSalt = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConstructorCalldata = append(m.ConstructorCalldata, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployAccountTransactionV3) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployAccountTransactionV3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployAccountTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddressSalt = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConstructorCalldata = append(m.ConstructorCalldata, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceBounds == nil { + m.ResourceBounds = &ResourceBounds{} + } + if err := m.ResourceBounds.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymasterData = append(m.PaymasterData, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) + } + m.NonceDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) + } + m.FeeDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceBounds) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceBounds: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceBounds: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1Gas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L1Gas == nil { + m.L1Gas = &Resource{} + } + if err := m.L1Gas.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L2Gas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L2Gas == nil { + m.L2Gas = &Resource{} + } + if err := m.L2Gas.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Resource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.MaxAmount = stringValue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxPricePerUnit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.MaxPricePerUnit = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Receipt) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Receipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Receipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActualFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ActualFee == nil { + m.ActualFee = &ActualFee{} + } + if err := m.ActualFee.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ActualFee) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ActualFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ActualFee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Unit = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DataAvailability) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DataAvailability: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DataAvailability: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1Gas", wireType) + } + m.L1Gas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.L1Gas |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DataGas", wireType) + } + m.L1DataGas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.L1DataGas |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StateUpdate) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StateUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StateUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OldRoot", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OldRoot = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewRoot", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewRoot = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StateDiff", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StateDiff == nil { + m.StateDiff = &StateDiff{} + } + if err := m.StateDiff.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StateDiff) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StateDiff: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StateDiff: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageDiffs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageDiffs = append(m.StorageDiffs, &ContractStorageDiff{}) + if err := m.StorageDiffs[len(m.StorageDiffs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedDeclaredClasses", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeprecatedDeclaredClasses = append(m.DeprecatedDeclaredClasses, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclaredClasses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeclaredClasses = append(m.DeclaredClasses, &DeclaredClass{}) + if err := m.DeclaredClasses[len(m.DeclaredClasses)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployedContracts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeployedContracts = append(m.DeployedContracts, &DeployedContract{}) + if err := m.DeployedContracts[len(m.DeployedContracts)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReplacedClasses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReplacedClasses = append(m.ReplacedClasses, &ReplacedClass{}) + if err := m.ReplacedClasses[len(m.ReplacedClasses)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonces", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonces = append(m.Nonces, &NonceDiff{}) + if err := m.Nonces[len(m.Nonces)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NonceDiff) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NonceDiff: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NonceDiff: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ReplacedClass) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReplacedClass: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReplacedClass: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployedContract) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployedContract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployedContract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclaredClass) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclaredClass: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclaredClass: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompiledClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContractStorageDiff) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContractStorageDiff: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContractStorageDiff: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageEntries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageEntries = append(m.StorageEntries, &StorageEntries{}) + if err := m.StorageEntries[len(m.StorageEntries)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageEntries) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageEntries: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageEntries: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/starket-common/pb/sf/substreams/index/v1/keys.pb.go b/starket-common/pb/sf/substreams/index/v1/keys.pb.go new file mode 100644 index 0000000..39248e4 --- /dev/null +++ b/starket-common/pb/sf/substreams/index/v1/keys.pb.go @@ -0,0 +1,159 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: sf/substreams/index/v1/keys.proto + +package indexv1 + +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) +) + +type Keys struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` +} + +func (x *Keys) Reset() { + *x = Keys{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_substreams_index_v1_keys_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Keys) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Keys) ProtoMessage() {} + +func (x *Keys) ProtoReflect() protoreflect.Message { + mi := &file_sf_substreams_index_v1_keys_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 Keys.ProtoReflect.Descriptor instead. +func (*Keys) Descriptor() ([]byte, []int) { + return file_sf_substreams_index_v1_keys_proto_rawDescGZIP(), []int{0} +} + +func (x *Keys) GetKeys() []string { + if x != nil { + return x.Keys + } + return nil +} + +var File_sf_substreams_index_v1_keys_proto protoreflect.FileDescriptor + +var file_sf_substreams_index_v1_keys_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x73, 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x76, 0x31, 0x22, 0x1a, 0x0a, 0x04, 0x4b, + 0x65, 0x79, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x42, 0x8d, 0x02, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, + 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x4b, 0x65, 0x79, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x69, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, 0x2f, 0x73, 0x75, + 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2d, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x2f, + 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x53, 0x53, 0x49, 0xaa, 0x02, 0x16, 0x53, 0x66, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x16, + 0x53, 0x66, 0x5c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x22, 0x53, 0x66, 0x5c, 0x53, 0x75, 0x62, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x53, 0x66, + 0x3a, 0x3a, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x3a, 0x3a, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sf_substreams_index_v1_keys_proto_rawDescOnce sync.Once + file_sf_substreams_index_v1_keys_proto_rawDescData = file_sf_substreams_index_v1_keys_proto_rawDesc +) + +func file_sf_substreams_index_v1_keys_proto_rawDescGZIP() []byte { + file_sf_substreams_index_v1_keys_proto_rawDescOnce.Do(func() { + file_sf_substreams_index_v1_keys_proto_rawDescData = protoimpl.X.CompressGZIP(file_sf_substreams_index_v1_keys_proto_rawDescData) + }) + return file_sf_substreams_index_v1_keys_proto_rawDescData +} + +var file_sf_substreams_index_v1_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_sf_substreams_index_v1_keys_proto_goTypes = []interface{}{ + (*Keys)(nil), // 0: sf.substreams.index.v1.Keys +} +var file_sf_substreams_index_v1_keys_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_sf_substreams_index_v1_keys_proto_init() } +func file_sf_substreams_index_v1_keys_proto_init() { + if File_sf_substreams_index_v1_keys_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sf_substreams_index_v1_keys_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Keys); 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_sf_substreams_index_v1_keys_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sf_substreams_index_v1_keys_proto_goTypes, + DependencyIndexes: file_sf_substreams_index_v1_keys_proto_depIdxs, + MessageInfos: file_sf_substreams_index_v1_keys_proto_msgTypes, + }.Build() + File_sf_substreams_index_v1_keys_proto = out.File + file_sf_substreams_index_v1_keys_proto_rawDesc = nil + file_sf_substreams_index_v1_keys_proto_goTypes = nil + file_sf_substreams_index_v1_keys_proto_depIdxs = nil +} diff --git a/starket-common/pb/sf/substreams/index/v1/keys_vtproto.pb.go b/starket-common/pb/sf/substreams/index/v1/keys_vtproto.pb.go new file mode 100644 index 0000000..c765d9a --- /dev/null +++ b/starket-common/pb/sf/substreams/index/v1/keys_vtproto.pb.go @@ -0,0 +1,338 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.6.0 +// source: sf/substreams/index/v1/keys.proto + +package indexv1 + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + proto "google.golang.org/protobuf/proto" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + unsafe "unsafe" +) + +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) +) + +func (m *Keys) CloneVT() *Keys { + if m == nil { + return (*Keys)(nil) + } + r := new(Keys) + if rhs := m.Keys; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.Keys = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Keys) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (this *Keys) EqualVT(that *Keys) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.Keys) != len(that.Keys) { + return false + } + for i, vx := range this.Keys { + vy := that.Keys[i] + if vx != vy { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Keys) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Keys) + if !ok { + return false + } + return this.EqualVT(that) +} +func (m *Keys) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Keys) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Keys) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Keys) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Keys) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Keys) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Keys) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Keys) > 0 { + for _, s := range m.Keys { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *Keys) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Keys: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Keys: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keys = append(m.Keys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Keys) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Keys: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Keys: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Keys = append(m.Keys, stringValue) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/starket-common/pb/sf/substreams/starknet/type/v1/starknet.pb.go b/starket-common/pb/sf/substreams/starknet/type/v1/starknet.pb.go new file mode 100644 index 0000000..b1ce8be --- /dev/null +++ b/starket-common/pb/sf/substreams/starknet/type/v1/starknet.pb.go @@ -0,0 +1,194 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: sf/substreams/starknet/type/v1/starknet.proto + +package typev1 + +import ( + v11 "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/starknet/type/v1" + _ "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/index/v1" + v1 "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/v1" + 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) +) + +type Transactions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Clock *v1.Clock `protobuf:"bytes,1,opt,name=clock,proto3" json:"clock,omitempty"` + TransactionsWithReceipt []*v11.TransactionWithReceipt `protobuf:"bytes,2,rep,name=transactions_with_receipt,json=transactionsWithReceipt,proto3" json:"transactions_with_receipt,omitempty"` +} + +func (x *Transactions) Reset() { + *x = Transactions{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_substreams_starknet_type_v1_starknet_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Transactions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transactions) ProtoMessage() {} + +func (x *Transactions) ProtoReflect() protoreflect.Message { + mi := &file_sf_substreams_starknet_type_v1_starknet_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 Transactions.ProtoReflect.Descriptor instead. +func (*Transactions) Descriptor() ([]byte, []int) { + return file_sf_substreams_starknet_type_v1_starknet_proto_rawDescGZIP(), []int{0} +} + +func (x *Transactions) GetClock() *v1.Clock { + if x != nil { + return x.Clock + } + return nil +} + +func (x *Transactions) GetTransactionsWithReceipt() []*v11.TransactionWithReceipt { + if x != nil { + return x.TransactionsWithReceipt + } + return nil +} + +var File_sf_substreams_starknet_type_v1_starknet_proto protoreflect.FileDescriptor + +var file_sf_substreams_starknet_type_v1_starknet_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x1e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x73, + 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x1a, + 0x1f, 0x73, 0x66, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x21, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xa6, 0x01, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x67, 0x0a, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, + 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, + 0x74, 0x52, 0x17, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x57, + 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x42, 0xc2, 0x02, 0x0a, 0x22, 0x63, + 0x6f, 0x6d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x42, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x70, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, 0x2f, 0x73, 0x75, 0x62, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2d, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x2d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x2f, 0x73, + 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x79, + 0x70, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x53, 0x53, 0x53, 0x54, 0xaa, 0x02, 0x1e, 0x53, 0x66, + 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x72, + 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1e, 0x53, + 0x66, 0x5c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x53, 0x74, 0x61, + 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x2a, + 0x53, 0x66, 0x5c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x53, 0x74, + 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x22, 0x53, 0x66, 0x3a, + 0x3a, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x61, + 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sf_substreams_starknet_type_v1_starknet_proto_rawDescOnce sync.Once + file_sf_substreams_starknet_type_v1_starknet_proto_rawDescData = file_sf_substreams_starknet_type_v1_starknet_proto_rawDesc +) + +func file_sf_substreams_starknet_type_v1_starknet_proto_rawDescGZIP() []byte { + file_sf_substreams_starknet_type_v1_starknet_proto_rawDescOnce.Do(func() { + file_sf_substreams_starknet_type_v1_starknet_proto_rawDescData = protoimpl.X.CompressGZIP(file_sf_substreams_starknet_type_v1_starknet_proto_rawDescData) + }) + return file_sf_substreams_starknet_type_v1_starknet_proto_rawDescData +} + +var file_sf_substreams_starknet_type_v1_starknet_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_sf_substreams_starknet_type_v1_starknet_proto_goTypes = []interface{}{ + (*Transactions)(nil), // 0: sf.substreams.starknet.type.v1.Transactions + (*v1.Clock)(nil), // 1: sf.substreams.v1.Clock + (*v11.TransactionWithReceipt)(nil), // 2: sf.starknet.type.v1.TransactionWithReceipt +} +var file_sf_substreams_starknet_type_v1_starknet_proto_depIdxs = []int32{ + 1, // 0: sf.substreams.starknet.type.v1.Transactions.clock:type_name -> sf.substreams.v1.Clock + 2, // 1: sf.substreams.starknet.type.v1.Transactions.transactions_with_receipt:type_name -> sf.starknet.type.v1.TransactionWithReceipt + 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_sf_substreams_starknet_type_v1_starknet_proto_init() } +func file_sf_substreams_starknet_type_v1_starknet_proto_init() { + if File_sf_substreams_starknet_type_v1_starknet_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sf_substreams_starknet_type_v1_starknet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Transactions); 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_sf_substreams_starknet_type_v1_starknet_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sf_substreams_starknet_type_v1_starknet_proto_goTypes, + DependencyIndexes: file_sf_substreams_starknet_type_v1_starknet_proto_depIdxs, + MessageInfos: file_sf_substreams_starknet_type_v1_starknet_proto_msgTypes, + }.Build() + File_sf_substreams_starknet_type_v1_starknet_proto = out.File + file_sf_substreams_starknet_type_v1_starknet_proto_rawDesc = nil + file_sf_substreams_starknet_type_v1_starknet_proto_goTypes = nil + file_sf_substreams_starknet_type_v1_starknet_proto_depIdxs = nil +} diff --git a/starket-common/pb/sf/substreams/starknet/type/v1/starknet_vtproto.pb.go b/starket-common/pb/sf/substreams/starknet/type/v1/starknet_vtproto.pb.go new file mode 100644 index 0000000..8348422 --- /dev/null +++ b/starket-common/pb/sf/substreams/starknet/type/v1/starknet_vtproto.pb.go @@ -0,0 +1,455 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.6.0 +// source: sf/substreams/starknet/type/v1/starknet.proto + +package typev1 + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + v1 "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/starknet/type/v1" + v11 "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/v1" + proto "google.golang.org/protobuf/proto" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +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) +) + +func (m *Transactions) CloneVT() *Transactions { + if m == nil { + return (*Transactions)(nil) + } + r := new(Transactions) + r.Clock = m.Clock.CloneVT() + if rhs := m.TransactionsWithReceipt; rhs != nil { + tmpContainer := make([]*v1.TransactionWithReceipt, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.TransactionsWithReceipt = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Transactions) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (this *Transactions) EqualVT(that *Transactions) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.Clock.EqualVT(that.Clock) { + return false + } + if len(this.TransactionsWithReceipt) != len(that.TransactionsWithReceipt) { + return false + } + for i, vx := range this.TransactionsWithReceipt { + vy := that.TransactionsWithReceipt[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &v1.TransactionWithReceipt{} + } + if q == nil { + q = &v1.TransactionWithReceipt{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Transactions) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Transactions) + if !ok { + return false + } + return this.EqualVT(that) +} +func (m *Transactions) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Transactions) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Transactions) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.TransactionsWithReceipt) > 0 { + for iNdEx := len(m.TransactionsWithReceipt) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.TransactionsWithReceipt[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if m.Clock != nil { + size, err := m.Clock.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Transactions) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Transactions) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Transactions) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.TransactionsWithReceipt) > 0 { + for iNdEx := len(m.TransactionsWithReceipt) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.TransactionsWithReceipt[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if m.Clock != nil { + size, err := m.Clock.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Transactions) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Clock != nil { + l = m.Clock.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.TransactionsWithReceipt) > 0 { + for _, e := range m.TransactionsWithReceipt { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *Transactions) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Transactions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Transactions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Clock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Clock == nil { + m.Clock = &v11.Clock{} + } + if err := m.Clock.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TransactionsWithReceipt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TransactionsWithReceipt = append(m.TransactionsWithReceipt, &v1.TransactionWithReceipt{}) + if err := m.TransactionsWithReceipt[len(m.TransactionsWithReceipt)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Transactions) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Transactions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Transactions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Clock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Clock == nil { + m.Clock = &v11.Clock{} + } + if err := m.Clock.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TransactionsWithReceipt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TransactionsWithReceipt = append(m.TransactionsWithReceipt, &v1.TransactionWithReceipt{}) + if err := m.TransactionsWithReceipt[len(m.TransactionsWithReceipt)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/starket-common/pb/sf/substreams/v1/clock.pb.go b/starket-common/pb/sf/substreams/v1/clock.pb.go new file mode 100644 index 0000000..0257032 --- /dev/null +++ b/starket-common/pb/sf/substreams/v1/clock.pb.go @@ -0,0 +1,256 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: sf/substreams/v1/clock.proto + +package substreamsv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + 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) +) + +// Clock is a pointer to a block with added timestamp +type Clock struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Number uint64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *Clock) Reset() { + *x = Clock{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_substreams_v1_clock_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Clock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Clock) ProtoMessage() {} + +func (x *Clock) ProtoReflect() protoreflect.Message { + mi := &file_sf_substreams_v1_clock_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 Clock.ProtoReflect.Descriptor instead. +func (*Clock) Descriptor() ([]byte, []int) { + return file_sf_substreams_v1_clock_proto_rawDescGZIP(), []int{0} +} + +func (x *Clock) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Clock) GetNumber() uint64 { + if x != nil { + return x.Number + } + return 0 +} + +func (x *Clock) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// BlockRef is a pointer to a block to which we don't know the timestamp +type BlockRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Number uint64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` +} + +func (x *BlockRef) Reset() { + *x = BlockRef{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_substreams_v1_clock_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockRef) ProtoMessage() {} + +func (x *BlockRef) ProtoReflect() protoreflect.Message { + mi := &file_sf_substreams_v1_clock_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 BlockRef.ProtoReflect.Descriptor instead. +func (*BlockRef) Descriptor() ([]byte, []int) { + return file_sf_substreams_v1_clock_proto_rawDescGZIP(), []int{1} +} + +func (x *BlockRef) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *BlockRef) GetNumber() uint64 { + if x != nil { + return x.Number + } + return 0 +} + +var File_sf_substreams_v1_clock_proto protoreflect.FileDescriptor + +var file_sf_substreams_v1_clock_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, + 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x69, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x32, 0x0a, 0x08, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x66, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x42, 0xee, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x43, 0x6c, 0x6f, 0x63, 0x6b, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, + 0x74, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2d, 0x66, 0x6f, 0x75, + 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x10, 0x53, 0x66, 0x2e, 0x53, 0x75, 0x62, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x53, 0x66, 0x5c, + 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, + 0x53, 0x66, 0x5c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x53, + 0x66, 0x3a, 0x3a, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sf_substreams_v1_clock_proto_rawDescOnce sync.Once + file_sf_substreams_v1_clock_proto_rawDescData = file_sf_substreams_v1_clock_proto_rawDesc +) + +func file_sf_substreams_v1_clock_proto_rawDescGZIP() []byte { + file_sf_substreams_v1_clock_proto_rawDescOnce.Do(func() { + file_sf_substreams_v1_clock_proto_rawDescData = protoimpl.X.CompressGZIP(file_sf_substreams_v1_clock_proto_rawDescData) + }) + return file_sf_substreams_v1_clock_proto_rawDescData +} + +var file_sf_substreams_v1_clock_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_sf_substreams_v1_clock_proto_goTypes = []interface{}{ + (*Clock)(nil), // 0: sf.substreams.v1.Clock + (*BlockRef)(nil), // 1: sf.substreams.v1.BlockRef + (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp +} +var file_sf_substreams_v1_clock_proto_depIdxs = []int32{ + 2, // 0: sf.substreams.v1.Clock.timestamp:type_name -> google.protobuf.Timestamp + 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_sf_substreams_v1_clock_proto_init() } +func file_sf_substreams_v1_clock_proto_init() { + if File_sf_substreams_v1_clock_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sf_substreams_v1_clock_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Clock); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_substreams_v1_clock_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockRef); 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_sf_substreams_v1_clock_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sf_substreams_v1_clock_proto_goTypes, + DependencyIndexes: file_sf_substreams_v1_clock_proto_depIdxs, + MessageInfos: file_sf_substreams_v1_clock_proto_msgTypes, + }.Build() + File_sf_substreams_v1_clock_proto = out.File + file_sf_substreams_v1_clock_proto_rawDesc = nil + file_sf_substreams_v1_clock_proto_goTypes = nil + file_sf_substreams_v1_clock_proto_depIdxs = nil +} diff --git a/starket-common/pb/sf/substreams/v1/clock_vtproto.pb.go b/starket-common/pb/sf/substreams/v1/clock_vtproto.pb.go new file mode 100644 index 0000000..cdacd6c --- /dev/null +++ b/starket-common/pb/sf/substreams/v1/clock_vtproto.pb.go @@ -0,0 +1,834 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.6.0 +// source: sf/substreams/v1/clock.proto + +package substreamsv1 + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + timestamppb1 "github.com/planetscale/vtprotobuf/types/known/timestamppb" + proto "google.golang.org/protobuf/proto" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + unsafe "unsafe" +) + +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) +) + +func (m *Clock) CloneVT() *Clock { + if m == nil { + return (*Clock)(nil) + } + r := new(Clock) + r.Id = m.Id + r.Number = m.Number + r.Timestamp = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.Timestamp).CloneVT()) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Clock) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *BlockRef) CloneVT() *BlockRef { + if m == nil { + return (*BlockRef)(nil) + } + r := new(BlockRef) + r.Id = m.Id + r.Number = m.Number + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *BlockRef) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (this *Clock) EqualVT(that *Clock) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Id != that.Id { + return false + } + if this.Number != that.Number { + return false + } + if !(*timestamppb1.Timestamp)(this.Timestamp).EqualVT((*timestamppb1.Timestamp)(that.Timestamp)) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Clock) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Clock) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *BlockRef) EqualVT(that *BlockRef) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Id != that.Id { + return false + } + if this.Number != that.Number { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *BlockRef) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*BlockRef) + if !ok { + return false + } + return this.EqualVT(that) +} +func (m *Clock) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Clock) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Clock) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Timestamp != nil { + size, err := (*timestamppb1.Timestamp)(m.Timestamp).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Number != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BlockRef) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlockRef) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BlockRef) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Number != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Clock) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Clock) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Clock) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Timestamp != nil { + size, err := (*timestamppb1.Timestamp)(m.Timestamp).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Number != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BlockRef) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlockRef) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *BlockRef) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Number != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Clock) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Number != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Number)) + } + if m.Timestamp != nil { + l = (*timestamppb1.Timestamp)(m.Timestamp).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *BlockRef) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Number != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Number)) + } + n += len(m.unknownFields) + return n +} + +func (m *Clock) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Clock: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Clock: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timestamp == nil { + m.Timestamp = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.Timestamp).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockRef) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlockRef: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockRef: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Clock) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Clock: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Clock: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Id = stringValue + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timestamp == nil { + m.Timestamp = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.Timestamp).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockRef) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlockRef: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockRef: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Id = stringValue + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/starket-common/proto/buf.gen.yaml b/starket-common/proto/buf.gen.yaml new file mode 100644 index 0000000..165332b --- /dev/null +++ b/starket-common/proto/buf.gen.yaml @@ -0,0 +1,13 @@ +version: v1 +managed: + enabled: true + go_package_prefix: + default: github.com/streamingfast/substreams-foundational-modules/starket-common/pb + +plugins: + - plugin: buf.build/protocolbuffers/go:v1.31.0 + out: ../pb + opt: paths=source_relative + - plugin: buf.build/community/planetscale-vtprotobuf:v0.6.0 + out: ../pb + opt: paths=source_relative diff --git a/starket-common/proto/buf.lock b/starket-common/proto/buf.lock new file mode 100644 index 0000000..d2358ec --- /dev/null +++ b/starket-common/proto/buf.lock @@ -0,0 +1,13 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: streamingfast + repository: firehose-starknet + commit: 591503374342443eb9a98cd3883b6ca9 + digest: shake256:21d3702cd6b3be350a1c25d57b66e669caf67dbd49dd205f4b0669d5055ca35a4c95235a05bc1d7175780149f8ad7f164153b446cdc004769d81697b19a72fb7 + - remote: buf.build + owner: streamingfast + repository: substreams + commit: ce84563cf22e4befa55edf53f61af055 + digest: shake256:09af59d53626d932d4960525e37559df71ddc7b4f95b98a4320ef742405217219b8d71c9c11541a1a4b0054cabe15fa2ab8fcb8b781435bab8c65e20d25c1090 diff --git a/starket-common/proto/buf.yaml b/starket-common/proto/buf.yaml new file mode 100644 index 0000000..b0ea8f2 --- /dev/null +++ b/starket-common/proto/buf.yaml @@ -0,0 +1,4 @@ +version: v1 +deps: + - buf.build/streamingfast/firehose-starknet + - buf.build/streamingfast/substreams \ No newline at end of file From ed2798a839e0b23a602f453425e2946217b4e0cf Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Mon, 15 Jul 2024 12:41:46 -0400 Subject: [PATCH 12/23] remove sfreleaser stuff --- starket-common/.sfreleaser | 6 ------ 1 file changed, 6 deletions(-) delete mode 100755 starket-common/.sfreleaser diff --git a/starket-common/.sfreleaser b/starket-common/.sfreleaser deleted file mode 100755 index c21752c..0000000 --- a/starket-common/.sfreleaser +++ /dev/null @@ -1,6 +0,0 @@ -global: - binary: firestarknet - language: golang - variant: application -release: - goreleaser-docker-image: goreleaser/goreleaser-cross:v1.22 \ No newline at end of file From 4ea23de40df16efd3216f2ead72f5a188e9a8f7a Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Mon, 15 Jul 2024 16:25:18 -0400 Subject: [PATCH 13/23] remove some logs --- starket-common/main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/starket-common/main.go b/starket-common/main.go index 5caf1d4..47f8681 100644 --- a/starket-common/main.go +++ b/starket-common/main.go @@ -16,7 +16,6 @@ import ( ) func AllTransactions(block *pbstarknet.Block) (*v1.Transactions, error) { - Logf("extracting all transactions from block %s", feltToString(block.BlockHash)) clock := &pbsubstreams.Clock{ Id: feltToString(block.BlockHash), Number: block.BlockNumber, From 2f0b90f8c025b271c469a7b2051205c9175950c9 Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Mon, 15 Jul 2024 16:25:43 -0400 Subject: [PATCH 14/23] bump version --- starket-common/substreams.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starket-common/substreams.yaml b/starket-common/substreams.yaml index fc60f2b..96bf7b5 100644 --- a/starket-common/substreams.yaml +++ b/starket-common/substreams.yaml @@ -1,7 +1,7 @@ specVersion: v0.1.0 package: name: starknet_foundational - version: v0.1.0 + version: v0.1.1 protobuf: files: From bfdc2d7c0daeeb6c0750c904f302103380af0b38 Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Tue, 16 Jul 2024 10:26:47 -0400 Subject: [PATCH 15/23] bump version --- starket-common/substreams.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starket-common/substreams.yaml b/starket-common/substreams.yaml index 96bf7b5..e88d9fe 100644 --- a/starket-common/substreams.yaml +++ b/starket-common/substreams.yaml @@ -1,7 +1,7 @@ specVersion: v0.1.0 package: name: starknet_foundational - version: v0.1.1 + version: v0.1.2 protobuf: files: From 5ae5f647c68ad676d47fa42274b9f87b5505301e Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Tue, 16 Jul 2024 10:27:11 -0400 Subject: [PATCH 16/23] update readme --- starket-common/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starket-common/README.md b/starket-common/README.md index 543e15b..852f2eb 100644 --- a/starket-common/README.md +++ b/starket-common/README.md @@ -9,7 +9,7 @@ First test is to unpack a raw Ethereum Block, from within `tinygo`. ## Build ```bash -tinygo build -o wasm.wasm -target wasi -scheduler none . +tinygo build -o wasm.wasm -target wasi -gc leaking -scheduler none . ``` ## Usage From a7db91bd7f6159ecaf1609e2d62ccc7dd85a7e0d Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Tue, 16 Jul 2024 12:21:12 -0400 Subject: [PATCH 17/23] fix typo --- starknet-common/.gitignore | 3 + starknet-common/Makefile | 19 + starknet-common/README.md | 25 + starknet-common/generated.go | 170 + starknet-common/go.mod | 25 + starknet-common/go.sum | 45 + starknet-common/local.go | 10 + starknet-common/main.go | 190 + starknet-common/main_test.go | 50 + .../pb/sf/starknet/type/v1/block.pb.go | 4045 +++ .../sf/starknet/type/v1/block_vtproto.pb.go | 22205 ++++++++++++++++ .../pb/sf/substreams/index/v1/keys.pb.go | 159 + .../sf/substreams/index/v1/keys_vtproto.pb.go | 338 + .../starknet/type/v1/starknet.pb.go | 194 + .../starknet/type/v1/starknet_vtproto.pb.go | 455 + .../pb/sf/substreams/v1/clock.pb.go | 256 + .../pb/sf/substreams/v1/clock_vtproto.pb.go | 834 + starknet-common/proto/buf.gen.yaml | 13 + starknet-common/proto/buf.lock | 13 + starknet-common/proto/buf.yaml | 4 + .../starknet/type/v1/starknet.proto | 14 + starknet-common/sqe/api.go | 54 + starknet-common/sqe/api_test.go | 150 + starknet-common/sqe/bitmap.go | 116 + starknet-common/sqe/bitmap_test.go | 57 + starknet-common/sqe/errors.go | 39 + starknet-common/sqe/init_test.go | 79 + starknet-common/sqe/keys.go | 80 + starknet-common/sqe/keys_test.go | 70 + starknet-common/sqe/lexer.go | 111 + starknet-common/sqe/lexer_test.go | 57 + starknet-common/sqe/optimizer.go | 33 + starknet-common/sqe/optimizer_test.go | 120 + starknet-common/sqe/parser.go | 263 + starknet-common/sqe/parser_bench_test.go | 54 + starknet-common/sqe/parser_test.go | 317 + starknet-common/sqe/transformer.go | 38 + starknet-common/sqe/traversal.go | 113 + starknet-common/sqe/types.go | 111 + starknet-common/substreams.yaml | 59 + 40 files changed, 30988 insertions(+) create mode 100644 starknet-common/.gitignore create mode 100644 starknet-common/Makefile create mode 100644 starknet-common/README.md create mode 100644 starknet-common/generated.go create mode 100644 starknet-common/go.mod create mode 100644 starknet-common/go.sum create mode 100644 starknet-common/local.go create mode 100644 starknet-common/main.go create mode 100644 starknet-common/main_test.go create mode 100644 starknet-common/pb/sf/starknet/type/v1/block.pb.go create mode 100644 starknet-common/pb/sf/starknet/type/v1/block_vtproto.pb.go create mode 100644 starknet-common/pb/sf/substreams/index/v1/keys.pb.go create mode 100644 starknet-common/pb/sf/substreams/index/v1/keys_vtproto.pb.go create mode 100644 starknet-common/pb/sf/substreams/starknet/type/v1/starknet.pb.go create mode 100644 starknet-common/pb/sf/substreams/starknet/type/v1/starknet_vtproto.pb.go create mode 100644 starknet-common/pb/sf/substreams/v1/clock.pb.go create mode 100644 starknet-common/pb/sf/substreams/v1/clock_vtproto.pb.go create mode 100644 starknet-common/proto/buf.gen.yaml create mode 100644 starknet-common/proto/buf.lock create mode 100644 starknet-common/proto/buf.yaml create mode 100644 starknet-common/proto/sf/substreams/starknet/type/v1/starknet.proto create mode 100644 starknet-common/sqe/api.go create mode 100644 starknet-common/sqe/api_test.go create mode 100644 starknet-common/sqe/bitmap.go create mode 100644 starknet-common/sqe/bitmap_test.go create mode 100644 starknet-common/sqe/errors.go create mode 100644 starknet-common/sqe/init_test.go create mode 100644 starknet-common/sqe/keys.go create mode 100644 starknet-common/sqe/keys_test.go create mode 100644 starknet-common/sqe/lexer.go create mode 100644 starknet-common/sqe/lexer_test.go create mode 100644 starknet-common/sqe/optimizer.go create mode 100644 starknet-common/sqe/optimizer_test.go create mode 100644 starknet-common/sqe/parser.go create mode 100644 starknet-common/sqe/parser_bench_test.go create mode 100644 starknet-common/sqe/parser_test.go create mode 100644 starknet-common/sqe/transformer.go create mode 100644 starknet-common/sqe/traversal.go create mode 100644 starknet-common/sqe/types.go create mode 100644 starknet-common/substreams.yaml diff --git a/starknet-common/.gitignore b/starknet-common/.gitignore new file mode 100644 index 0000000..e3816cc --- /dev/null +++ b/starknet-common/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +wasm.wasm +.idea diff --git a/starknet-common/Makefile b/starknet-common/Makefile new file mode 100644 index 0000000..3705982 --- /dev/null +++ b/starknet-common/Makefile @@ -0,0 +1,19 @@ +delete-binpb: +ifneq ("$(wildcard $(PATH_TO_FILE))","") + rm proto/generated-buf-build.binpb +endif + +generated-buf-build.binpb: proto/buf.gen.yaml proto/buf.yaml delete-binpb + cd proto; buf mod update; buf build --as-file-descriptor-set -o generated-buf-build.binpb + +.PHONY: build +build: generated-buf-build.binpb + cargo build --target wasm32-unknown-unknown --release + +.PHONY: protogen +protogen: generated-buf-build.binpb + cd proto; buf generate generated-buf-build.binpb -o ../ + +.PHONY: package +package: build + substreams pack ./substreams.yaml \ No newline at end of file diff --git a/starknet-common/README.md b/starknet-common/README.md new file mode 100644 index 0000000..852f2eb --- /dev/null +++ b/starknet-common/README.md @@ -0,0 +1,25 @@ +# Substreams in Go with tinygo + +First test is to receive a Clock in Go, and ship it to the Substreams engine, and have it run over there. + +- Craft a first `map_mod` that prints something to logs. + +First test is to unpack a raw Ethereum Block, from within `tinygo`. + +## Build + +```bash +tinygo build -o wasm.wasm -target wasi -gc leaking -scheduler none . +``` + +## Usage + +```bash +substreams gui ./substreams-starknet.yaml --plaintext -e 127.0.0.1:10016 -t +10 map_test +# or +substreams run ./substreams-starknet.yaml --plaintext -e 127.0.0.1:10016 -t +10 map_test +``` + +```bash +buf generate --exclude-path sf/substreams-starknet/v1,sf/substreams-starknet/rpc,google/,sf/substreams-starknet/sink,sf/substreams-starknet +``` diff --git a/starknet-common/generated.go b/starknet-common/generated.go new file mode 100644 index 0000000..6947933 --- /dev/null +++ b/starknet-common/generated.go @@ -0,0 +1,170 @@ +//go:build tinygo || wasip1 + +package main + +import ( + "fmt" + "reflect" + "unsafe" + + pbstarknet "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/starknet/type/v1" + v1 "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/substreams/starknet/type/v1" +) + +//go:generate substreams-starknet protogen ./substreams-starknet.yaml --with-tinygo-maps // creates genre substreams-starknet.gen.go + +// Dans WASI: _start +func main() {} + +////export db_get_i64 +//func _db_get_i64(code, scope, key uint64) []byte {} + +//export output +func _output(ptr, len int32) {} + +//go:wasm-module logger +//export println +func _log(ptr int32, len int32) {} + +// Output the serialized protobuf byte array to the Substreams engine +func output(out []byte) { + _output(byteArrayToPtr(out)) +} + +// Log a line to the Substreams engine +func Logf(message string, args ...any) { + _log(stringToPtr(fmt.Sprintf(message, args...))) +} + +//export all_transactions +func _all_transactions(blockPtr, blockLen int32) (retval int32) { + defer func() { + if r := recover(); r != nil { + Logf("%#v", r) + retval = 1 + } + }() + + a := ptrToString(blockPtr, blockLen) + b := []byte(a) + dest := &pbstarknet.Block{} + if err := dest.UnmarshalVT(b); err != nil { + Logf("failed unmarshal: %s", err) + return 1 + } + + ret, err := AllTransactions(dest) + if err != nil { + panic(fmt.Errorf("map_extrinsics failed: %w", err)) + } + if ret != nil { + cnt, err := ret.MarshalVT() + if err != nil { + panic(fmt.Errorf("marshal output: %w", err)) + } + output(cnt) + } + return 0 +} + +//export index_transactions +func _index_transactions(ptr, len int32) (retval int32) { + defer func() { + if r := recover(); r != nil { + Logf("%#v", r) + retval = 1 + } + }() + + a := ptrToString(int32(ptr), int32(len)) + b := []byte(a) + dest := &v1.Transactions{} + if err := dest.UnmarshalVT(b); err != nil { + Logf("failed unmarshal: %s", err) + return 1 + } + + ret, err := IndexTransaction(dest) + if err != nil { + panic(fmt.Errorf("map_extrinsics failed: %w", err)) + } + if ret != nil { + cnt, err := ret.MarshalVT() + if err != nil { + panic(fmt.Errorf("marshal output: %w", err)) + } + output(cnt) + } + return 0 +} + +//export filtered_transactions +func _filtered_transactions(queryPtr, queryLen int32, transactionsPtr, transactionsLen int32) (ret int32) { + defer func() { + if r := recover(); r != nil { + Logf("%#v", r) + ret = 1 + } + }() + + query := ptrToString(queryPtr, queryLen) + txsData := ptrToBytes(transactionsPtr, transactionsLen) + txs := &v1.Transactions{} + + if err := txs.UnmarshalVT(txsData); err != nil { + Logf("failed unmarshal: %s", err) + return 1 + } + + out, err := FilteredTransactions(query, txs) + if err != nil { + panic(fmt.Errorf("map_extrinsics failed: %w", err)) + } + + if out != nil { + cnt, err := out.MarshalVT() + if err != nil { + panic(fmt.Errorf("marshal output: %w", err)) + } + output(cnt) + } + return 0 +} + +// ptrToString returns a string from WebAssembly compatible numeric types +// representing its pointer and length. +func ptrToString(ptr int32, size int32) string { + // Get a slice view of the underlying bytes in the stream. We use SliceHeader, not StringHeader + // as it allows us to fix the capacity to what was allocated. + return *(*string)(unsafe.Pointer(&reflect.SliceHeader{ + Data: uintptr(ptr), + Len: int(size), // Tinygo requires these as uintptrs even if they are int fields. + Cap: int(size), // ^^ See https://github.com/tinygo-org/tinygo/issues/1284 + })) +} + +func ptrToBytes(ptr int32, size int32) []byte { + // Get a slice view of the underlying bytes in the stream. We use SliceHeader, not StringHeader + // as it allows us to fix the capacity to what was allocated. + return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{ + Data: uintptr(ptr), + Len: int(size), // Tinygo requires these as uintptrs even if they are int fields. + Cap: int(size), // ^^ See https://github.com/tinygo-org/tinygo/issues/1284 + })) +} + +// stringToPtr returns a pointer and size pair for the given string in a way +// compatible with WebAssembly numeric types. +func stringToPtr(s string) (int32, int32) { + buf := []byte(s) + ptr := &buf[0] + unsafePtr := uintptr(unsafe.Pointer(ptr)) + return int32(unsafePtr), int32(len(buf)) +} + +// byteArrayToPtr returns a pointer and size pair for the given byte array, for WASM compat. +func byteArrayToPtr(buf []byte) (int32, int32) { + ptr := &buf[0] + unsafePtr := uintptr(unsafe.Pointer(ptr)) + return int32(unsafePtr), int32(len(buf)) +} diff --git a/starknet-common/go.mod b/starknet-common/go.mod new file mode 100644 index 0000000..3657ffd --- /dev/null +++ b/starknet-common/go.mod @@ -0,0 +1,25 @@ +module github.com/streamingfast/substreams-foundational-modules/starknet-common + +go 1.22.0 + +require ( + github.com/NethermindEth/juno v0.3.1 + github.com/RoaringBitmap/roaring v1.9.1 + github.com/alecthomas/participle v0.7.1 + github.com/planetscale/vtprotobuf v0.6.0 + github.com/protocolbuffers/protoscope v0.0.0-20221109213918-8e7a6aafa2c9 + github.com/stretchr/testify v1.8.4 + google.golang.org/protobuf v1.33.0 +) + +require ( + github.com/bits-and-blooms/bitset v1.12.0 // indirect + github.com/consensys/gnark-crypto v0.10.1-0.20230414110055-e500f2f0ff3a // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/fxamacker/cbor/v2 v2.4.0 // indirect + github.com/mschoch/smat v0.2.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/x448/float16 v0.8.4 // indirect + golang.org/x/sys v0.20.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/starknet-common/go.sum b/starknet-common/go.sum new file mode 100644 index 0000000..3843e5c --- /dev/null +++ b/starknet-common/go.sum @@ -0,0 +1,45 @@ +github.com/NethermindEth/juno v0.3.1 h1:AW72LiAm9gqUeCVJWvepnZcTnpU4Vkl0KzPMxS+42FA= +github.com/NethermindEth/juno v0.3.1/go.mod h1:SGbTpgGaCsxhFsKOid7Ylnz//WZ8swtILk+NbHGsk/Q= +github.com/RoaringBitmap/roaring v1.9.1 h1:LXcSqGGGMKm+KAzUyWn7ZeREqoOkoMX+KwLOK1thc4I= +github.com/RoaringBitmap/roaring v1.9.1/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= +github.com/alecthomas/participle v0.7.1 h1:2bN7reTw//5f0cugJcTOnY/NYZcWQOaajW+BwZB5xWs= +github.com/alecthomas/participle v0.7.1/go.mod h1:HfdmEuwvr12HXQN44HPWXR0lHmVolVYe4dyL6lQ3duY= +github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= +github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA= +github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/consensys/gnark-crypto v0.10.1-0.20230414110055-e500f2f0ff3a h1:hUUl++56+8w2aG2NXdQGfU8cBT9ZZ8UP4R3s47dSFdQ= +github.com/consensys/gnark-crypto v0.10.1-0.20230414110055-e500f2f0ff3a/go.mod h1:Iq/P3HHl0ElSjsg2E1gsMwhAyxnxoKK5nVyZKd+/KhU= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fxamacker/cbor/v2 v2.4.0 h1:ri0ArlOR+5XunOP8CRUowT0pSJOwhW098ZCUyskZD88= +github.com/fxamacker/cbor/v2 v2.4.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= +github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= +github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= +github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= +github.com/planetscale/vtprotobuf v0.6.0 h1:nBeETjudeJ5ZgBHUz1fVHvbqUKnYOXNhsIEabROxmNA= +github.com/planetscale/vtprotobuf v0.6.0/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/protocolbuffers/protoscope v0.0.0-20221109213918-8e7a6aafa2c9 h1:arwj11zP0yJIxIRiDn22E0H8PxfF7TsTrc2wIPFIsf4= +github.com/protocolbuffers/protoscope v0.0.0-20221109213918-8e7a6aafa2c9/go.mod h1:SKZx6stCn03JN3BOWTwvVIO2ajMkb/zQdTceXYhKw/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/starknet-common/local.go b/starknet-common/local.go new file mode 100644 index 0000000..9cce6f3 --- /dev/null +++ b/starknet-common/local.go @@ -0,0 +1,10 @@ +//go:build !tinygo && !wasip1 + +package main + +import "fmt" + +// Log a line to the Substreams engine +func Logf(message string, args ...any) { + fmt.Printf(message+"\n", args...) +} diff --git a/starknet-common/main.go b/starknet-common/main.go new file mode 100644 index 0000000..ef300d2 --- /dev/null +++ b/starknet-common/main.go @@ -0,0 +1,190 @@ +package main + +import ( + "context" + "fmt" + "time" + + "github.com/streamingfast/substreams-foundational-modules/starknet-common/sqe" + + "github.com/NethermindEth/juno/core/felt" + pbstarknet "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/starknet/type/v1" + pbindex "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/substreams/index/v1" + v1 "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/substreams/starknet/type/v1" + pbsubstreams "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/substreams/v1" + "google.golang.org/protobuf/types/known/timestamppb" +) + +func AllTransactions(block *pbstarknet.Block) (*v1.Transactions, error) { + clock := &pbsubstreams.Clock{ + Id: feltToString(block.BlockHash), + Number: block.BlockNumber, + Timestamp: timestamppb.New(time.Unix(int64(block.Timestamp), 0)), + } + + transactions := &v1.Transactions{ + Clock: clock, + } + for _, tx := range block.Transactions { + transactions.TransactionsWithReceipt = append(transactions.TransactionsWithReceipt, tx) + } + + return transactions, nil +} + +func IndexTransaction(transactions *v1.Transactions) (*pbindex.Keys, error) { + keys := &pbindex.Keys{} + for _, tx := range transactions.TransactionsWithReceipt { + idx, err := indexForTransactionsWithReceipt(tx) + if err != nil { + return nil, fmt.Errorf("indexing transaction: %w", err) + } + keys.Keys = append(keys.Keys, idx.Keys.Keys...) + } + return keys, nil +} + +func indexForTransactionsWithReceipt(transaction *pbstarknet.TransactionWithReceipt) (*Index, error) { + index := &Index{ + Keys: &pbindex.Keys{}, + } + + switch tt := transaction.Transaction.(type) { + case *pbstarknet.TransactionWithReceipt_DeployTransactionV0: + t := tt.DeployTransactionV0 + index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) + index.AddKey(feltToIndexKey("tx:contract_address_salt", t.ContractAddressSalt)) + index.AddKey(stringToIndexKey("tx:version", t.Version)) + + case *pbstarknet.TransactionWithReceipt_DeployAccountTransactionV1: + t := tt.DeployAccountTransactionV1 + index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) + index.AddKey(feltToIndexKey("tx:contract_address_salt", t.ContractAddressSalt)) + index.AddKey(stringToIndexKey("tx:version", t.Version)) + + case *pbstarknet.TransactionWithReceipt_DeployAccountTransactionV3: + t := tt.DeployAccountTransactionV3 + index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) + index.AddKey(feltToIndexKey("tx:contract_address_salt", t.ContractAddressSalt)) + index.AddKey(stringToIndexKey("tx:version", t.Version)) + + case *pbstarknet.TransactionWithReceipt_DeclareTransactionV0: + t := tt.DeclareTransactionV0 + index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) + index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) + + case *pbstarknet.TransactionWithReceipt_DeclareTransactionV1: + t := tt.DeclareTransactionV1 + index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) + index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) + + case *pbstarknet.TransactionWithReceipt_DeclareTransactionV2: + t := tt.DeclareTransactionV2 + index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) + index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) + index.AddKey(feltToIndexKey("tx:compile_class_hash", t.CompiledClassHash)) + + case *pbstarknet.TransactionWithReceipt_DeclareTransactionV3: + t := tt.DeclareTransactionV3 + index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) + index.AddKey(feltToIndexKey("tx:compile_class_hash", t.CompiledClassHash)) + index.AddKey(stringToIndexKey("tx:version", t.Version)) + + case *pbstarknet.TransactionWithReceipt_InvokeTransactionV0: + t := tt.InvokeTransactionV0 + index.AddKey(feltToIndexKey("tx:contract_address", t.ContractAddress)) + index.AddKey(stringToIndexKey("tx:version", t.Version)) + index.AddKey(feltToIndexKey("tx:entry_point_selector", t.EntryPointSelector)) + + case *pbstarknet.TransactionWithReceipt_InvokeTransactionV1: + t := tt.InvokeTransactionV1 + index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) + index.AddKey(stringToIndexKey("tx:version", t.Version)) + + case *pbstarknet.TransactionWithReceipt_InvokeTransactionV3: + t := tt.InvokeTransactionV3 + index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) + index.AddKey(stringToIndexKey("tx:version", t.Version)) + + case *pbstarknet.TransactionWithReceipt_L1HandlerTransaction: + t := tt.L1HandlerTransaction + index.AddKey(stringToIndexKey("tx:version", t.Version)) + index.AddKey(feltToIndexKey("tx:contract_address", t.ContractAddress)) + index.AddKey(feltToIndexKey("tx:entry_point_selector", t.EntryPointSelector)) + + default: + return nil, fmt.Errorf("unknown transaction type %T", transaction) + } + receipt := transaction.Receipt + index.AddKey(fmt.Sprintf("rc:type:%d", receipt.Type)) + index.AddKey(fmt.Sprintf("rc:execution_status:%d", receipt.ExecutionStatus)) + + for _, e := range receipt.Events { + index.AddKey(feltToIndexKey("ev:from_address", e.FromAddress)) + for _, key := range e.Keys { + index.AddKey(feltToIndexKey("ev:key", key)) + } + } + + return index, nil +} + +func FilteredTransactions(query string, transactions *v1.Transactions) (*v1.Transactions, error) { + filtered := &v1.Transactions{ + Clock: transactions.Clock, + } + + for _, tx := range transactions.TransactionsWithReceipt { + idx, err := indexForTransactionsWithReceipt(tx) + if err != nil { + return nil, fmt.Errorf("indexing transaction: %w", err) + } + + match, err := applyQuery(idx.Keys, query) + if err != nil { + return nil, fmt.Errorf("applying query: %w", err) + } + if match { + filtered.TransactionsWithReceipt = append(filtered.TransactionsWithReceipt, tx) + } + + } + + if len(filtered.TransactionsWithReceipt) == 0 { + return &v1.Transactions{}, nil + } + + return filtered, nil +} + +func applyQuery(keys *pbindex.Keys, query string) (bool, error) { + keyQuerier := sqe.NewFromKeys(keys.Keys) + q, err := sqe.Parse(context.Background(), query) + if err != nil { + return false, fmt.Errorf("parsing query %q: %w", query, err) + } + + return sqe.KeysApply(q, keyQuerier), nil +} + +type Index struct { + Keys *pbindex.Keys +} + +func (i *Index) AddKey(key string) { + i.Keys.Keys = append(i.Keys.Keys, key) +} + +func stringToIndexKey(prefix, str string) string { + return fmt.Sprintf("%s:%s", prefix, str) +} + +func feltToIndexKey(prefix string, bytes []byte) string { + return fmt.Sprintf("%s:%s", prefix, feltToString(bytes)) +} + +func feltToString(bytes []byte) string { + f := &felt.Felt{} + f.SetBytes(bytes) + return f.String() +} diff --git a/starknet-common/main_test.go b/starknet-common/main_test.go new file mode 100644 index 0000000..b3733c8 --- /dev/null +++ b/starknet-common/main_test.go @@ -0,0 +1,50 @@ +package main + +import ( + "encoding/hex" + "testing" + + v1 "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/substreams/starknet/type/v1" + + pbstarknet "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/starknet/type/v1" + "github.com/stretchr/testify/require" +) + +func Test_mapBlockEvents(t *testing.T) { + block := &pbstarknet.Block{ + Transactions: []*pbstarknet.TransactionWithReceipt{ + { + Transaction: &pbstarknet.TransactionWithReceipt_DeployTransactionV0{}, + }, + }, + } + + txs, err := AllTransactions(block) + require.NoError(t, err) + + require.Equal(t, 1, len(txs.TransactionsWithReceipt)) +} + +func Test_FilteredTransactions(t *testing.T) { + ch := []byte("class_hash") + xch := "0x" + hex.EncodeToString(ch) + + tx := &pbstarknet.TransactionWithReceipt{ + Transaction: &pbstarknet.TransactionWithReceipt_DeployTransactionV0{ + DeployTransactionV0: &pbstarknet.DeployTransactionV0{ + ClassHash: []byte("class_hash"), + Version: "0x3", + ContractAddressSalt: []byte("contract_address_salt"), + }, + }, + Receipt: &pbstarknet.TransactionReceipt{}, + } + txs := &v1.Transactions{ + TransactionsWithReceipt: []*pbstarknet.TransactionWithReceipt{tx}, + } + + txs, err := FilteredTransactions("tx:class_hash:"+xch, txs) + require.NoError(t, err) + + require.Equal(t, 1, len(txs.TransactionsWithReceipt)) +} diff --git a/starknet-common/pb/sf/starknet/type/v1/block.pb.go b/starknet-common/pb/sf/starknet/type/v1/block.pb.go new file mode 100644 index 0000000..cd54c08 --- /dev/null +++ b/starknet-common/pb/sf/starknet/type/v1/block.pb.go @@ -0,0 +1,4045 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: sf/starknet/type/v1/block.proto + +package typev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/timestamppb" + 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) +) + +// specifies whether the data of this block is published via blob data or calldata +type L1_DA_MODE int32 + +const ( + L1_DA_MODE_L1_DA_MODE_UNKNOWN L1_DA_MODE = 0 + L1_DA_MODE_CALLDATA L1_DA_MODE = 1 + L1_DA_MODE_BLOB L1_DA_MODE = 2 +) + +// Enum value maps for L1_DA_MODE. +var ( + L1_DA_MODE_name = map[int32]string{ + 0: "L1_DA_MODE_UNKNOWN", + 1: "CALLDATA", + 2: "BLOB", + } + L1_DA_MODE_value = map[string]int32{ + "L1_DA_MODE_UNKNOWN": 0, + "CALLDATA": 1, + "BLOB": 2, + } +) + +func (x L1_DA_MODE) Enum() *L1_DA_MODE { + p := new(L1_DA_MODE) + *p = x + return p +} + +func (x L1_DA_MODE) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (L1_DA_MODE) Descriptor() protoreflect.EnumDescriptor { + return file_sf_starknet_type_v1_block_proto_enumTypes[0].Descriptor() +} + +func (L1_DA_MODE) Type() protoreflect.EnumType { + return &file_sf_starknet_type_v1_block_proto_enumTypes[0] +} + +func (x L1_DA_MODE) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use L1_DA_MODE.Descriptor instead. +func (L1_DA_MODE) EnumDescriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{0} +} + +type FEE_DATA_AVAILABILITY_MODE int32 + +const ( + FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN FEE_DATA_AVAILABILITY_MODE = 0 + FEE_DATA_AVAILABILITY_MODE_L1 FEE_DATA_AVAILABILITY_MODE = 1 + FEE_DATA_AVAILABILITY_MODE_L2 FEE_DATA_AVAILABILITY_MODE = 2 +) + +// Enum value maps for FEE_DATA_AVAILABILITY_MODE. +var ( + FEE_DATA_AVAILABILITY_MODE_name = map[int32]string{ + 0: "FEE_DATA_AVAILABILITY_MODE_UNKNOWN", + 1: "L1", + 2: "L2", + } + FEE_DATA_AVAILABILITY_MODE_value = map[string]int32{ + "FEE_DATA_AVAILABILITY_MODE_UNKNOWN": 0, + "L1": 1, + "L2": 2, + } +) + +func (x FEE_DATA_AVAILABILITY_MODE) Enum() *FEE_DATA_AVAILABILITY_MODE { + p := new(FEE_DATA_AVAILABILITY_MODE) + *p = x + return p +} + +func (x FEE_DATA_AVAILABILITY_MODE) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FEE_DATA_AVAILABILITY_MODE) Descriptor() protoreflect.EnumDescriptor { + return file_sf_starknet_type_v1_block_proto_enumTypes[1].Descriptor() +} + +func (FEE_DATA_AVAILABILITY_MODE) Type() protoreflect.EnumType { + return &file_sf_starknet_type_v1_block_proto_enumTypes[1] +} + +func (x FEE_DATA_AVAILABILITY_MODE) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FEE_DATA_AVAILABILITY_MODE.Descriptor instead. +func (FEE_DATA_AVAILABILITY_MODE) EnumDescriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{1} +} + +type TRANSACTION_TYPE int32 + +const ( + TRANSACTION_TYPE_TRANSACTION_TYPE_UNKNOWN TRANSACTION_TYPE = 0 + TRANSACTION_TYPE_INVOKE TRANSACTION_TYPE = 1 + TRANSACTION_TYPE_DECLARE TRANSACTION_TYPE = 2 + TRANSACTION_TYPE_DEPLOY TRANSACTION_TYPE = 3 + TRANSACTION_TYPE_DEPLOY_ACCOUNT TRANSACTION_TYPE = 4 + TRANSACTION_TYPE_L1_HANDLER TRANSACTION_TYPE = 5 +) + +// Enum value maps for TRANSACTION_TYPE. +var ( + TRANSACTION_TYPE_name = map[int32]string{ + 0: "TRANSACTION_TYPE_UNKNOWN", + 1: "INVOKE", + 2: "DECLARE", + 3: "DEPLOY", + 4: "DEPLOY_ACCOUNT", + 5: "L1_HANDLER", + } + TRANSACTION_TYPE_value = map[string]int32{ + "TRANSACTION_TYPE_UNKNOWN": 0, + "INVOKE": 1, + "DECLARE": 2, + "DEPLOY": 3, + "DEPLOY_ACCOUNT": 4, + "L1_HANDLER": 5, + } +) + +func (x TRANSACTION_TYPE) Enum() *TRANSACTION_TYPE { + p := new(TRANSACTION_TYPE) + *p = x + return p +} + +func (x TRANSACTION_TYPE) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TRANSACTION_TYPE) Descriptor() protoreflect.EnumDescriptor { + return file_sf_starknet_type_v1_block_proto_enumTypes[2].Descriptor() +} + +func (TRANSACTION_TYPE) Type() protoreflect.EnumType { + return &file_sf_starknet_type_v1_block_proto_enumTypes[2] +} + +func (x TRANSACTION_TYPE) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TRANSACTION_TYPE.Descriptor instead. +func (TRANSACTION_TYPE) EnumDescriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{2} +} + +type EXECUTION_STATUS int32 + +const ( + EXECUTION_STATUS_EXECUTION_STATUS_UNKNOWN EXECUTION_STATUS = 0 + EXECUTION_STATUS_EXECUTION_STATUS_SUCCESS EXECUTION_STATUS = 1 + EXECUTION_STATUS_EXECUTION_STATUS_REVERTED EXECUTION_STATUS = 2 +) + +// Enum value maps for EXECUTION_STATUS. +var ( + EXECUTION_STATUS_name = map[int32]string{ + 0: "EXECUTION_STATUS_UNKNOWN", + 1: "EXECUTION_STATUS_SUCCESS", + 2: "EXECUTION_STATUS_REVERTED", + } + EXECUTION_STATUS_value = map[string]int32{ + "EXECUTION_STATUS_UNKNOWN": 0, + "EXECUTION_STATUS_SUCCESS": 1, + "EXECUTION_STATUS_REVERTED": 2, + } +) + +func (x EXECUTION_STATUS) Enum() *EXECUTION_STATUS { + p := new(EXECUTION_STATUS) + *p = x + return p +} + +func (x EXECUTION_STATUS) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EXECUTION_STATUS) Descriptor() protoreflect.EnumDescriptor { + return file_sf_starknet_type_v1_block_proto_enumTypes[3].Descriptor() +} + +func (EXECUTION_STATUS) Type() protoreflect.EnumType { + return &file_sf_starknet_type_v1_block_proto_enumTypes[3] +} + +func (x EXECUTION_STATUS) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EXECUTION_STATUS.Descriptor instead. +func (EXECUTION_STATUS) EnumDescriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{3} +} + +type Block struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockHash []byte `protobuf:"bytes,1,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + // The hash of this block's parent + ParentHash []byte `protobuf:"bytes,2,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` + BlockNumber uint64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + // The new global state root + NewRoot []byte `protobuf:"bytes,4,opt,name=new_root,json=newRoot,proto3" json:"new_root,omitempty"` + // The time in which the block was created + Timestamp uint64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // The StarkNet identity of the sequencer submitting this block + SequencerAddress []byte `protobuf:"bytes,6,opt,name=sequencer_address,json=sequencerAddress,proto3" json:"sequencer_address,omitempty"` + // The price of l1 gas in the block + L1GasPrice *ResourcePrice `protobuf:"bytes,7,opt,name=l1_gas_price,json=l1GasPrice,proto3" json:"l1_gas_price,omitempty"` + // The price of l1 data gas in the block + L1DataGasPrice *ResourcePrice `protobuf:"bytes,8,opt,name=l1_data_gas_price,json=l1DataGasPrice,proto3" json:"l1_data_gas_price,omitempty"` + // specifies whether the data of this block is published via blob data or calldata + L1DaMode L1_DA_MODE `protobuf:"varint,9,opt,name=l1_da_mode,json=l1DaMode,proto3,enum=sf.starknet.type.v1.L1_DA_MODE" json:"l1_da_mode,omitempty"` + // Semver of the current Starknet protocol + StarknetVersion string `protobuf:"bytes,10,opt,name=starknet_version,json=starknetVersion,proto3" json:"starknet_version,omitempty"` + // The transactions in this block + Transactions []*TransactionWithReceipt `protobuf:"bytes,11,rep,name=transactions,proto3" json:"transactions,omitempty"` + StateUpdate *StateUpdate `protobuf:"bytes,12,opt,name=state_update,json=stateUpdate,proto3" json:"state_update,omitempty"` +} + +func (x *Block) Reset() { + *x = Block{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Block) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Block) ProtoMessage() {} + +func (x *Block) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_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 Block.ProtoReflect.Descriptor instead. +func (*Block) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{0} +} + +func (x *Block) GetBlockHash() []byte { + if x != nil { + return x.BlockHash + } + return nil +} + +func (x *Block) GetParentHash() []byte { + if x != nil { + return x.ParentHash + } + return nil +} + +func (x *Block) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *Block) GetNewRoot() []byte { + if x != nil { + return x.NewRoot + } + return nil +} + +func (x *Block) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *Block) GetSequencerAddress() []byte { + if x != nil { + return x.SequencerAddress + } + return nil +} + +func (x *Block) GetL1GasPrice() *ResourcePrice { + if x != nil { + return x.L1GasPrice + } + return nil +} + +func (x *Block) GetL1DataGasPrice() *ResourcePrice { + if x != nil { + return x.L1DataGasPrice + } + return nil +} + +func (x *Block) GetL1DaMode() L1_DA_MODE { + if x != nil { + return x.L1DaMode + } + return L1_DA_MODE_L1_DA_MODE_UNKNOWN +} + +func (x *Block) GetStarknetVersion() string { + if x != nil { + return x.StarknetVersion + } + return "" +} + +func (x *Block) GetTransactions() []*TransactionWithReceipt { + if x != nil { + return x.Transactions + } + return nil +} + +func (x *Block) GetStateUpdate() *StateUpdate { + if x != nil { + return x.StateUpdate + } + return nil +} + +type ResourcePrice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PriceInFri []byte `protobuf:"bytes,1,opt,name=price_in_fri,json=priceInFri,proto3" json:"price_in_fri,omitempty"` + PriceInWei []byte `protobuf:"bytes,2,opt,name=price_in_wei,json=priceInWei,proto3" json:"price_in_wei,omitempty"` +} + +func (x *ResourcePrice) Reset() { + *x = ResourcePrice{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourcePrice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourcePrice) ProtoMessage() {} + +func (x *ResourcePrice) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_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 ResourcePrice.ProtoReflect.Descriptor instead. +func (*ResourcePrice) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{1} +} + +func (x *ResourcePrice) GetPriceInFri() []byte { + if x != nil { + return x.PriceInFri + } + return nil +} + +func (x *ResourcePrice) GetPriceInWei() []byte { + if x != nil { + return x.PriceInWei + } + return nil +} + +type TransactionWithReceipt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Transaction: + // + // *TransactionWithReceipt_InvokeTransactionV0 + // *TransactionWithReceipt_InvokeTransactionV1 + // *TransactionWithReceipt_InvokeTransactionV3 + // *TransactionWithReceipt_L1HandlerTransaction + // *TransactionWithReceipt_DeclareTransactionV0 + // *TransactionWithReceipt_DeclareTransactionV1 + // *TransactionWithReceipt_DeclareTransactionV2 + // *TransactionWithReceipt_DeclareTransactionV3 + // *TransactionWithReceipt_DeployTransactionV0 + // *TransactionWithReceipt_DeployAccountTransactionV1 + // *TransactionWithReceipt_DeployAccountTransactionV3 + Transaction isTransactionWithReceipt_Transaction `protobuf_oneof:"transaction"` + Receipt *TransactionReceipt `protobuf:"bytes,12,opt,name=receipt,proto3" json:"receipt,omitempty"` +} + +func (x *TransactionWithReceipt) Reset() { + *x = TransactionWithReceipt{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransactionWithReceipt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionWithReceipt) ProtoMessage() {} + +func (x *TransactionWithReceipt) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_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 TransactionWithReceipt.ProtoReflect.Descriptor instead. +func (*TransactionWithReceipt) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{2} +} + +func (m *TransactionWithReceipt) GetTransaction() isTransactionWithReceipt_Transaction { + if m != nil { + return m.Transaction + } + return nil +} + +func (x *TransactionWithReceipt) GetInvokeTransactionV0() *InvokeTransactionV0 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_InvokeTransactionV0); ok { + return x.InvokeTransactionV0 + } + return nil +} + +func (x *TransactionWithReceipt) GetInvokeTransactionV1() *InvokeTransactionV1 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_InvokeTransactionV1); ok { + return x.InvokeTransactionV1 + } + return nil +} + +func (x *TransactionWithReceipt) GetInvokeTransactionV3() *InvokeTransactionV3 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_InvokeTransactionV3); ok { + return x.InvokeTransactionV3 + } + return nil +} + +func (x *TransactionWithReceipt) GetL1HandlerTransaction() *L1HandlerTransaction { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_L1HandlerTransaction); ok { + return x.L1HandlerTransaction + } + return nil +} + +func (x *TransactionWithReceipt) GetDeclareTransactionV0() *DeclareTransactionV0 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeclareTransactionV0); ok { + return x.DeclareTransactionV0 + } + return nil +} + +func (x *TransactionWithReceipt) GetDeclareTransactionV1() *DeclareTransactionV1 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeclareTransactionV1); ok { + return x.DeclareTransactionV1 + } + return nil +} + +func (x *TransactionWithReceipt) GetDeclareTransactionV2() *DeclareTransactionV2 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeclareTransactionV2); ok { + return x.DeclareTransactionV2 + } + return nil +} + +func (x *TransactionWithReceipt) GetDeclareTransactionV3() *DeclareTransactionV3 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeclareTransactionV3); ok { + return x.DeclareTransactionV3 + } + return nil +} + +func (x *TransactionWithReceipt) GetDeployTransactionV0() *DeployTransactionV0 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeployTransactionV0); ok { + return x.DeployTransactionV0 + } + return nil +} + +func (x *TransactionWithReceipt) GetDeployAccountTransactionV1() *DeployAccountTransactionV1 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeployAccountTransactionV1); ok { + return x.DeployAccountTransactionV1 + } + return nil +} + +func (x *TransactionWithReceipt) GetDeployAccountTransactionV3() *DeployAccountTransactionV3 { + if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeployAccountTransactionV3); ok { + return x.DeployAccountTransactionV3 + } + return nil +} + +func (x *TransactionWithReceipt) GetReceipt() *TransactionReceipt { + if x != nil { + return x.Receipt + } + return nil +} + +type isTransactionWithReceipt_Transaction interface { + isTransactionWithReceipt_Transaction() +} + +type TransactionWithReceipt_InvokeTransactionV0 struct { + InvokeTransactionV0 *InvokeTransactionV0 `protobuf:"bytes,1,opt,name=invoke_transaction_v0,json=invokeTransactionV0,proto3,oneof"` +} + +type TransactionWithReceipt_InvokeTransactionV1 struct { + InvokeTransactionV1 *InvokeTransactionV1 `protobuf:"bytes,2,opt,name=invoke_transaction_v1,json=invokeTransactionV1,proto3,oneof"` +} + +type TransactionWithReceipt_InvokeTransactionV3 struct { + InvokeTransactionV3 *InvokeTransactionV3 `protobuf:"bytes,3,opt,name=invoke_transaction_v3,json=invokeTransactionV3,proto3,oneof"` +} + +type TransactionWithReceipt_L1HandlerTransaction struct { + L1HandlerTransaction *L1HandlerTransaction `protobuf:"bytes,4,opt,name=l1_handler_transaction,json=l1HandlerTransaction,proto3,oneof"` //not versioned in api definition +} + +type TransactionWithReceipt_DeclareTransactionV0 struct { + DeclareTransactionV0 *DeclareTransactionV0 `protobuf:"bytes,5,opt,name=declare_transaction_v0,json=declareTransactionV0,proto3,oneof"` +} + +type TransactionWithReceipt_DeclareTransactionV1 struct { + DeclareTransactionV1 *DeclareTransactionV1 `protobuf:"bytes,6,opt,name=declare_transaction_v1,json=declareTransactionV1,proto3,oneof"` +} + +type TransactionWithReceipt_DeclareTransactionV2 struct { + DeclareTransactionV2 *DeclareTransactionV2 `protobuf:"bytes,7,opt,name=declare_transaction_v2,json=declareTransactionV2,proto3,oneof"` +} + +type TransactionWithReceipt_DeclareTransactionV3 struct { + DeclareTransactionV3 *DeclareTransactionV3 `protobuf:"bytes,8,opt,name=declare_transaction_v3,json=declareTransactionV3,proto3,oneof"` +} + +type TransactionWithReceipt_DeployTransactionV0 struct { + DeployTransactionV0 *DeployTransactionV0 `protobuf:"bytes,9,opt,name=deploy_transaction_v0,json=deployTransactionV0,proto3,oneof"` +} + +type TransactionWithReceipt_DeployAccountTransactionV1 struct { + DeployAccountTransactionV1 *DeployAccountTransactionV1 `protobuf:"bytes,10,opt,name=deploy_account_transaction_v1,json=deployAccountTransactionV1,proto3,oneof"` +} + +type TransactionWithReceipt_DeployAccountTransactionV3 struct { + DeployAccountTransactionV3 *DeployAccountTransactionV3 `protobuf:"bytes,11,opt,name=deploy_account_transaction_v3,json=deployAccountTransactionV3,proto3,oneof"` +} + +func (*TransactionWithReceipt_InvokeTransactionV0) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_InvokeTransactionV1) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_InvokeTransactionV3) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_L1HandlerTransaction) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_DeclareTransactionV0) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_DeclareTransactionV1) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_DeclareTransactionV2) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_DeclareTransactionV3) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_DeployTransactionV0) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_DeployAccountTransactionV1) isTransactionWithReceipt_Transaction() {} + +func (*TransactionWithReceipt_DeployAccountTransactionV3) isTransactionWithReceipt_Transaction() {} + +type TransactionReceipt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hash identifying the transaction + TransactionHash []byte `protobuf:"bytes,1,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` + // The fee that was charged by the sequencer + ActualFee *ActualFee `protobuf:"bytes,2,opt,name=actual_fee,json=actualFee,proto3" json:"actual_fee,omitempty"` + // Execution status + ExecutionStatus EXECUTION_STATUS `protobuf:"varint,3,opt,name=execution_status,json=executionStatus,proto3,enum=sf.starknet.type.v1.EXECUTION_STATUS" json:"execution_status,omitempty"` + RevertReason string `protobuf:"bytes,4,opt,name=revert_reason,json=revertReason,proto3" json:"revert_reason,omitempty"` + Type TRANSACTION_TYPE `protobuf:"varint,5,opt,name=type,proto3,enum=sf.starknet.type.v1.TRANSACTION_TYPE" json:"type,omitempty"` + // Messages sent + MessageHash string `protobuf:"bytes,6,opt,name=message_hash,json=messageHash,proto3" json:"message_hash,omitempty"` + // The address of the deployed contract + MessagesSent []*MessagesSent `protobuf:"bytes,7,rep,name=messages_sent,json=messagesSent,proto3" json:"messages_sent,omitempty"` + // The events emitted as part of this transaction + Events []*Event `protobuf:"bytes,8,rep,name=events,proto3" json:"events,omitempty"` + // The resources consumed by the transaction + ExecutionResources *ExecutionResources `protobuf:"bytes,9,opt,name=execution_resources,json=executionResources,proto3" json:"execution_resources,omitempty"` + // The message hash as it appears on the L1 core contract + ContractAddress []byte `protobuf:"bytes,10,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` +} + +func (x *TransactionReceipt) Reset() { + *x = TransactionReceipt{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransactionReceipt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionReceipt) ProtoMessage() {} + +func (x *TransactionReceipt) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[3] + 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 TransactionReceipt.ProtoReflect.Descriptor instead. +func (*TransactionReceipt) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{3} +} + +func (x *TransactionReceipt) GetTransactionHash() []byte { + if x != nil { + return x.TransactionHash + } + return nil +} + +func (x *TransactionReceipt) GetActualFee() *ActualFee { + if x != nil { + return x.ActualFee + } + return nil +} + +func (x *TransactionReceipt) GetExecutionStatus() EXECUTION_STATUS { + if x != nil { + return x.ExecutionStatus + } + return EXECUTION_STATUS_EXECUTION_STATUS_UNKNOWN +} + +func (x *TransactionReceipt) GetRevertReason() string { + if x != nil { + return x.RevertReason + } + return "" +} + +func (x *TransactionReceipt) GetType() TRANSACTION_TYPE { + if x != nil { + return x.Type + } + return TRANSACTION_TYPE_TRANSACTION_TYPE_UNKNOWN +} + +func (x *TransactionReceipt) GetMessageHash() string { + if x != nil { + return x.MessageHash + } + return "" +} + +func (x *TransactionReceipt) GetMessagesSent() []*MessagesSent { + if x != nil { + return x.MessagesSent + } + return nil +} + +func (x *TransactionReceipt) GetEvents() []*Event { + if x != nil { + return x.Events + } + return nil +} + +func (x *TransactionReceipt) GetExecutionResources() *ExecutionResources { + if x != nil { + return x.ExecutionResources + } + return nil +} + +func (x *TransactionReceipt) GetContractAddress() []byte { + if x != nil { + return x.ContractAddress + } + return nil +} + +type MessagesSent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the L2 contract sending the message + FromAddress []byte `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + // The target L1 address the message is sent to + ToAddress []byte `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // The payload of the messageResourceBounds + Payload [][]byte `protobuf:"bytes,3,rep,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *MessagesSent) Reset() { + *x = MessagesSent{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MessagesSent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessagesSent) ProtoMessage() {} + +func (x *MessagesSent) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[4] + 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 MessagesSent.ProtoReflect.Descriptor instead. +func (*MessagesSent) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{4} +} + +func (x *MessagesSent) GetFromAddress() []byte { + if x != nil { + return x.FromAddress + } + return nil +} + +func (x *MessagesSent) GetToAddress() []byte { + if x != nil { + return x.ToAddress + } + return nil +} + +func (x *MessagesSent) GetPayload() [][]byte { + if x != nil { + return x.Payload + } + return nil +} + +type Event struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // From address + FromAddress []byte `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + Keys [][]byte `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"` + Data [][]byte `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"` +} + +func (x *Event) Reset() { + *x = Event{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[5] + 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 Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{5} +} + +func (x *Event) GetFromAddress() []byte { + if x != nil { + return x.FromAddress + } + return nil +} + +func (x *Event) GetKeys() [][]byte { + if x != nil { + return x.Keys + } + return nil +} + +func (x *Event) GetData() [][]byte { + if x != nil { + return x.Data + } + return nil +} + +type ExecutionResources struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The number of Cairo steps used + Steps uint64 `protobuf:"varint,1,opt,name=steps,proto3" json:"steps,omitempty"` + // The number of unused memory cells (each cell is roughly equivalent to a step) + MemoryHoles uint64 `protobuf:"varint,2,opt,name=memory_holes,json=memoryHoles,proto3" json:"memory_holes,omitempty"` + // The number of RANGE_CHECK builtin instances + RangeCheckBuiltinApplications uint64 `protobuf:"varint,3,opt,name=range_check_builtin_applications,json=rangeCheckBuiltinApplications,proto3" json:"range_check_builtin_applications,omitempty"` + // The number of Pedersen builtin instances + PedersenBuiltinApplications uint64 `protobuf:"varint,4,opt,name=pedersen_builtin_applications,json=pedersenBuiltinApplications,proto3" json:"pedersen_builtin_applications,omitempty"` + // The number of Poseidon builtin instances + PoseidonBuiltinApplications uint64 `protobuf:"varint,5,opt,name=poseidon_builtin_applications,json=poseidonBuiltinApplications,proto3" json:"poseidon_builtin_applications,omitempty"` + // the number of EC_OP builtin instances + EcOpBuiltinApplications uint64 `protobuf:"varint,6,opt,name=ec_op_builtin_applications,json=ecOpBuiltinApplications,proto3" json:"ec_op_builtin_applications,omitempty"` + // the number of ECDSA builtin instances + EcdsaBuiltinApplications uint64 `protobuf:"varint,7,opt,name=ecdsa_builtin_applications,json=ecdsaBuiltinApplications,proto3" json:"ecdsa_builtin_applications,omitempty"` + // the number of BITWISE builtin instances + BitwiseBuiltinApplications uint64 `protobuf:"varint,8,opt,name=bitwise_builtin_applications,json=bitwiseBuiltinApplications,proto3" json:"bitwise_builtin_applications,omitempty"` + // The number of KECCAK builtin instances + KeccakBuiltinApplications uint64 `protobuf:"varint,9,opt,name=keccak_builtin_applications,json=keccakBuiltinApplications,proto3" json:"keccak_builtin_applications,omitempty"` + // The number of accesses to the segment arena + SegmentArenaBuiltin uint64 `protobuf:"varint,10,opt,name=segment_arena_builtin,json=segmentArenaBuiltin,proto3" json:"segment_arena_builtin,omitempty"` + DataAvailability *DataAvailability `protobuf:"bytes,11,opt,name=data_availability,json=dataAvailability,proto3" json:"data_availability,omitempty"` +} + +func (x *ExecutionResources) Reset() { + *x = ExecutionResources{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionResources) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionResources) ProtoMessage() {} + +func (x *ExecutionResources) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[6] + 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 ExecutionResources.ProtoReflect.Descriptor instead. +func (*ExecutionResources) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{6} +} + +func (x *ExecutionResources) GetSteps() uint64 { + if x != nil { + return x.Steps + } + return 0 +} + +func (x *ExecutionResources) GetMemoryHoles() uint64 { + if x != nil { + return x.MemoryHoles + } + return 0 +} + +func (x *ExecutionResources) GetRangeCheckBuiltinApplications() uint64 { + if x != nil { + return x.RangeCheckBuiltinApplications + } + return 0 +} + +func (x *ExecutionResources) GetPedersenBuiltinApplications() uint64 { + if x != nil { + return x.PedersenBuiltinApplications + } + return 0 +} + +func (x *ExecutionResources) GetPoseidonBuiltinApplications() uint64 { + if x != nil { + return x.PoseidonBuiltinApplications + } + return 0 +} + +func (x *ExecutionResources) GetEcOpBuiltinApplications() uint64 { + if x != nil { + return x.EcOpBuiltinApplications + } + return 0 +} + +func (x *ExecutionResources) GetEcdsaBuiltinApplications() uint64 { + if x != nil { + return x.EcdsaBuiltinApplications + } + return 0 +} + +func (x *ExecutionResources) GetBitwiseBuiltinApplications() uint64 { + if x != nil { + return x.BitwiseBuiltinApplications + } + return 0 +} + +func (x *ExecutionResources) GetKeccakBuiltinApplications() uint64 { + if x != nil { + return x.KeccakBuiltinApplications + } + return 0 +} + +func (x *ExecutionResources) GetSegmentArenaBuiltin() uint64 { + if x != nil { + return x.SegmentArenaBuiltin + } + return 0 +} + +func (x *ExecutionResources) GetDataAvailability() *DataAvailability { + if x != nil { + return x.DataAvailability + } + return nil +} + +// invokes a specific function in the desired contract (not necessarily an account) +type InvokeTransactionV0 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximal fee that can be charged for including the transaction + MaxFee []byte `protobuf:"bytes,2,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,4,rep,name=signature,proto3" json:"signature,omitempty"` + ContractAddress []byte `protobuf:"bytes,5,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + EntryPointSelector []byte `protobuf:"bytes,6,opt,name=entry_point_selector,json=entryPointSelector,proto3" json:"entry_point_selector,omitempty"` + // The parameters passed to the function + Calldata [][]byte `protobuf:"bytes,7,rep,name=calldata,proto3" json:"calldata,omitempty"` +} + +func (x *InvokeTransactionV0) Reset() { + *x = InvokeTransactionV0{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvokeTransactionV0) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvokeTransactionV0) ProtoMessage() {} + +func (x *InvokeTransactionV0) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[7] + 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 InvokeTransactionV0.ProtoReflect.Descriptor instead. +func (*InvokeTransactionV0) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{7} +} + +func (x *InvokeTransactionV0) GetMaxFee() []byte { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *InvokeTransactionV0) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *InvokeTransactionV0) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *InvokeTransactionV0) GetContractAddress() []byte { + if x != nil { + return x.ContractAddress + } + return nil +} + +func (x *InvokeTransactionV0) GetEntryPointSelector() []byte { + if x != nil { + return x.EntryPointSelector + } + return nil +} + +func (x *InvokeTransactionV0) GetCalldata() [][]byte { + if x != nil { + return x.Calldata + } + return nil +} + +// initiates a transaction from a given account +type InvokeTransactionV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximal fee that can be charged for including the transaction + MaxFee []byte `protobuf:"bytes,1,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,3,rep,name=signature,proto3" json:"signature,omitempty"` + Nonce []byte `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` + // sender address + SenderAddress []byte `protobuf:"bytes,5,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // The data expected by the account's `execute` function (in most usecases, this includes the called contract address and a function selector) + Calldata [][]byte `protobuf:"bytes,6,rep,name=calldata,proto3" json:"calldata,omitempty"` +} + +func (x *InvokeTransactionV1) Reset() { + *x = InvokeTransactionV1{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvokeTransactionV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvokeTransactionV1) ProtoMessage() {} + +func (x *InvokeTransactionV1) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[8] + 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 InvokeTransactionV1.ProtoReflect.Descriptor instead. +func (*InvokeTransactionV1) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{8} +} + +func (x *InvokeTransactionV1) GetMaxFee() []byte { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *InvokeTransactionV1) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *InvokeTransactionV1) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *InvokeTransactionV1) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *InvokeTransactionV1) GetSenderAddress() []byte { + if x != nil { + return x.SenderAddress + } + return nil +} + +func (x *InvokeTransactionV1) GetCalldata() [][]byte { + if x != nil { + return x.Calldata + } + return nil +} + +// initiates a transaction from a given account +type InvokeTransactionV3 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SenderAddress []byte `protobuf:"bytes,2,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // The data expected by the account's `execute` function (in most usecases, this includes the called contract address and a function selector) + Calldata [][]byte `protobuf:"bytes,3,rep,name=calldata,proto3" json:"calldata,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,5,rep,name=signature,proto3" json:"signature,omitempty"` + Nonce []byte `protobuf:"bytes,6,opt,name=nonce,proto3" json:"nonce,omitempty"` + // resource bounds for the transaction execution + ResourceBounds *ResourceBounds `protobuf:"bytes,7,opt,name=resource_bounds,json=resourceBounds,proto3" json:"resource_bounds,omitempty"` + // the tip for the transaction + Tip []byte `protobuf:"bytes,8,opt,name=tip,proto3" json:"tip,omitempty"` + // data needed to allow the paymaster to pay for the transaction in native tokens + PaymasterData [][]byte `protobuf:"bytes,9,rep,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` + // data needed to deploy the account contract from which this tx will be initiated + AccountDeploymentData [][]byte `protobuf:"bytes,10,rep,name=account_deployment_data,json=accountDeploymentData,proto3" json:"account_deployment_data,omitempty"` + // The storage domain of the account's nonce (an account has a nonce per DA mode) + NonceDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,11,opt,name=nonce_data_availability_mode,json=nonceDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"nonce_data_availability_mode,omitempty"` + // The storage domain of the account's balance from which fee will be charged + FeeDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,12,opt,name=fee_data_availability_mode,json=feeDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"fee_data_availability_mode,omitempty"` +} + +func (x *InvokeTransactionV3) Reset() { + *x = InvokeTransactionV3{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvokeTransactionV3) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvokeTransactionV3) ProtoMessage() {} + +func (x *InvokeTransactionV3) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[9] + 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 InvokeTransactionV3.ProtoReflect.Descriptor instead. +func (*InvokeTransactionV3) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{9} +} + +func (x *InvokeTransactionV3) GetSenderAddress() []byte { + if x != nil { + return x.SenderAddress + } + return nil +} + +func (x *InvokeTransactionV3) GetCalldata() [][]byte { + if x != nil { + return x.Calldata + } + return nil +} + +func (x *InvokeTransactionV3) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *InvokeTransactionV3) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *InvokeTransactionV3) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *InvokeTransactionV3) GetResourceBounds() *ResourceBounds { + if x != nil { + return x.ResourceBounds + } + return nil +} + +func (x *InvokeTransactionV3) GetTip() []byte { + if x != nil { + return x.Tip + } + return nil +} + +func (x *InvokeTransactionV3) GetPaymasterData() [][]byte { + if x != nil { + return x.PaymasterData + } + return nil +} + +func (x *InvokeTransactionV3) GetAccountDeploymentData() [][]byte { + if x != nil { + return x.AccountDeploymentData + } + return nil +} + +func (x *InvokeTransactionV3) GetNonceDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { + if x != nil { + return x.NonceDataAvailabilityMode + } + return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN +} + +func (x *InvokeTransactionV3) GetFeeDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { + if x != nil { + return x.FeeDataAvailabilityMode + } + return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN +} + +// a call to an l1_handler on an L2 contract induced by a message from L1 +type L1HandlerTransaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Version of the transaction scheme + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Version of the transaction scheme + Nonce string `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + // The address of the contract whose class hash will be returned + ContractAddress []byte `protobuf:"bytes,4,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // Entry point selector + EntryPointSelector []byte `protobuf:"bytes,5,opt,name=entry_point_selector,json=entryPointSelector,proto3" json:"entry_point_selector,omitempty"` + // The parameters passed to the function + Calldata [][]byte `protobuf:"bytes,6,rep,name=calldata,proto3" json:"calldata,omitempty"` +} + +func (x *L1HandlerTransaction) Reset() { + *x = L1HandlerTransaction{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *L1HandlerTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*L1HandlerTransaction) ProtoMessage() {} + +func (x *L1HandlerTransaction) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[10] + 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 L1HandlerTransaction.ProtoReflect.Descriptor instead. +func (*L1HandlerTransaction) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{10} +} + +func (x *L1HandlerTransaction) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *L1HandlerTransaction) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +func (x *L1HandlerTransaction) GetContractAddress() []byte { + if x != nil { + return x.ContractAddress + } + return nil +} + +func (x *L1HandlerTransaction) GetEntryPointSelector() []byte { + if x != nil { + return x.EntryPointSelector + } + return nil +} + +func (x *L1HandlerTransaction) GetCalldata() [][]byte { + if x != nil { + return x.Calldata + } + return nil +} + +// Declare Contract Transaction V0 +type DeclareTransactionV0 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SenderAddress []byte `protobuf:"bytes,2,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // The maximal fee that can be charged for including the transaction + MaxFee []byte `protobuf:"bytes,3,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,5,rep,name=signature,proto3" json:"signature,omitempty"` + // The hash of the requested contract class + ClassHash []byte `protobuf:"bytes,6,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` +} + +func (x *DeclareTransactionV0) Reset() { + *x = DeclareTransactionV0{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeclareTransactionV0) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeclareTransactionV0) ProtoMessage() {} + +func (x *DeclareTransactionV0) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[11] + 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 DeclareTransactionV0.ProtoReflect.Descriptor instead. +func (*DeclareTransactionV0) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{11} +} + +func (x *DeclareTransactionV0) GetSenderAddress() []byte { + if x != nil { + return x.SenderAddress + } + return nil +} + +func (x *DeclareTransactionV0) GetMaxFee() []byte { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *DeclareTransactionV0) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *DeclareTransactionV0) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *DeclareTransactionV0) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +// Declare Contract Transaction V1 +type DeclareTransactionV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SenderAddress []byte `protobuf:"bytes,2,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // The maximal fee that can be charged for including the transaction + MaxFee []byte `protobuf:"bytes,3,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,5,rep,name=signature,proto3" json:"signature,omitempty"` + Nonce []byte `protobuf:"bytes,6,opt,name=nonce,proto3" json:"nonce,omitempty"` + // The hash of the requested contract class + ClassHash []byte `protobuf:"bytes,7,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` +} + +func (x *DeclareTransactionV1) Reset() { + *x = DeclareTransactionV1{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeclareTransactionV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeclareTransactionV1) ProtoMessage() {} + +func (x *DeclareTransactionV1) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[12] + 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 DeclareTransactionV1.ProtoReflect.Descriptor instead. +func (*DeclareTransactionV1) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{12} +} + +func (x *DeclareTransactionV1) GetSenderAddress() []byte { + if x != nil { + return x.SenderAddress + } + return nil +} + +func (x *DeclareTransactionV1) GetMaxFee() []byte { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *DeclareTransactionV1) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *DeclareTransactionV1) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *DeclareTransactionV1) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *DeclareTransactionV1) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +// Declare Contract Transaction V2 +type DeclareTransactionV2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SenderAddress []byte `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // The maximal fee that can be charged for including the transaction + CompiledClassHash []byte `protobuf:"bytes,2,opt,name=compiled_class_hash,json=compiledClassHash,proto3" json:"compiled_class_hash,omitempty"` + MaxFee []byte `protobuf:"bytes,3,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,5,rep,name=signature,proto3" json:"signature,omitempty"` + Nonce []byte `protobuf:"bytes,6,opt,name=nonce,proto3" json:"nonce,omitempty"` + // The hash of the requested contract class + ClassHash []byte `protobuf:"bytes,7,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` +} + +func (x *DeclareTransactionV2) Reset() { + *x = DeclareTransactionV2{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeclareTransactionV2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeclareTransactionV2) ProtoMessage() {} + +func (x *DeclareTransactionV2) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[13] + 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 DeclareTransactionV2.ProtoReflect.Descriptor instead. +func (*DeclareTransactionV2) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{13} +} + +func (x *DeclareTransactionV2) GetSenderAddress() []byte { + if x != nil { + return x.SenderAddress + } + return nil +} + +func (x *DeclareTransactionV2) GetCompiledClassHash() []byte { + if x != nil { + return x.CompiledClassHash + } + return nil +} + +func (x *DeclareTransactionV2) GetMaxFee() []byte { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *DeclareTransactionV2) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *DeclareTransactionV2) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *DeclareTransactionV2) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *DeclareTransactionV2) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +// Declare Contract Transaction V3 +type DeclareTransactionV3 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SenderAddress []byte `protobuf:"bytes,2,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // The hash of the Cairo assembly resulting from the Sierra compilation + CompiledClassHash []byte `protobuf:"bytes,3,opt,name=compiled_class_hash,json=compiledClassHash,proto3" json:"compiled_class_hash,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,5,rep,name=signature,proto3" json:"signature,omitempty"` + Nonce []byte `protobuf:"bytes,6,opt,name=nonce,proto3" json:"nonce,omitempty"` + // The hash of the requested contract class + ClassHash []byte `protobuf:"bytes,7,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + // resource bounds for the transaction execution + ResourceBounds *ResourceBounds `protobuf:"bytes,8,opt,name=resource_bounds,json=resourceBounds,proto3" json:"resource_bounds,omitempty"` + // the tip for the transaction + Tip []byte `protobuf:"bytes,9,opt,name=tip,proto3" json:"tip,omitempty"` + // data needed to allow the paymaster to pay for the transaction in native tokens + PaymasterData [][]byte `protobuf:"bytes,10,rep,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` + // data needed to deploy the account contract from which this tx will be initiated + AccountDeploymentData [][]byte `protobuf:"bytes,11,rep,name=account_deployment_data,json=accountDeploymentData,proto3" json:"account_deployment_data,omitempty"` + // The storage domain of the account's nonce (an account has a nonce per DA mode) + NonceDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,12,opt,name=nonce_data_availability_mode,json=nonceDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"nonce_data_availability_mode,omitempty"` + // The storage domain of the account's balance from which fee will be charged + FeeDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,13,opt,name=fee_data_availability_mode,json=feeDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"fee_data_availability_mode,omitempty"` +} + +func (x *DeclareTransactionV3) Reset() { + *x = DeclareTransactionV3{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeclareTransactionV3) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeclareTransactionV3) ProtoMessage() {} + +func (x *DeclareTransactionV3) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[14] + 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 DeclareTransactionV3.ProtoReflect.Descriptor instead. +func (*DeclareTransactionV3) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{14} +} + +func (x *DeclareTransactionV3) GetSenderAddress() []byte { + if x != nil { + return x.SenderAddress + } + return nil +} + +func (x *DeclareTransactionV3) GetCompiledClassHash() []byte { + if x != nil { + return x.CompiledClassHash + } + return nil +} + +func (x *DeclareTransactionV3) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *DeclareTransactionV3) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *DeclareTransactionV3) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *DeclareTransactionV3) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *DeclareTransactionV3) GetResourceBounds() *ResourceBounds { + if x != nil { + return x.ResourceBounds + } + return nil +} + +func (x *DeclareTransactionV3) GetTip() []byte { + if x != nil { + return x.Tip + } + return nil +} + +func (x *DeclareTransactionV3) GetPaymasterData() [][]byte { + if x != nil { + return x.PaymasterData + } + return nil +} + +func (x *DeclareTransactionV3) GetAccountDeploymentData() [][]byte { + if x != nil { + return x.AccountDeploymentData + } + return nil +} + +func (x *DeclareTransactionV3) GetNonceDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { + if x != nil { + return x.NonceDataAvailabilityMode + } + return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN +} + +func (x *DeclareTransactionV3) GetFeeDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { + if x != nil { + return x.FeeDataAvailabilityMode + } + return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN +} + +// deploys a new account contract +type DeployTransactionV0 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hash of the deployed contract's class + ClassHash []byte `protobuf:"bytes,1,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + // The salt for the address of the deployed contract + ContractAddressSalt []byte `protobuf:"bytes,3,opt,name=contract_address_salt,json=contractAddressSalt,proto3" json:"contract_address_salt,omitempty"` + // The parameters passed to the constructor + ConstructorCalldata [][]byte `protobuf:"bytes,4,rep,name=constructor_calldata,json=constructorCalldata,proto3" json:"constructor_calldata,omitempty"` +} + +func (x *DeployTransactionV0) Reset() { + *x = DeployTransactionV0{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployTransactionV0) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployTransactionV0) ProtoMessage() {} + +func (x *DeployTransactionV0) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[15] + 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 DeployTransactionV0.ProtoReflect.Descriptor instead. +func (*DeployTransactionV0) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{15} +} + +func (x *DeployTransactionV0) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *DeployTransactionV0) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *DeployTransactionV0) GetContractAddressSalt() []byte { + if x != nil { + return x.ContractAddressSalt + } + return nil +} + +func (x *DeployTransactionV0) GetConstructorCalldata() [][]byte { + if x != nil { + return x.ConstructorCalldata + } + return nil +} + +// Deploys an account contract, charges fee from the pre-funded account addresses +type DeployAccountTransactionV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximal fee that can be charged for including the transaction + MaxFee []byte `protobuf:"bytes,1,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + // Version of the transaction scheme + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,3,rep,name=signature,proto3" json:"signature,omitempty"` + Nonce []byte `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` + // The hash of the deployed contract's class + ClassHash []byte `protobuf:"bytes,5,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + // The salt for the address of the deployed contract + ContractAddressSalt []byte `protobuf:"bytes,6,opt,name=contract_address_salt,json=contractAddressSalt,proto3" json:"contract_address_salt,omitempty"` + // The parameters passed to the constructor + ConstructorCalldata [][]byte `protobuf:"bytes,7,rep,name=constructor_calldata,json=constructorCalldata,proto3" json:"constructor_calldata,omitempty"` +} + +func (x *DeployAccountTransactionV1) Reset() { + *x = DeployAccountTransactionV1{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployAccountTransactionV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployAccountTransactionV1) ProtoMessage() {} + +func (x *DeployAccountTransactionV1) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[16] + 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 DeployAccountTransactionV1.ProtoReflect.Descriptor instead. +func (*DeployAccountTransactionV1) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{16} +} + +func (x *DeployAccountTransactionV1) GetMaxFee() []byte { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *DeployAccountTransactionV1) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *DeployAccountTransactionV1) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *DeployAccountTransactionV1) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *DeployAccountTransactionV1) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *DeployAccountTransactionV1) GetContractAddressSalt() []byte { + if x != nil { + return x.ContractAddressSalt + } + return nil +} + +func (x *DeployAccountTransactionV1) GetConstructorCalldata() [][]byte { + if x != nil { + return x.ConstructorCalldata + } + return nil +} + +// Deploys an account contract, charges fee from the pre-funded account addresses +type DeployAccountTransactionV3 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Version of the transaction scheme + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Signature [][]byte `protobuf:"bytes,2,rep,name=signature,proto3" json:"signature,omitempty"` + Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + // The salt for the address of the deployed contract + ContractAddressSalt []byte `protobuf:"bytes,4,opt,name=contract_address_salt,json=contractAddressSalt,proto3" json:"contract_address_salt,omitempty"` + // The parameters passed to the constructor + ConstructorCalldata [][]byte `protobuf:"bytes,5,rep,name=constructor_calldata,json=constructorCalldata,proto3" json:"constructor_calldata,omitempty"` + // The hash of the deployed contract's class + ClassHash []byte `protobuf:"bytes,6,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + // resource bounds for the transaction execution + ResourceBounds *ResourceBounds `protobuf:"bytes,7,opt,name=resource_bounds,json=resourceBounds,proto3" json:"resource_bounds,omitempty"` + // the tip for the transaction + Tip []byte `protobuf:"bytes,8,opt,name=tip,proto3" json:"tip,omitempty"` + // data needed to allow the paymaster to pay for the transaction in native tokens + PaymasterData [][]byte `protobuf:"bytes,9,rep,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` + // The storage domain of the account's nonce (an account has a nonce per DA mode) + NonceDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,11,opt,name=nonce_data_availability_mode,json=nonceDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"nonce_data_availability_mode,omitempty"` + // The storage domain of the account's balance from which fee will be charged + FeeDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,12,opt,name=fee_data_availability_mode,json=feeDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"fee_data_availability_mode,omitempty"` +} + +func (x *DeployAccountTransactionV3) Reset() { + *x = DeployAccountTransactionV3{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployAccountTransactionV3) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployAccountTransactionV3) ProtoMessage() {} + +func (x *DeployAccountTransactionV3) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[17] + 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 DeployAccountTransactionV3.ProtoReflect.Descriptor instead. +func (*DeployAccountTransactionV3) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{17} +} + +func (x *DeployAccountTransactionV3) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *DeployAccountTransactionV3) GetSignature() [][]byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *DeployAccountTransactionV3) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *DeployAccountTransactionV3) GetContractAddressSalt() []byte { + if x != nil { + return x.ContractAddressSalt + } + return nil +} + +func (x *DeployAccountTransactionV3) GetConstructorCalldata() [][]byte { + if x != nil { + return x.ConstructorCalldata + } + return nil +} + +func (x *DeployAccountTransactionV3) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *DeployAccountTransactionV3) GetResourceBounds() *ResourceBounds { + if x != nil { + return x.ResourceBounds + } + return nil +} + +func (x *DeployAccountTransactionV3) GetTip() []byte { + if x != nil { + return x.Tip + } + return nil +} + +func (x *DeployAccountTransactionV3) GetPaymasterData() [][]byte { + if x != nil { + return x.PaymasterData + } + return nil +} + +func (x *DeployAccountTransactionV3) GetNonceDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { + if x != nil { + return x.NonceDataAvailabilityMode + } + return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN +} + +func (x *DeployAccountTransactionV3) GetFeeDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { + if x != nil { + return x.FeeDataAvailabilityMode + } + return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN +} + +type ResourceBounds struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The max amount and max price per unit of L1 gas used in this tx + L1Gas *Resource `protobuf:"bytes,1,opt,name=l1_gas,json=l1Gas,proto3" json:"l1_gas,omitempty"` + // The max amount and max price per unit of L2 gas used in this tx + L2Gas *Resource `protobuf:"bytes,2,opt,name=l2_gas,json=l2Gas,proto3" json:"l2_gas,omitempty"` +} + +func (x *ResourceBounds) Reset() { + *x = ResourceBounds{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceBounds) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceBounds) ProtoMessage() {} + +func (x *ResourceBounds) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[18] + 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 ResourceBounds.ProtoReflect.Descriptor instead. +func (*ResourceBounds) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{18} +} + +func (x *ResourceBounds) GetL1Gas() *Resource { + if x != nil { + return x.L1Gas + } + return nil +} + +func (x *ResourceBounds) GetL2Gas() *Resource { + if x != nil { + return x.L2Gas + } + return nil +} + +type Resource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the max amount of the resource that can be used in the tx + MaxAmount string `protobuf:"bytes,1,opt,name=max_amount,json=maxAmount,proto3" json:"max_amount,omitempty"` + // the max price per unit of this resource for this tx + MaxPricePerUnit string `protobuf:"bytes,2,opt,name=max_price_per_unit,json=maxPricePerUnit,proto3" json:"max_price_per_unit,omitempty"` +} + +func (x *Resource) Reset() { + *x = Resource{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Resource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Resource) ProtoMessage() {} + +func (x *Resource) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[19] + 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 Resource.ProtoReflect.Descriptor instead. +func (*Resource) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{19} +} + +func (x *Resource) GetMaxAmount() string { + if x != nil { + return x.MaxAmount + } + return "" +} + +func (x *Resource) GetMaxPricePerUnit() string { + if x != nil { + return x.MaxPricePerUnit + } + return "" +} + +type Receipt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The fee that was charged by the sequencer + ActualFee *ActualFee `protobuf:"bytes,1,opt,name=actual_fee,json=actualFee,proto3" json:"actual_fee,omitempty"` +} + +func (x *Receipt) Reset() { + *x = Receipt{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Receipt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Receipt) ProtoMessage() {} + +func (x *Receipt) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[20] + 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 Receipt.ProtoReflect.Descriptor instead. +func (*Receipt) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{20} +} + +func (x *Receipt) GetActualFee() *ActualFee { + if x != nil { + return x.ActualFee + } + return nil +} + +type ActualFee struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // amount paid + Amount []byte `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` + // units in which the fee is given + Unit string `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"` +} + +func (x *ActualFee) Reset() { + *x = ActualFee{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActualFee) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActualFee) ProtoMessage() {} + +func (x *ActualFee) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[21] + 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 ActualFee.ProtoReflect.Descriptor instead. +func (*ActualFee) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{21} +} + +func (x *ActualFee) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *ActualFee) GetUnit() string { + if x != nil { + return x.Unit + } + return "" +} + +type DataAvailability struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the data gas consumed by this transaction's data, 0 if it uses gas for DA + L1Gas uint64 `protobuf:"varint,1,opt,name=l1_gas,json=l1Gas,proto3" json:"l1_gas,omitempty"` + // the gas consumed by this transaction's data, 0 if it uses data gas for DA + L1DataGas uint64 `protobuf:"varint,2,opt,name=l1_data_gas,json=l1DataGas,proto3" json:"l1_data_gas,omitempty"` +} + +func (x *DataAvailability) Reset() { + *x = DataAvailability{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataAvailability) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataAvailability) ProtoMessage() {} + +func (x *DataAvailability) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[22] + 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 DataAvailability.ProtoReflect.Descriptor instead. +func (*DataAvailability) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{22} +} + +func (x *DataAvailability) GetL1Gas() uint64 { + if x != nil { + return x.L1Gas + } + return 0 +} + +func (x *DataAvailability) GetL1DataGas() uint64 { + if x != nil { + return x.L1DataGas + } + return 0 +} + +// State update +type StateUpdate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The new global state root + NewRoot []byte `protobuf:"bytes,2,opt,name=new_root,json=newRoot,proto3" json:"new_root,omitempty"` + // The previous global state root + OldRoot []byte `protobuf:"bytes,1,opt,name=old_root,json=oldRoot,proto3" json:"old_root,omitempty"` + // The change in state applied in this block, given as a mapping of addresses to the new values and/or new contracts + StateDiff *StateDiff `protobuf:"bytes,3,opt,name=state_diff,json=stateDiff,proto3" json:"state_diff,omitempty"` +} + +func (x *StateUpdate) Reset() { + *x = StateUpdate{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StateUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StateUpdate) ProtoMessage() {} + +func (x *StateUpdate) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[23] + 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 StateUpdate.ProtoReflect.Descriptor instead. +func (*StateUpdate) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{23} +} + +func (x *StateUpdate) GetNewRoot() []byte { + if x != nil { + return x.NewRoot + } + return nil +} + +func (x *StateUpdate) GetOldRoot() []byte { + if x != nil { + return x.OldRoot + } + return nil +} + +func (x *StateUpdate) GetStateDiff() *StateDiff { + if x != nil { + return x.StateDiff + } + return nil +} + +// The change in state applied in this block, given as a mapping of addresses to the new values and/or new contracts +type StateDiff struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The changes in the storage per contract address + StorageDiffs []*ContractStorageDiff `protobuf:"bytes,1,rep,name=storage_diffs,json=storageDiffs,proto3" json:"storage_diffs,omitempty"` + // The hash of the declared class + DeprecatedDeclaredClasses [][]byte `protobuf:"bytes,2,rep,name=deprecated_declared_classes,json=deprecatedDeclaredClasses,proto3" json:"deprecated_declared_classes,omitempty"` + // The declared class hash and compiled class hash + DeclaredClasses []*DeclaredClass `protobuf:"bytes,3,rep,name=declared_classes,json=declaredClasses,proto3" json:"declared_classes,omitempty"` + // A new contract deployed as part of the state update + DeployedContracts []*DeployedContract `protobuf:"bytes,4,rep,name=deployed_contracts,json=deployedContracts,proto3" json:"deployed_contracts,omitempty"` + // The list of contracts whose class was replaced + ReplacedClasses []*ReplacedClass `protobuf:"bytes,5,rep,name=replaced_classes,json=replacedClasses,proto3" json:"replaced_classes,omitempty"` + // The updated nonce per contract address + Nonces []*NonceDiff `protobuf:"bytes,6,rep,name=nonces,proto3" json:"nonces,omitempty"` //Do we need this? +} + +func (x *StateDiff) Reset() { + *x = StateDiff{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StateDiff) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StateDiff) ProtoMessage() {} + +func (x *StateDiff) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[24] + 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 StateDiff.ProtoReflect.Descriptor instead. +func (*StateDiff) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{24} +} + +func (x *StateDiff) GetStorageDiffs() []*ContractStorageDiff { + if x != nil { + return x.StorageDiffs + } + return nil +} + +func (x *StateDiff) GetDeprecatedDeclaredClasses() [][]byte { + if x != nil { + return x.DeprecatedDeclaredClasses + } + return nil +} + +func (x *StateDiff) GetDeclaredClasses() []*DeclaredClass { + if x != nil { + return x.DeclaredClasses + } + return nil +} + +func (x *StateDiff) GetDeployedContracts() []*DeployedContract { + if x != nil { + return x.DeployedContracts + } + return nil +} + +func (x *StateDiff) GetReplacedClasses() []*ReplacedClass { + if x != nil { + return x.ReplacedClasses + } + return nil +} + +func (x *StateDiff) GetNonces() []*NonceDiff { + if x != nil { + return x.Nonces + } + return nil +} + +type NonceDiff struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // "The address of the contract + ContractAddress []byte `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // The nonce for the given address at the end of the block + Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` +} + +func (x *NonceDiff) Reset() { + *x = NonceDiff{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NonceDiff) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NonceDiff) ProtoMessage() {} + +func (x *NonceDiff) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[25] + 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 NonceDiff.ProtoReflect.Descriptor instead. +func (*NonceDiff) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{25} +} + +func (x *NonceDiff) GetContractAddress() []byte { + if x != nil { + return x.ContractAddress + } + return nil +} + +func (x *NonceDiff) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +type ReplacedClass struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the contract whose class was replaced + ContractAddress []byte `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // The new class hash + ClassHash []byte `protobuf:"bytes,2,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` +} + +func (x *ReplacedClass) Reset() { + *x = ReplacedClass{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReplacedClass) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReplacedClass) ProtoMessage() {} + +func (x *ReplacedClass) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[26] + 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 ReplacedClass.ProtoReflect.Descriptor instead. +func (*ReplacedClass) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{26} +} + +func (x *ReplacedClass) GetContractAddress() []byte { + if x != nil { + return x.ContractAddress + } + return nil +} + +func (x *ReplacedClass) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +type DeployedContract struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the contract + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // The hash of the contract code + ClassHash []byte `protobuf:"bytes,2,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` +} + +func (x *DeployedContract) Reset() { + *x = DeployedContract{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployedContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployedContract) ProtoMessage() {} + +func (x *DeployedContract) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[27] + 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 DeployedContract.ProtoReflect.Descriptor instead. +func (*DeployedContract) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{27} +} + +func (x *DeployedContract) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *DeployedContract) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +type DeclaredClass struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hash of the declared class + ClassHash []byte `protobuf:"bytes,1,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + // The Cairo assembly hash corresponding to the declared class + CompiledClassHash []byte `protobuf:"bytes,2,opt,name=compiled_class_hash,json=compiledClassHash,proto3" json:"compiled_class_hash,omitempty"` +} + +func (x *DeclaredClass) Reset() { + *x = DeclaredClass{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeclaredClass) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeclaredClass) ProtoMessage() {} + +func (x *DeclaredClass) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[28] + 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 DeclaredClass.ProtoReflect.Descriptor instead. +func (*DeclaredClass) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{28} +} + +func (x *DeclaredClass) GetClassHash() []byte { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *DeclaredClass) GetCompiledClassHash() []byte { + if x != nil { + return x.CompiledClassHash + } + return nil +} + +type ContractStorageDiff struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the contract + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // The changes in the storage of the contract + StorageEntries []*StorageEntries `protobuf:"bytes,2,rep,name=storage_entries,json=storageEntries,proto3" json:"storage_entries,omitempty"` +} + +func (x *ContractStorageDiff) Reset() { + *x = ContractStorageDiff{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContractStorageDiff) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContractStorageDiff) ProtoMessage() {} + +func (x *ContractStorageDiff) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[29] + 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 ContractStorageDiff.ProtoReflect.Descriptor instead. +func (*ContractStorageDiff) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{29} +} + +func (x *ContractStorageDiff) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *ContractStorageDiff) GetStorageEntries() []*StorageEntries { + if x != nil { + return x.StorageEntries + } + return nil +} + +type StorageEntries struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The key of the changed value + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // The new value applied to the given address + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *StorageEntries) Reset() { + *x = StorageEntries{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageEntries) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageEntries) ProtoMessage() {} + +func (x *StorageEntries) ProtoReflect() protoreflect.Message { + mi := &file_sf_starknet_type_v1_block_proto_msgTypes[30] + 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 StorageEntries.ProtoReflect.Descriptor instead. +func (*StorageEntries) Descriptor() ([]byte, []int) { + return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{30} +} + +func (x *StorageEntries) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} + +func (x *StorageEntries) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +var File_sf_starknet_type_v1_block_proto protoreflect.FileDescriptor + +var file_sf_starknet_type_v1_block_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x73, 0x66, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x13, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x04, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x52, 0x6f, 0x6f, 0x74, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2b, 0x0a, + 0x11, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x44, 0x0a, 0x0c, 0x6c, 0x31, + 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x52, 0x0a, 0x6c, 0x31, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x12, 0x4d, 0x0a, 0x11, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x67, 0x61, 0x73, 0x5f, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, + 0x0e, 0x6c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, + 0x3d, 0x0a, 0x0a, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, + 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x31, 0x5f, 0x44, 0x41, 0x5f, + 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x08, 0x6c, 0x31, 0x44, 0x61, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x29, + 0x0a, 0x10, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, + 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x0c, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x0c, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, + 0x53, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x12, 0x20, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x72, 0x69, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x46, + 0x72, 0x69, 0x12, 0x20, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x5f, 0x77, + 0x65, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x63, 0x65, 0x49, + 0x6e, 0x57, 0x65, 0x69, 0x22, 0xc5, 0x09, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, + 0x5e, 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x48, 0x00, 0x52, 0x13, 0x69, 0x6e, 0x76, 0x6f, + 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x12, + 0x5e, 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x13, 0x69, 0x6e, 0x76, 0x6f, + 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, + 0x5e, 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x48, 0x00, 0x52, 0x13, 0x69, 0x6e, 0x76, 0x6f, + 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x12, + 0x61, 0x0a, 0x16, 0x6c, 0x31, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x29, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, 0x6c, 0x31, + 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x61, 0x0a, 0x16, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x30, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x48, 0x00, 0x52, + 0x14, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x12, 0x61, 0x0a, 0x16, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x31, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, + 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, + 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, + 0x48, 0x00, 0x52, 0x14, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, 0x61, 0x0a, 0x16, 0x64, 0x65, 0x63, 0x6c, + 0x61, 0x72, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x76, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, + 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x56, 0x32, 0x48, 0x00, 0x52, 0x14, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x12, 0x61, 0x0a, 0x16, 0x64, + 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x76, 0x33, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x48, 0x00, 0x52, 0x14, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, + 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x12, 0x5e, + 0x0a, 0x15, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x30, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x48, 0x00, 0x52, 0x13, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x12, 0x74, + 0x0a, 0x1d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x31, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, + 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x1a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x56, 0x31, 0x12, 0x74, 0x0a, 0x1d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x76, 0x33, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x48, 0x00, 0x52, 0x1a, + 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x12, 0x41, 0x0a, 0x07, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x70, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, + 0x65, 0x69, 0x70, 0x74, 0x52, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x42, 0x0d, 0x0a, + 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd4, 0x04, 0x0a, + 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x70, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x3d, + 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, + 0x65, 0x65, 0x52, 0x09, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x12, 0x50, 0x0a, + 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, + 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x58, + 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x52, 0x0f, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x46, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, + 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x66, 0x2e, 0x73, + 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x66, 0x2e, + 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x58, + 0x0a, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x52, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0x6a, 0x0a, 0x0c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x53, + 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 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, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, + 0x52, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, + 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, + 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, + 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x22, 0xa3, 0x05, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, + 0x65, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, + 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x6c, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x48, 0x6f, + 0x6c, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x20, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1d, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, + 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x1d, + 0x70, 0x65, 0x64, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, + 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x1b, 0x70, 0x65, 0x64, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x42, 0x75, 0x69, + 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x42, 0x0a, 0x1d, 0x70, 0x6f, 0x73, 0x65, 0x69, 0x64, 0x6f, 0x6e, 0x5f, 0x62, 0x75, 0x69, + 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1b, 0x70, 0x6f, 0x73, 0x65, 0x69, 0x64, 0x6f, + 0x6e, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x65, 0x63, 0x5f, 0x6f, 0x70, 0x5f, 0x62, 0x75, + 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x65, 0x63, 0x4f, 0x70, 0x42, 0x75, + 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x3c, 0x0a, 0x1a, 0x65, 0x63, 0x64, 0x73, 0x61, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, + 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x18, 0x65, 0x63, 0x64, 0x73, 0x61, 0x42, 0x75, 0x69, 0x6c, + 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x40, 0x0a, 0x1c, 0x62, 0x69, 0x74, 0x77, 0x69, 0x73, 0x65, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, + 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1a, 0x62, 0x69, 0x74, 0x77, 0x69, 0x73, 0x65, 0x42, 0x75, + 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x3e, 0x0a, 0x1b, 0x6b, 0x65, 0x63, 0x63, 0x61, 0x6b, 0x5f, 0x62, 0x75, 0x69, 0x6c, + 0x74, 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x6b, 0x65, 0x63, 0x63, 0x61, 0x6b, 0x42, 0x75, + 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x72, 0x65, + 0x6e, 0x61, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x13, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x42, 0x75, + 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x12, 0x52, 0x0a, 0x11, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x10, 0x64, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xdf, 0x01, 0x0a, 0x13, 0x49, 0x6e, + 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, + 0x30, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, + 0x14, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, + 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0c, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x22, 0xbf, 0x01, 0x0a, 0x13, + 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x56, 0x31, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x22, 0xc5, 0x04, + 0x0a, 0x13, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, + 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, + 0x75, 0x6e, 0x64, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, + 0x75, 0x6e, 0x64, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x03, 0x74, 0x69, 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, + 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, + 0x17, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x15, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x70, 0x0a, 0x1c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, + 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x19, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x6c, 0x0a, 0x1a, 0x66, 0x65, 0x65, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, + 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x17, 0x66, 0x65, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x14, 0x4c, 0x31, 0x48, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x29, + 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x63, + 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x63, + 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x22, 0xad, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6c, + 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, + 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, + 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0xc3, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6c, + 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, + 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, + 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0xf3, 0x01, + 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, + 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x17, 0x0a, + 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, + 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, + 0x61, 0x73, 0x68, 0x22, 0xf9, 0x04, 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x12, 0x25, 0x0a, 0x0e, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, + 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x66, 0x2e, 0x73, + 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x0e, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x10, + 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x69, 0x70, + 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, + 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x17, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x15, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x70, 0x0a, 0x1c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, + 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, + 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, + 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x19, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, + 0x65, 0x12, 0x6c, 0x0a, 0x1a, 0x66, 0x65, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, + 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, + 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, + 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x17, 0x66, 0x65, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x22, + 0xb5, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x61, 0x6c, 0x74, 0x12, 0x31, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0c, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x43, + 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x22, 0x89, 0x02, 0x0a, 0x1a, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x32, 0x0a, 0x15, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x61, 0x6c, 0x74, + 0x12, 0x31, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x5f, + 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x13, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x64, + 0x61, 0x74, 0x61, 0x22, 0xd7, 0x04, 0x0a, 0x1a, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x56, 0x33, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x61, 0x6c, 0x74, 0x12, 0x31, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0c, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x43, + 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, + 0x75, 0x6e, 0x64, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, + 0x75, 0x6e, 0x64, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x03, 0x74, 0x69, 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, + 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x70, 0x0a, + 0x1c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, + 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, 0x44, 0x41, + 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, + 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x19, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, + 0x6c, 0x0a, 0x1a, 0x66, 0x65, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, + 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, 0x44, 0x41, + 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, + 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x17, 0x66, 0x65, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x7c, 0x0a, + 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, + 0x34, 0x0a, 0x06, 0x6c, 0x31, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x05, + 0x6c, 0x31, 0x47, 0x61, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x6c, 0x32, 0x5f, 0x67, 0x61, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, + 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x05, 0x6c, 0x32, 0x47, 0x61, 0x73, 0x22, 0x56, 0x0a, 0x08, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x78, + 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x63, 0x65, 0x50, 0x65, 0x72, 0x55, + 0x6e, 0x69, 0x74, 0x22, 0x48, 0x0a, 0x07, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x3d, + 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, + 0x65, 0x65, 0x52, 0x09, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x22, 0x37, 0x0a, + 0x09, 0x41, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x49, 0x0a, 0x10, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6c, 0x31, + 0x5f, 0x67, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x31, 0x47, 0x61, + 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x67, 0x61, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x47, 0x61, + 0x73, 0x22, 0x82, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x19, 0x0a, 0x08, + 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, + 0x6f, 0x6c, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x3d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x5f, 0x64, 0x69, 0x66, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x22, 0xc6, 0x03, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x44, 0x69, 0x66, 0x66, 0x12, 0x4d, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, + 0x64, 0x69, 0x66, 0x66, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x69, + 0x66, 0x66, 0x73, 0x12, 0x3e, 0x0a, 0x1b, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x19, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x5f, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x52, 0x0f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x65, 0x73, 0x12, 0x54, 0x0a, 0x12, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x11, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, + 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, + 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, + 0x6e, 0x63, 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x22, + 0x4c, 0x0a, 0x09, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x44, 0x69, 0x66, 0x66, 0x12, 0x29, 0x0a, 0x10, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x59, 0x0a, + 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x29, + 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0x4b, 0x0a, 0x10, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0x5e, 0x0a, 0x0d, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, + 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0x7d, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x69, 0x66, 0x66, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x52, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x22, 0x38, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x45, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0x3c, + 0x0a, 0x0a, 0x4c, 0x31, 0x5f, 0x44, 0x41, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x12, 0x16, 0x0a, 0x12, + 0x4c, 0x31, 0x5f, 0x44, 0x41, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4c, 0x4c, 0x44, 0x41, 0x54, 0x41, + 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4c, 0x4f, 0x42, 0x10, 0x02, 0x2a, 0x54, 0x0a, 0x1a, + 0x46, 0x45, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, + 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x12, 0x26, 0x0a, 0x22, 0x46, 0x45, + 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x49, 0x4c, + 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x31, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x32, + 0x10, 0x02, 0x2a, 0x79, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x12, 0x1c, 0x0a, 0x18, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x4e, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x01, + 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x43, 0x4c, 0x41, 0x52, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, + 0x06, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x50, + 0x4c, 0x4f, 0x59, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x04, 0x12, 0x0e, 0x0a, + 0x0a, 0x4c, 0x31, 0x5f, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x52, 0x10, 0x05, 0x2a, 0x6d, 0x0a, + 0x10, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x1c, 0x0a, 0x18, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, + 0x19, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x45, 0x44, 0x10, 0x02, 0x42, 0xfb, 0x01, 0x0a, + 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x65, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, + 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2d, 0x66, 0x6f, 0x75, 0x6e, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x70, 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x53, 0x53, 0x54, 0xaa, 0x02, 0x13, 0x53, 0x66, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, + 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x53, 0x66, 0x5c, 0x53, + 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x1f, 0x53, 0x66, 0x5c, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x5c, 0x54, 0x79, + 0x70, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x16, 0x53, 0x66, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, + 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_sf_starknet_type_v1_block_proto_rawDescOnce sync.Once + file_sf_starknet_type_v1_block_proto_rawDescData = file_sf_starknet_type_v1_block_proto_rawDesc +) + +func file_sf_starknet_type_v1_block_proto_rawDescGZIP() []byte { + file_sf_starknet_type_v1_block_proto_rawDescOnce.Do(func() { + file_sf_starknet_type_v1_block_proto_rawDescData = protoimpl.X.CompressGZIP(file_sf_starknet_type_v1_block_proto_rawDescData) + }) + return file_sf_starknet_type_v1_block_proto_rawDescData +} + +var file_sf_starknet_type_v1_block_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_sf_starknet_type_v1_block_proto_msgTypes = make([]protoimpl.MessageInfo, 31) +var file_sf_starknet_type_v1_block_proto_goTypes = []interface{}{ + (L1_DA_MODE)(0), // 0: sf.starknet.type.v1.L1_DA_MODE + (FEE_DATA_AVAILABILITY_MODE)(0), // 1: sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE + (TRANSACTION_TYPE)(0), // 2: sf.starknet.type.v1.TRANSACTION_TYPE + (EXECUTION_STATUS)(0), // 3: sf.starknet.type.v1.EXECUTION_STATUS + (*Block)(nil), // 4: sf.starknet.type.v1.Block + (*ResourcePrice)(nil), // 5: sf.starknet.type.v1.ResourcePrice + (*TransactionWithReceipt)(nil), // 6: sf.starknet.type.v1.TransactionWithReceipt + (*TransactionReceipt)(nil), // 7: sf.starknet.type.v1.TransactionReceipt + (*MessagesSent)(nil), // 8: sf.starknet.type.v1.MessagesSent + (*Event)(nil), // 9: sf.starknet.type.v1.Event + (*ExecutionResources)(nil), // 10: sf.starknet.type.v1.ExecutionResources + (*InvokeTransactionV0)(nil), // 11: sf.starknet.type.v1.InvokeTransactionV0 + (*InvokeTransactionV1)(nil), // 12: sf.starknet.type.v1.InvokeTransactionV1 + (*InvokeTransactionV3)(nil), // 13: sf.starknet.type.v1.InvokeTransactionV3 + (*L1HandlerTransaction)(nil), // 14: sf.starknet.type.v1.L1HandlerTransaction + (*DeclareTransactionV0)(nil), // 15: sf.starknet.type.v1.DeclareTransactionV0 + (*DeclareTransactionV1)(nil), // 16: sf.starknet.type.v1.DeclareTransactionV1 + (*DeclareTransactionV2)(nil), // 17: sf.starknet.type.v1.DeclareTransactionV2 + (*DeclareTransactionV3)(nil), // 18: sf.starknet.type.v1.DeclareTransactionV3 + (*DeployTransactionV0)(nil), // 19: sf.starknet.type.v1.DeployTransactionV0 + (*DeployAccountTransactionV1)(nil), // 20: sf.starknet.type.v1.DeployAccountTransactionV1 + (*DeployAccountTransactionV3)(nil), // 21: sf.starknet.type.v1.DeployAccountTransactionV3 + (*ResourceBounds)(nil), // 22: sf.starknet.type.v1.ResourceBounds + (*Resource)(nil), // 23: sf.starknet.type.v1.Resource + (*Receipt)(nil), // 24: sf.starknet.type.v1.Receipt + (*ActualFee)(nil), // 25: sf.starknet.type.v1.ActualFee + (*DataAvailability)(nil), // 26: sf.starknet.type.v1.DataAvailability + (*StateUpdate)(nil), // 27: sf.starknet.type.v1.StateUpdate + (*StateDiff)(nil), // 28: sf.starknet.type.v1.StateDiff + (*NonceDiff)(nil), // 29: sf.starknet.type.v1.NonceDiff + (*ReplacedClass)(nil), // 30: sf.starknet.type.v1.ReplacedClass + (*DeployedContract)(nil), // 31: sf.starknet.type.v1.DeployedContract + (*DeclaredClass)(nil), // 32: sf.starknet.type.v1.DeclaredClass + (*ContractStorageDiff)(nil), // 33: sf.starknet.type.v1.ContractStorageDiff + (*StorageEntries)(nil), // 34: sf.starknet.type.v1.StorageEntries +} +var file_sf_starknet_type_v1_block_proto_depIdxs = []int32{ + 5, // 0: sf.starknet.type.v1.Block.l1_gas_price:type_name -> sf.starknet.type.v1.ResourcePrice + 5, // 1: sf.starknet.type.v1.Block.l1_data_gas_price:type_name -> sf.starknet.type.v1.ResourcePrice + 0, // 2: sf.starknet.type.v1.Block.l1_da_mode:type_name -> sf.starknet.type.v1.L1_DA_MODE + 6, // 3: sf.starknet.type.v1.Block.transactions:type_name -> sf.starknet.type.v1.TransactionWithReceipt + 27, // 4: sf.starknet.type.v1.Block.state_update:type_name -> sf.starknet.type.v1.StateUpdate + 11, // 5: sf.starknet.type.v1.TransactionWithReceipt.invoke_transaction_v0:type_name -> sf.starknet.type.v1.InvokeTransactionV0 + 12, // 6: sf.starknet.type.v1.TransactionWithReceipt.invoke_transaction_v1:type_name -> sf.starknet.type.v1.InvokeTransactionV1 + 13, // 7: sf.starknet.type.v1.TransactionWithReceipt.invoke_transaction_v3:type_name -> sf.starknet.type.v1.InvokeTransactionV3 + 14, // 8: sf.starknet.type.v1.TransactionWithReceipt.l1_handler_transaction:type_name -> sf.starknet.type.v1.L1HandlerTransaction + 15, // 9: sf.starknet.type.v1.TransactionWithReceipt.declare_transaction_v0:type_name -> sf.starknet.type.v1.DeclareTransactionV0 + 16, // 10: sf.starknet.type.v1.TransactionWithReceipt.declare_transaction_v1:type_name -> sf.starknet.type.v1.DeclareTransactionV1 + 17, // 11: sf.starknet.type.v1.TransactionWithReceipt.declare_transaction_v2:type_name -> sf.starknet.type.v1.DeclareTransactionV2 + 18, // 12: sf.starknet.type.v1.TransactionWithReceipt.declare_transaction_v3:type_name -> sf.starknet.type.v1.DeclareTransactionV3 + 19, // 13: sf.starknet.type.v1.TransactionWithReceipt.deploy_transaction_v0:type_name -> sf.starknet.type.v1.DeployTransactionV0 + 20, // 14: sf.starknet.type.v1.TransactionWithReceipt.deploy_account_transaction_v1:type_name -> sf.starknet.type.v1.DeployAccountTransactionV1 + 21, // 15: sf.starknet.type.v1.TransactionWithReceipt.deploy_account_transaction_v3:type_name -> sf.starknet.type.v1.DeployAccountTransactionV3 + 7, // 16: sf.starknet.type.v1.TransactionWithReceipt.receipt:type_name -> sf.starknet.type.v1.TransactionReceipt + 25, // 17: sf.starknet.type.v1.TransactionReceipt.actual_fee:type_name -> sf.starknet.type.v1.ActualFee + 3, // 18: sf.starknet.type.v1.TransactionReceipt.execution_status:type_name -> sf.starknet.type.v1.EXECUTION_STATUS + 2, // 19: sf.starknet.type.v1.TransactionReceipt.type:type_name -> sf.starknet.type.v1.TRANSACTION_TYPE + 8, // 20: sf.starknet.type.v1.TransactionReceipt.messages_sent:type_name -> sf.starknet.type.v1.MessagesSent + 9, // 21: sf.starknet.type.v1.TransactionReceipt.events:type_name -> sf.starknet.type.v1.Event + 10, // 22: sf.starknet.type.v1.TransactionReceipt.execution_resources:type_name -> sf.starknet.type.v1.ExecutionResources + 26, // 23: sf.starknet.type.v1.ExecutionResources.data_availability:type_name -> sf.starknet.type.v1.DataAvailability + 22, // 24: sf.starknet.type.v1.InvokeTransactionV3.resource_bounds:type_name -> sf.starknet.type.v1.ResourceBounds + 1, // 25: sf.starknet.type.v1.InvokeTransactionV3.nonce_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE + 1, // 26: sf.starknet.type.v1.InvokeTransactionV3.fee_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE + 22, // 27: sf.starknet.type.v1.DeclareTransactionV3.resource_bounds:type_name -> sf.starknet.type.v1.ResourceBounds + 1, // 28: sf.starknet.type.v1.DeclareTransactionV3.nonce_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE + 1, // 29: sf.starknet.type.v1.DeclareTransactionV3.fee_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE + 22, // 30: sf.starknet.type.v1.DeployAccountTransactionV3.resource_bounds:type_name -> sf.starknet.type.v1.ResourceBounds + 1, // 31: sf.starknet.type.v1.DeployAccountTransactionV3.nonce_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE + 1, // 32: sf.starknet.type.v1.DeployAccountTransactionV3.fee_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE + 23, // 33: sf.starknet.type.v1.ResourceBounds.l1_gas:type_name -> sf.starknet.type.v1.Resource + 23, // 34: sf.starknet.type.v1.ResourceBounds.l2_gas:type_name -> sf.starknet.type.v1.Resource + 25, // 35: sf.starknet.type.v1.Receipt.actual_fee:type_name -> sf.starknet.type.v1.ActualFee + 28, // 36: sf.starknet.type.v1.StateUpdate.state_diff:type_name -> sf.starknet.type.v1.StateDiff + 33, // 37: sf.starknet.type.v1.StateDiff.storage_diffs:type_name -> sf.starknet.type.v1.ContractStorageDiff + 32, // 38: sf.starknet.type.v1.StateDiff.declared_classes:type_name -> sf.starknet.type.v1.DeclaredClass + 31, // 39: sf.starknet.type.v1.StateDiff.deployed_contracts:type_name -> sf.starknet.type.v1.DeployedContract + 30, // 40: sf.starknet.type.v1.StateDiff.replaced_classes:type_name -> sf.starknet.type.v1.ReplacedClass + 29, // 41: sf.starknet.type.v1.StateDiff.nonces:type_name -> sf.starknet.type.v1.NonceDiff + 34, // 42: sf.starknet.type.v1.ContractStorageDiff.storage_entries:type_name -> sf.starknet.type.v1.StorageEntries + 43, // [43:43] is the sub-list for method output_type + 43, // [43:43] is the sub-list for method input_type + 43, // [43:43] is the sub-list for extension type_name + 43, // [43:43] is the sub-list for extension extendee + 0, // [0:43] is the sub-list for field type_name +} + +func init() { file_sf_starknet_type_v1_block_proto_init() } +func file_sf_starknet_type_v1_block_proto_init() { + if File_sf_starknet_type_v1_block_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sf_starknet_type_v1_block_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Block); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourcePrice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransactionWithReceipt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransactionReceipt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MessagesSent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionResources); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvokeTransactionV0); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvokeTransactionV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvokeTransactionV3); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*L1HandlerTransaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeclareTransactionV0); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeclareTransactionV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeclareTransactionV2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeclareTransactionV3); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployTransactionV0); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployAccountTransactionV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployAccountTransactionV3); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceBounds); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Resource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Receipt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActualFee); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataAvailability); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateUpdate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateDiff); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NonceDiff); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReplacedClass); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployedContract); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeclaredClass); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContractStorageDiff); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageEntries); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_sf_starknet_type_v1_block_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*TransactionWithReceipt_InvokeTransactionV0)(nil), + (*TransactionWithReceipt_InvokeTransactionV1)(nil), + (*TransactionWithReceipt_InvokeTransactionV3)(nil), + (*TransactionWithReceipt_L1HandlerTransaction)(nil), + (*TransactionWithReceipt_DeclareTransactionV0)(nil), + (*TransactionWithReceipt_DeclareTransactionV1)(nil), + (*TransactionWithReceipt_DeclareTransactionV2)(nil), + (*TransactionWithReceipt_DeclareTransactionV3)(nil), + (*TransactionWithReceipt_DeployTransactionV0)(nil), + (*TransactionWithReceipt_DeployAccountTransactionV1)(nil), + (*TransactionWithReceipt_DeployAccountTransactionV3)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_sf_starknet_type_v1_block_proto_rawDesc, + NumEnums: 4, + NumMessages: 31, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sf_starknet_type_v1_block_proto_goTypes, + DependencyIndexes: file_sf_starknet_type_v1_block_proto_depIdxs, + EnumInfos: file_sf_starknet_type_v1_block_proto_enumTypes, + MessageInfos: file_sf_starknet_type_v1_block_proto_msgTypes, + }.Build() + File_sf_starknet_type_v1_block_proto = out.File + file_sf_starknet_type_v1_block_proto_rawDesc = nil + file_sf_starknet_type_v1_block_proto_goTypes = nil + file_sf_starknet_type_v1_block_proto_depIdxs = nil +} diff --git a/starknet-common/pb/sf/starknet/type/v1/block_vtproto.pb.go b/starknet-common/pb/sf/starknet/type/v1/block_vtproto.pb.go new file mode 100644 index 0000000..62ea601 --- /dev/null +++ b/starknet-common/pb/sf/starknet/type/v1/block_vtproto.pb.go @@ -0,0 +1,22205 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.6.0 +// source: sf/starknet/type/v1/block.proto + +package typev1 + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + proto "google.golang.org/protobuf/proto" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + unsafe "unsafe" +) + +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) +) + +func (m *Block) CloneVT() *Block { + if m == nil { + return (*Block)(nil) + } + r := new(Block) + r.BlockNumber = m.BlockNumber + r.Timestamp = m.Timestamp + r.L1GasPrice = m.L1GasPrice.CloneVT() + r.L1DataGasPrice = m.L1DataGasPrice.CloneVT() + r.L1DaMode = m.L1DaMode + r.StarknetVersion = m.StarknetVersion + r.StateUpdate = m.StateUpdate.CloneVT() + if rhs := m.BlockHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.BlockHash = tmpBytes + } + if rhs := m.ParentHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ParentHash = tmpBytes + } + if rhs := m.NewRoot; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.NewRoot = tmpBytes + } + if rhs := m.SequencerAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.SequencerAddress = tmpBytes + } + if rhs := m.Transactions; rhs != nil { + tmpContainer := make([]*TransactionWithReceipt, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Transactions = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Block) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ResourcePrice) CloneVT() *ResourcePrice { + if m == nil { + return (*ResourcePrice)(nil) + } + r := new(ResourcePrice) + if rhs := m.PriceInFri; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.PriceInFri = tmpBytes + } + if rhs := m.PriceInWei; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.PriceInWei = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ResourcePrice) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *TransactionWithReceipt) CloneVT() *TransactionWithReceipt { + if m == nil { + return (*TransactionWithReceipt)(nil) + } + r := new(TransactionWithReceipt) + r.Receipt = m.Receipt.CloneVT() + if m.Transaction != nil { + r.Transaction = m.Transaction.(interface { + CloneVT() isTransactionWithReceipt_Transaction + }).CloneVT() + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *TransactionWithReceipt) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *TransactionWithReceipt_InvokeTransactionV0) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_InvokeTransactionV0)(nil) + } + r := new(TransactionWithReceipt_InvokeTransactionV0) + r.InvokeTransactionV0 = m.InvokeTransactionV0.CloneVT() + return r +} + +func (m *TransactionWithReceipt_InvokeTransactionV1) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_InvokeTransactionV1)(nil) + } + r := new(TransactionWithReceipt_InvokeTransactionV1) + r.InvokeTransactionV1 = m.InvokeTransactionV1.CloneVT() + return r +} + +func (m *TransactionWithReceipt_InvokeTransactionV3) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_InvokeTransactionV3)(nil) + } + r := new(TransactionWithReceipt_InvokeTransactionV3) + r.InvokeTransactionV3 = m.InvokeTransactionV3.CloneVT() + return r +} + +func (m *TransactionWithReceipt_L1HandlerTransaction) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_L1HandlerTransaction)(nil) + } + r := new(TransactionWithReceipt_L1HandlerTransaction) + r.L1HandlerTransaction = m.L1HandlerTransaction.CloneVT() + return r +} + +func (m *TransactionWithReceipt_DeclareTransactionV0) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_DeclareTransactionV0)(nil) + } + r := new(TransactionWithReceipt_DeclareTransactionV0) + r.DeclareTransactionV0 = m.DeclareTransactionV0.CloneVT() + return r +} + +func (m *TransactionWithReceipt_DeclareTransactionV1) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_DeclareTransactionV1)(nil) + } + r := new(TransactionWithReceipt_DeclareTransactionV1) + r.DeclareTransactionV1 = m.DeclareTransactionV1.CloneVT() + return r +} + +func (m *TransactionWithReceipt_DeclareTransactionV2) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_DeclareTransactionV2)(nil) + } + r := new(TransactionWithReceipt_DeclareTransactionV2) + r.DeclareTransactionV2 = m.DeclareTransactionV2.CloneVT() + return r +} + +func (m *TransactionWithReceipt_DeclareTransactionV3) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_DeclareTransactionV3)(nil) + } + r := new(TransactionWithReceipt_DeclareTransactionV3) + r.DeclareTransactionV3 = m.DeclareTransactionV3.CloneVT() + return r +} + +func (m *TransactionWithReceipt_DeployTransactionV0) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_DeployTransactionV0)(nil) + } + r := new(TransactionWithReceipt_DeployTransactionV0) + r.DeployTransactionV0 = m.DeployTransactionV0.CloneVT() + return r +} + +func (m *TransactionWithReceipt_DeployAccountTransactionV1) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_DeployAccountTransactionV1)(nil) + } + r := new(TransactionWithReceipt_DeployAccountTransactionV1) + r.DeployAccountTransactionV1 = m.DeployAccountTransactionV1.CloneVT() + return r +} + +func (m *TransactionWithReceipt_DeployAccountTransactionV3) CloneVT() isTransactionWithReceipt_Transaction { + if m == nil { + return (*TransactionWithReceipt_DeployAccountTransactionV3)(nil) + } + r := new(TransactionWithReceipt_DeployAccountTransactionV3) + r.DeployAccountTransactionV3 = m.DeployAccountTransactionV3.CloneVT() + return r +} + +func (m *TransactionReceipt) CloneVT() *TransactionReceipt { + if m == nil { + return (*TransactionReceipt)(nil) + } + r := new(TransactionReceipt) + r.ActualFee = m.ActualFee.CloneVT() + r.ExecutionStatus = m.ExecutionStatus + r.RevertReason = m.RevertReason + r.Type = m.Type + r.MessageHash = m.MessageHash + r.ExecutionResources = m.ExecutionResources.CloneVT() + if rhs := m.TransactionHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.TransactionHash = tmpBytes + } + if rhs := m.MessagesSent; rhs != nil { + tmpContainer := make([]*MessagesSent, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.MessagesSent = tmpContainer + } + if rhs := m.Events; rhs != nil { + tmpContainer := make([]*Event, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Events = tmpContainer + } + if rhs := m.ContractAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddress = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *TransactionReceipt) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *MessagesSent) CloneVT() *MessagesSent { + if m == nil { + return (*MessagesSent)(nil) + } + r := new(MessagesSent) + if rhs := m.FromAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.FromAddress = tmpBytes + } + if rhs := m.ToAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ToAddress = tmpBytes + } + if rhs := m.Payload; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Payload = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *MessagesSent) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Event) CloneVT() *Event { + if m == nil { + return (*Event)(nil) + } + r := new(Event) + if rhs := m.FromAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.FromAddress = tmpBytes + } + if rhs := m.Keys; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Keys = tmpContainer + } + if rhs := m.Data; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Data = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Event) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ExecutionResources) CloneVT() *ExecutionResources { + if m == nil { + return (*ExecutionResources)(nil) + } + r := new(ExecutionResources) + r.Steps = m.Steps + r.MemoryHoles = m.MemoryHoles + r.RangeCheckBuiltinApplications = m.RangeCheckBuiltinApplications + r.PedersenBuiltinApplications = m.PedersenBuiltinApplications + r.PoseidonBuiltinApplications = m.PoseidonBuiltinApplications + r.EcOpBuiltinApplications = m.EcOpBuiltinApplications + r.EcdsaBuiltinApplications = m.EcdsaBuiltinApplications + r.BitwiseBuiltinApplications = m.BitwiseBuiltinApplications + r.KeccakBuiltinApplications = m.KeccakBuiltinApplications + r.SegmentArenaBuiltin = m.SegmentArenaBuiltin + r.DataAvailability = m.DataAvailability.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ExecutionResources) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *InvokeTransactionV0) CloneVT() *InvokeTransactionV0 { + if m == nil { + return (*InvokeTransactionV0)(nil) + } + r := new(InvokeTransactionV0) + r.Version = m.Version + if rhs := m.MaxFee; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.MaxFee = tmpBytes + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.ContractAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddress = tmpBytes + } + if rhs := m.EntryPointSelector; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.EntryPointSelector = tmpBytes + } + if rhs := m.Calldata; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Calldata = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *InvokeTransactionV0) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *InvokeTransactionV1) CloneVT() *InvokeTransactionV1 { + if m == nil { + return (*InvokeTransactionV1)(nil) + } + r := new(InvokeTransactionV1) + r.Version = m.Version + if rhs := m.MaxFee; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.MaxFee = tmpBytes + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if rhs := m.SenderAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.SenderAddress = tmpBytes + } + if rhs := m.Calldata; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Calldata = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *InvokeTransactionV1) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *InvokeTransactionV3) CloneVT() *InvokeTransactionV3 { + if m == nil { + return (*InvokeTransactionV3)(nil) + } + r := new(InvokeTransactionV3) + r.Version = m.Version + r.ResourceBounds = m.ResourceBounds.CloneVT() + r.NonceDataAvailabilityMode = m.NonceDataAvailabilityMode + r.FeeDataAvailabilityMode = m.FeeDataAvailabilityMode + if rhs := m.SenderAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.SenderAddress = tmpBytes + } + if rhs := m.Calldata; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Calldata = tmpContainer + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if rhs := m.Tip; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Tip = tmpBytes + } + if rhs := m.PaymasterData; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.PaymasterData = tmpContainer + } + if rhs := m.AccountDeploymentData; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.AccountDeploymentData = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *InvokeTransactionV3) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *L1HandlerTransaction) CloneVT() *L1HandlerTransaction { + if m == nil { + return (*L1HandlerTransaction)(nil) + } + r := new(L1HandlerTransaction) + r.Version = m.Version + r.Nonce = m.Nonce + if rhs := m.ContractAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddress = tmpBytes + } + if rhs := m.EntryPointSelector; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.EntryPointSelector = tmpBytes + } + if rhs := m.Calldata; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Calldata = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *L1HandlerTransaction) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeclareTransactionV0) CloneVT() *DeclareTransactionV0 { + if m == nil { + return (*DeclareTransactionV0)(nil) + } + r := new(DeclareTransactionV0) + r.Version = m.Version + if rhs := m.SenderAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.SenderAddress = tmpBytes + } + if rhs := m.MaxFee; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.MaxFee = tmpBytes + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeclareTransactionV0) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeclareTransactionV1) CloneVT() *DeclareTransactionV1 { + if m == nil { + return (*DeclareTransactionV1)(nil) + } + r := new(DeclareTransactionV1) + r.Version = m.Version + if rhs := m.SenderAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.SenderAddress = tmpBytes + } + if rhs := m.MaxFee; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.MaxFee = tmpBytes + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeclareTransactionV1) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeclareTransactionV2) CloneVT() *DeclareTransactionV2 { + if m == nil { + return (*DeclareTransactionV2)(nil) + } + r := new(DeclareTransactionV2) + r.Version = m.Version + if rhs := m.SenderAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.SenderAddress = tmpBytes + } + if rhs := m.CompiledClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.CompiledClassHash = tmpBytes + } + if rhs := m.MaxFee; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.MaxFee = tmpBytes + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeclareTransactionV2) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeclareTransactionV3) CloneVT() *DeclareTransactionV3 { + if m == nil { + return (*DeclareTransactionV3)(nil) + } + r := new(DeclareTransactionV3) + r.Version = m.Version + r.ResourceBounds = m.ResourceBounds.CloneVT() + r.NonceDataAvailabilityMode = m.NonceDataAvailabilityMode + r.FeeDataAvailabilityMode = m.FeeDataAvailabilityMode + if rhs := m.SenderAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.SenderAddress = tmpBytes + } + if rhs := m.CompiledClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.CompiledClassHash = tmpBytes + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if rhs := m.Tip; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Tip = tmpBytes + } + if rhs := m.PaymasterData; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.PaymasterData = tmpContainer + } + if rhs := m.AccountDeploymentData; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.AccountDeploymentData = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeclareTransactionV3) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeployTransactionV0) CloneVT() *DeployTransactionV0 { + if m == nil { + return (*DeployTransactionV0)(nil) + } + r := new(DeployTransactionV0) + r.Version = m.Version + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if rhs := m.ContractAddressSalt; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddressSalt = tmpBytes + } + if rhs := m.ConstructorCalldata; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.ConstructorCalldata = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeployTransactionV0) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeployAccountTransactionV1) CloneVT() *DeployAccountTransactionV1 { + if m == nil { + return (*DeployAccountTransactionV1)(nil) + } + r := new(DeployAccountTransactionV1) + r.Version = m.Version + if rhs := m.MaxFee; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.MaxFee = tmpBytes + } + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if rhs := m.ContractAddressSalt; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddressSalt = tmpBytes + } + if rhs := m.ConstructorCalldata; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.ConstructorCalldata = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeployAccountTransactionV1) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeployAccountTransactionV3) CloneVT() *DeployAccountTransactionV3 { + if m == nil { + return (*DeployAccountTransactionV3)(nil) + } + r := new(DeployAccountTransactionV3) + r.Version = m.Version + r.ResourceBounds = m.ResourceBounds.CloneVT() + r.NonceDataAvailabilityMode = m.NonceDataAvailabilityMode + r.FeeDataAvailabilityMode = m.FeeDataAvailabilityMode + if rhs := m.Signature; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.Signature = tmpContainer + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if rhs := m.ContractAddressSalt; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddressSalt = tmpBytes + } + if rhs := m.ConstructorCalldata; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.ConstructorCalldata = tmpContainer + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if rhs := m.Tip; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Tip = tmpBytes + } + if rhs := m.PaymasterData; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.PaymasterData = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeployAccountTransactionV3) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ResourceBounds) CloneVT() *ResourceBounds { + if m == nil { + return (*ResourceBounds)(nil) + } + r := new(ResourceBounds) + r.L1Gas = m.L1Gas.CloneVT() + r.L2Gas = m.L2Gas.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ResourceBounds) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Resource) CloneVT() *Resource { + if m == nil { + return (*Resource)(nil) + } + r := new(Resource) + r.MaxAmount = m.MaxAmount + r.MaxPricePerUnit = m.MaxPricePerUnit + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Resource) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Receipt) CloneVT() *Receipt { + if m == nil { + return (*Receipt)(nil) + } + r := new(Receipt) + r.ActualFee = m.ActualFee.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Receipt) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ActualFee) CloneVT() *ActualFee { + if m == nil { + return (*ActualFee)(nil) + } + r := new(ActualFee) + r.Unit = m.Unit + if rhs := m.Amount; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Amount = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ActualFee) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DataAvailability) CloneVT() *DataAvailability { + if m == nil { + return (*DataAvailability)(nil) + } + r := new(DataAvailability) + r.L1Gas = m.L1Gas + r.L1DataGas = m.L1DataGas + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DataAvailability) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *StateUpdate) CloneVT() *StateUpdate { + if m == nil { + return (*StateUpdate)(nil) + } + r := new(StateUpdate) + r.StateDiff = m.StateDiff.CloneVT() + if rhs := m.NewRoot; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.NewRoot = tmpBytes + } + if rhs := m.OldRoot; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.OldRoot = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *StateUpdate) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *StateDiff) CloneVT() *StateDiff { + if m == nil { + return (*StateDiff)(nil) + } + r := new(StateDiff) + if rhs := m.StorageDiffs; rhs != nil { + tmpContainer := make([]*ContractStorageDiff, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.StorageDiffs = tmpContainer + } + if rhs := m.DeprecatedDeclaredClasses; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.DeprecatedDeclaredClasses = tmpContainer + } + if rhs := m.DeclaredClasses; rhs != nil { + tmpContainer := make([]*DeclaredClass, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.DeclaredClasses = tmpContainer + } + if rhs := m.DeployedContracts; rhs != nil { + tmpContainer := make([]*DeployedContract, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.DeployedContracts = tmpContainer + } + if rhs := m.ReplacedClasses; rhs != nil { + tmpContainer := make([]*ReplacedClass, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.ReplacedClasses = tmpContainer + } + if rhs := m.Nonces; rhs != nil { + tmpContainer := make([]*NonceDiff, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Nonces = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *StateDiff) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *NonceDiff) CloneVT() *NonceDiff { + if m == nil { + return (*NonceDiff)(nil) + } + r := new(NonceDiff) + if rhs := m.ContractAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddress = tmpBytes + } + if rhs := m.Nonce; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Nonce = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *NonceDiff) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ReplacedClass) CloneVT() *ReplacedClass { + if m == nil { + return (*ReplacedClass)(nil) + } + r := new(ReplacedClass) + if rhs := m.ContractAddress; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ContractAddress = tmpBytes + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ReplacedClass) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeployedContract) CloneVT() *DeployedContract { + if m == nil { + return (*DeployedContract)(nil) + } + r := new(DeployedContract) + if rhs := m.Address; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Address = tmpBytes + } + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeployedContract) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeclaredClass) CloneVT() *DeclaredClass { + if m == nil { + return (*DeclaredClass)(nil) + } + r := new(DeclaredClass) + if rhs := m.ClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ClassHash = tmpBytes + } + if rhs := m.CompiledClassHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.CompiledClassHash = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeclaredClass) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ContractStorageDiff) CloneVT() *ContractStorageDiff { + if m == nil { + return (*ContractStorageDiff)(nil) + } + r := new(ContractStorageDiff) + if rhs := m.Address; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Address = tmpBytes + } + if rhs := m.StorageEntries; rhs != nil { + tmpContainer := make([]*StorageEntries, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.StorageEntries = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ContractStorageDiff) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *StorageEntries) CloneVT() *StorageEntries { + if m == nil { + return (*StorageEntries)(nil) + } + r := new(StorageEntries) + if rhs := m.Key; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Key = tmpBytes + } + if rhs := m.Value; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Value = tmpBytes + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *StorageEntries) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (this *Block) EqualVT(that *Block) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.BlockHash) != string(that.BlockHash) { + return false + } + if string(this.ParentHash) != string(that.ParentHash) { + return false + } + if this.BlockNumber != that.BlockNumber { + return false + } + if string(this.NewRoot) != string(that.NewRoot) { + return false + } + if this.Timestamp != that.Timestamp { + return false + } + if string(this.SequencerAddress) != string(that.SequencerAddress) { + return false + } + if !this.L1GasPrice.EqualVT(that.L1GasPrice) { + return false + } + if !this.L1DataGasPrice.EqualVT(that.L1DataGasPrice) { + return false + } + if this.L1DaMode != that.L1DaMode { + return false + } + if this.StarknetVersion != that.StarknetVersion { + return false + } + if len(this.Transactions) != len(that.Transactions) { + return false + } + for i, vx := range this.Transactions { + vy := that.Transactions[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &TransactionWithReceipt{} + } + if q == nil { + q = &TransactionWithReceipt{} + } + if !p.EqualVT(q) { + return false + } + } + } + if !this.StateUpdate.EqualVT(that.StateUpdate) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Block) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Block) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ResourcePrice) EqualVT(that *ResourcePrice) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.PriceInFri) != string(that.PriceInFri) { + return false + } + if string(this.PriceInWei) != string(that.PriceInWei) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ResourcePrice) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ResourcePrice) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *TransactionWithReceipt) EqualVT(that *TransactionWithReceipt) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Transaction == nil && that.Transaction != nil { + return false + } else if this.Transaction != nil { + if that.Transaction == nil { + return false + } + if !this.Transaction.(interface { + EqualVT(isTransactionWithReceipt_Transaction) bool + }).EqualVT(that.Transaction) { + return false + } + } + if !this.Receipt.EqualVT(that.Receipt) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TransactionWithReceipt) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TransactionWithReceipt) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *TransactionWithReceipt_InvokeTransactionV0) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_InvokeTransactionV0) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.InvokeTransactionV0, that.InvokeTransactionV0; p != q { + if p == nil { + p = &InvokeTransactionV0{} + } + if q == nil { + q = &InvokeTransactionV0{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_InvokeTransactionV1) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_InvokeTransactionV1) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.InvokeTransactionV1, that.InvokeTransactionV1; p != q { + if p == nil { + p = &InvokeTransactionV1{} + } + if q == nil { + q = &InvokeTransactionV1{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_InvokeTransactionV3) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_InvokeTransactionV3) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.InvokeTransactionV3, that.InvokeTransactionV3; p != q { + if p == nil { + p = &InvokeTransactionV3{} + } + if q == nil { + q = &InvokeTransactionV3{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_L1HandlerTransaction) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_L1HandlerTransaction) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.L1HandlerTransaction, that.L1HandlerTransaction; p != q { + if p == nil { + p = &L1HandlerTransaction{} + } + if q == nil { + q = &L1HandlerTransaction{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_DeclareTransactionV0) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_DeclareTransactionV0) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.DeclareTransactionV0, that.DeclareTransactionV0; p != q { + if p == nil { + p = &DeclareTransactionV0{} + } + if q == nil { + q = &DeclareTransactionV0{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_DeclareTransactionV1) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_DeclareTransactionV1) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.DeclareTransactionV1, that.DeclareTransactionV1; p != q { + if p == nil { + p = &DeclareTransactionV1{} + } + if q == nil { + q = &DeclareTransactionV1{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_DeclareTransactionV2) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_DeclareTransactionV2) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.DeclareTransactionV2, that.DeclareTransactionV2; p != q { + if p == nil { + p = &DeclareTransactionV2{} + } + if q == nil { + q = &DeclareTransactionV2{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_DeclareTransactionV3) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_DeclareTransactionV3) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.DeclareTransactionV3, that.DeclareTransactionV3; p != q { + if p == nil { + p = &DeclareTransactionV3{} + } + if q == nil { + q = &DeclareTransactionV3{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_DeployTransactionV0) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_DeployTransactionV0) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.DeployTransactionV0, that.DeployTransactionV0; p != q { + if p == nil { + p = &DeployTransactionV0{} + } + if q == nil { + q = &DeployTransactionV0{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_DeployAccountTransactionV1) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_DeployAccountTransactionV1) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.DeployAccountTransactionV1, that.DeployAccountTransactionV1; p != q { + if p == nil { + p = &DeployAccountTransactionV1{} + } + if q == nil { + q = &DeployAccountTransactionV1{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionWithReceipt_DeployAccountTransactionV3) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { + that, ok := thatIface.(*TransactionWithReceipt_DeployAccountTransactionV3) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.DeployAccountTransactionV3, that.DeployAccountTransactionV3; p != q { + if p == nil { + p = &DeployAccountTransactionV3{} + } + if q == nil { + q = &DeployAccountTransactionV3{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *TransactionReceipt) EqualVT(that *TransactionReceipt) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.TransactionHash) != string(that.TransactionHash) { + return false + } + if !this.ActualFee.EqualVT(that.ActualFee) { + return false + } + if this.ExecutionStatus != that.ExecutionStatus { + return false + } + if this.RevertReason != that.RevertReason { + return false + } + if this.Type != that.Type { + return false + } + if this.MessageHash != that.MessageHash { + return false + } + if len(this.MessagesSent) != len(that.MessagesSent) { + return false + } + for i, vx := range this.MessagesSent { + vy := that.MessagesSent[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &MessagesSent{} + } + if q == nil { + q = &MessagesSent{} + } + if !p.EqualVT(q) { + return false + } + } + } + if len(this.Events) != len(that.Events) { + return false + } + for i, vx := range this.Events { + vy := that.Events[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &Event{} + } + if q == nil { + q = &Event{} + } + if !p.EqualVT(q) { + return false + } + } + } + if !this.ExecutionResources.EqualVT(that.ExecutionResources) { + return false + } + if string(this.ContractAddress) != string(that.ContractAddress) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *TransactionReceipt) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*TransactionReceipt) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *MessagesSent) EqualVT(that *MessagesSent) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.FromAddress) != string(that.FromAddress) { + return false + } + if string(this.ToAddress) != string(that.ToAddress) { + return false + } + if len(this.Payload) != len(that.Payload) { + return false + } + for i, vx := range this.Payload { + vy := that.Payload[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *MessagesSent) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*MessagesSent) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Event) EqualVT(that *Event) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.FromAddress) != string(that.FromAddress) { + return false + } + if len(this.Keys) != len(that.Keys) { + return false + } + for i, vx := range this.Keys { + vy := that.Keys[i] + if string(vx) != string(vy) { + return false + } + } + if len(this.Data) != len(that.Data) { + return false + } + for i, vx := range this.Data { + vy := that.Data[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Event) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Event) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ExecutionResources) EqualVT(that *ExecutionResources) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Steps != that.Steps { + return false + } + if this.MemoryHoles != that.MemoryHoles { + return false + } + if this.RangeCheckBuiltinApplications != that.RangeCheckBuiltinApplications { + return false + } + if this.PedersenBuiltinApplications != that.PedersenBuiltinApplications { + return false + } + if this.PoseidonBuiltinApplications != that.PoseidonBuiltinApplications { + return false + } + if this.EcOpBuiltinApplications != that.EcOpBuiltinApplications { + return false + } + if this.EcdsaBuiltinApplications != that.EcdsaBuiltinApplications { + return false + } + if this.BitwiseBuiltinApplications != that.BitwiseBuiltinApplications { + return false + } + if this.KeccakBuiltinApplications != that.KeccakBuiltinApplications { + return false + } + if this.SegmentArenaBuiltin != that.SegmentArenaBuiltin { + return false + } + if !this.DataAvailability.EqualVT(that.DataAvailability) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ExecutionResources) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ExecutionResources) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *InvokeTransactionV0) EqualVT(that *InvokeTransactionV0) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.MaxFee) != string(that.MaxFee) { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.ContractAddress) != string(that.ContractAddress) { + return false + } + if string(this.EntryPointSelector) != string(that.EntryPointSelector) { + return false + } + if len(this.Calldata) != len(that.Calldata) { + return false + } + for i, vx := range this.Calldata { + vy := that.Calldata[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *InvokeTransactionV0) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*InvokeTransactionV0) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *InvokeTransactionV1) EqualVT(that *InvokeTransactionV1) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.MaxFee) != string(that.MaxFee) { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + if string(this.SenderAddress) != string(that.SenderAddress) { + return false + } + if len(this.Calldata) != len(that.Calldata) { + return false + } + for i, vx := range this.Calldata { + vy := that.Calldata[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *InvokeTransactionV1) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*InvokeTransactionV1) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *InvokeTransactionV3) EqualVT(that *InvokeTransactionV3) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.SenderAddress) != string(that.SenderAddress) { + return false + } + if len(this.Calldata) != len(that.Calldata) { + return false + } + for i, vx := range this.Calldata { + vy := that.Calldata[i] + if string(vx) != string(vy) { + return false + } + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + if !this.ResourceBounds.EqualVT(that.ResourceBounds) { + return false + } + if string(this.Tip) != string(that.Tip) { + return false + } + if len(this.PaymasterData) != len(that.PaymasterData) { + return false + } + for i, vx := range this.PaymasterData { + vy := that.PaymasterData[i] + if string(vx) != string(vy) { + return false + } + } + if len(this.AccountDeploymentData) != len(that.AccountDeploymentData) { + return false + } + for i, vx := range this.AccountDeploymentData { + vy := that.AccountDeploymentData[i] + if string(vx) != string(vy) { + return false + } + } + if this.NonceDataAvailabilityMode != that.NonceDataAvailabilityMode { + return false + } + if this.FeeDataAvailabilityMode != that.FeeDataAvailabilityMode { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *InvokeTransactionV3) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*InvokeTransactionV3) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *L1HandlerTransaction) EqualVT(that *L1HandlerTransaction) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Version != that.Version { + return false + } + if this.Nonce != that.Nonce { + return false + } + if string(this.ContractAddress) != string(that.ContractAddress) { + return false + } + if string(this.EntryPointSelector) != string(that.EntryPointSelector) { + return false + } + if len(this.Calldata) != len(that.Calldata) { + return false + } + for i, vx := range this.Calldata { + vy := that.Calldata[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *L1HandlerTransaction) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*L1HandlerTransaction) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeclareTransactionV0) EqualVT(that *DeclareTransactionV0) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.SenderAddress) != string(that.SenderAddress) { + return false + } + if string(this.MaxFee) != string(that.MaxFee) { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeclareTransactionV0) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeclareTransactionV0) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeclareTransactionV1) EqualVT(that *DeclareTransactionV1) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.SenderAddress) != string(that.SenderAddress) { + return false + } + if string(this.MaxFee) != string(that.MaxFee) { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeclareTransactionV1) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeclareTransactionV1) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeclareTransactionV2) EqualVT(that *DeclareTransactionV2) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.SenderAddress) != string(that.SenderAddress) { + return false + } + if string(this.CompiledClassHash) != string(that.CompiledClassHash) { + return false + } + if string(this.MaxFee) != string(that.MaxFee) { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeclareTransactionV2) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeclareTransactionV2) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeclareTransactionV3) EqualVT(that *DeclareTransactionV3) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.SenderAddress) != string(that.SenderAddress) { + return false + } + if string(this.CompiledClassHash) != string(that.CompiledClassHash) { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + if !this.ResourceBounds.EqualVT(that.ResourceBounds) { + return false + } + if string(this.Tip) != string(that.Tip) { + return false + } + if len(this.PaymasterData) != len(that.PaymasterData) { + return false + } + for i, vx := range this.PaymasterData { + vy := that.PaymasterData[i] + if string(vx) != string(vy) { + return false + } + } + if len(this.AccountDeploymentData) != len(that.AccountDeploymentData) { + return false + } + for i, vx := range this.AccountDeploymentData { + vy := that.AccountDeploymentData[i] + if string(vx) != string(vy) { + return false + } + } + if this.NonceDataAvailabilityMode != that.NonceDataAvailabilityMode { + return false + } + if this.FeeDataAvailabilityMode != that.FeeDataAvailabilityMode { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeclareTransactionV3) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeclareTransactionV3) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeployTransactionV0) EqualVT(that *DeployTransactionV0) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + if this.Version != that.Version { + return false + } + if string(this.ContractAddressSalt) != string(that.ContractAddressSalt) { + return false + } + if len(this.ConstructorCalldata) != len(that.ConstructorCalldata) { + return false + } + for i, vx := range this.ConstructorCalldata { + vy := that.ConstructorCalldata[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeployTransactionV0) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeployTransactionV0) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeployAccountTransactionV1) EqualVT(that *DeployAccountTransactionV1) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.MaxFee) != string(that.MaxFee) { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + if string(this.ContractAddressSalt) != string(that.ContractAddressSalt) { + return false + } + if len(this.ConstructorCalldata) != len(that.ConstructorCalldata) { + return false + } + for i, vx := range this.ConstructorCalldata { + vy := that.ConstructorCalldata[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeployAccountTransactionV1) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeployAccountTransactionV1) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeployAccountTransactionV3) EqualVT(that *DeployAccountTransactionV3) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Version != that.Version { + return false + } + if len(this.Signature) != len(that.Signature) { + return false + } + for i, vx := range this.Signature { + vy := that.Signature[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + if string(this.ContractAddressSalt) != string(that.ContractAddressSalt) { + return false + } + if len(this.ConstructorCalldata) != len(that.ConstructorCalldata) { + return false + } + for i, vx := range this.ConstructorCalldata { + vy := that.ConstructorCalldata[i] + if string(vx) != string(vy) { + return false + } + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + if !this.ResourceBounds.EqualVT(that.ResourceBounds) { + return false + } + if string(this.Tip) != string(that.Tip) { + return false + } + if len(this.PaymasterData) != len(that.PaymasterData) { + return false + } + for i, vx := range this.PaymasterData { + vy := that.PaymasterData[i] + if string(vx) != string(vy) { + return false + } + } + if this.NonceDataAvailabilityMode != that.NonceDataAvailabilityMode { + return false + } + if this.FeeDataAvailabilityMode != that.FeeDataAvailabilityMode { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeployAccountTransactionV3) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeployAccountTransactionV3) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ResourceBounds) EqualVT(that *ResourceBounds) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.L1Gas.EqualVT(that.L1Gas) { + return false + } + if !this.L2Gas.EqualVT(that.L2Gas) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ResourceBounds) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ResourceBounds) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Resource) EqualVT(that *Resource) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.MaxAmount != that.MaxAmount { + return false + } + if this.MaxPricePerUnit != that.MaxPricePerUnit { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Resource) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Resource) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Receipt) EqualVT(that *Receipt) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.ActualFee.EqualVT(that.ActualFee) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Receipt) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Receipt) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ActualFee) EqualVT(that *ActualFee) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.Amount) != string(that.Amount) { + return false + } + if this.Unit != that.Unit { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ActualFee) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ActualFee) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DataAvailability) EqualVT(that *DataAvailability) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.L1Gas != that.L1Gas { + return false + } + if this.L1DataGas != that.L1DataGas { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DataAvailability) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DataAvailability) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *StateUpdate) EqualVT(that *StateUpdate) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.OldRoot) != string(that.OldRoot) { + return false + } + if string(this.NewRoot) != string(that.NewRoot) { + return false + } + if !this.StateDiff.EqualVT(that.StateDiff) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *StateUpdate) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*StateUpdate) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *StateDiff) EqualVT(that *StateDiff) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.StorageDiffs) != len(that.StorageDiffs) { + return false + } + for i, vx := range this.StorageDiffs { + vy := that.StorageDiffs[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &ContractStorageDiff{} + } + if q == nil { + q = &ContractStorageDiff{} + } + if !p.EqualVT(q) { + return false + } + } + } + if len(this.DeprecatedDeclaredClasses) != len(that.DeprecatedDeclaredClasses) { + return false + } + for i, vx := range this.DeprecatedDeclaredClasses { + vy := that.DeprecatedDeclaredClasses[i] + if string(vx) != string(vy) { + return false + } + } + if len(this.DeclaredClasses) != len(that.DeclaredClasses) { + return false + } + for i, vx := range this.DeclaredClasses { + vy := that.DeclaredClasses[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &DeclaredClass{} + } + if q == nil { + q = &DeclaredClass{} + } + if !p.EqualVT(q) { + return false + } + } + } + if len(this.DeployedContracts) != len(that.DeployedContracts) { + return false + } + for i, vx := range this.DeployedContracts { + vy := that.DeployedContracts[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &DeployedContract{} + } + if q == nil { + q = &DeployedContract{} + } + if !p.EqualVT(q) { + return false + } + } + } + if len(this.ReplacedClasses) != len(that.ReplacedClasses) { + return false + } + for i, vx := range this.ReplacedClasses { + vy := that.ReplacedClasses[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &ReplacedClass{} + } + if q == nil { + q = &ReplacedClass{} + } + if !p.EqualVT(q) { + return false + } + } + } + if len(this.Nonces) != len(that.Nonces) { + return false + } + for i, vx := range this.Nonces { + vy := that.Nonces[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &NonceDiff{} + } + if q == nil { + q = &NonceDiff{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *StateDiff) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*StateDiff) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *NonceDiff) EqualVT(that *NonceDiff) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.ContractAddress) != string(that.ContractAddress) { + return false + } + if string(this.Nonce) != string(that.Nonce) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *NonceDiff) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*NonceDiff) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ReplacedClass) EqualVT(that *ReplacedClass) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.ContractAddress) != string(that.ContractAddress) { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ReplacedClass) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ReplacedClass) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeployedContract) EqualVT(that *DeployedContract) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.Address) != string(that.Address) { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeployedContract) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeployedContract) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeclaredClass) EqualVT(that *DeclaredClass) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.ClassHash) != string(that.ClassHash) { + return false + } + if string(this.CompiledClassHash) != string(that.CompiledClassHash) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeclaredClass) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeclaredClass) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ContractStorageDiff) EqualVT(that *ContractStorageDiff) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.Address) != string(that.Address) { + return false + } + if len(this.StorageEntries) != len(that.StorageEntries) { + return false + } + for i, vx := range this.StorageEntries { + vy := that.StorageEntries[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &StorageEntries{} + } + if q == nil { + q = &StorageEntries{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ContractStorageDiff) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ContractStorageDiff) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *StorageEntries) EqualVT(that *StorageEntries) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if string(this.Key) != string(that.Key) { + return false + } + if string(this.Value) != string(that.Value) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *StorageEntries) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*StorageEntries) + if !ok { + return false + } + return this.EqualVT(that) +} +func (m *Block) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Block) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Block) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.StateUpdate != nil { + size, err := m.StateUpdate.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + } + if len(m.Transactions) > 0 { + for iNdEx := len(m.Transactions) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Transactions[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + } + if len(m.StarknetVersion) > 0 { + i -= len(m.StarknetVersion) + copy(dAtA[i:], m.StarknetVersion) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StarknetVersion))) + i-- + dAtA[i] = 0x52 + } + if m.L1DaMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1DaMode)) + i-- + dAtA[i] = 0x48 + } + if m.L1DataGasPrice != nil { + size, err := m.L1DataGasPrice.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + if m.L1GasPrice != nil { + size, err := m.L1GasPrice.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + if len(m.SequencerAddress) > 0 { + i -= len(m.SequencerAddress) + copy(dAtA[i:], m.SequencerAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SequencerAddress))) + i-- + dAtA[i] = 0x32 + } + if m.Timestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x28 + } + if len(m.NewRoot) > 0 { + i -= len(m.NewRoot) + copy(dAtA[i:], m.NewRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NewRoot))) + i-- + dAtA[i] = 0x22 + } + if m.BlockNumber != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.BlockNumber)) + i-- + dAtA[i] = 0x18 + } + if len(m.ParentHash) > 0 { + i -= len(m.ParentHash) + copy(dAtA[i:], m.ParentHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResourcePrice) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourcePrice) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ResourcePrice) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.PriceInWei) > 0 { + i -= len(m.PriceInWei) + copy(dAtA[i:], m.PriceInWei) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PriceInWei))) + i-- + dAtA[i] = 0x12 + } + if len(m.PriceInFri) > 0 { + i -= len(m.PriceInFri) + copy(dAtA[i:], m.PriceInFri) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PriceInFri))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TransactionWithReceipt) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TransactionWithReceipt) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if vtmsg, ok := m.Transaction.(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if m.Receipt != nil { + size, err := m.Receipt.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + } + return len(dAtA) - i, nil +} + +func (m *TransactionWithReceipt_InvokeTransactionV0) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_InvokeTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.InvokeTransactionV0 != nil { + size, err := m.InvokeTransactionV0.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_InvokeTransactionV1) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_InvokeTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.InvokeTransactionV1 != nil { + size, err := m.InvokeTransactionV1.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_InvokeTransactionV3) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_InvokeTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.InvokeTransactionV3 != nil { + size, err := m.InvokeTransactionV3.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_L1HandlerTransaction) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_L1HandlerTransaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.L1HandlerTransaction != nil { + size, err := m.L1HandlerTransaction.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV0) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV0 != nil { + size, err := m.DeclareTransactionV0.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV1) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV1 != nil { + size, err := m.DeclareTransactionV1.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV2) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV2 != nil { + size, err := m.DeclareTransactionV2.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV3) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV3 != nil { + size, err := m.DeclareTransactionV3.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeployTransactionV0) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeployTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeployTransactionV0 != nil { + size, err := m.DeployTransactionV0.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x4a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeployAccountTransactionV1) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeployAccountTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeployAccountTransactionV1 != nil { + size, err := m.DeployAccountTransactionV1.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x52 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeployAccountTransactionV3) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeployAccountTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeployAccountTransactionV3 != nil { + size, err := m.DeployAccountTransactionV3.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + return len(dAtA) - i, nil +} +func (m *TransactionReceipt) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TransactionReceipt) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TransactionReceipt) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x52 + } + if m.ExecutionResources != nil { + size, err := m.ExecutionResources.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x4a + } + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Events[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + } + if len(m.MessagesSent) > 0 { + for iNdEx := len(m.MessagesSent) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.MessagesSent[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + } + if len(m.MessageHash) > 0 { + i -= len(m.MessageHash) + copy(dAtA[i:], m.MessageHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MessageHash))) + i-- + dAtA[i] = 0x32 + } + if m.Type != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x28 + } + if len(m.RevertReason) > 0 { + i -= len(m.RevertReason) + copy(dAtA[i:], m.RevertReason) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RevertReason))) + i-- + dAtA[i] = 0x22 + } + if m.ExecutionStatus != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ExecutionStatus)) + i-- + dAtA[i] = 0x18 + } + if m.ActualFee != nil { + size, err := m.ActualFee.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.TransactionHash) > 0 { + i -= len(m.TransactionHash) + copy(dAtA[i:], m.TransactionHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TransactionHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MessagesSent) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MessagesSent) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *MessagesSent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Payload) > 0 { + for iNdEx := len(m.Payload) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Payload[iNdEx]) + copy(dAtA[i:], m.Payload[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.ToAddress) > 0 { + i -= len(m.ToAddress) + copy(dAtA[i:], m.ToAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ToAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.FromAddress) > 0 { + i -= len(m.FromAddress) + copy(dAtA[i:], m.FromAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FromAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Event) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Event) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Event) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Data) > 0 { + for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Data[iNdEx]) + copy(dAtA[i:], m.Data[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.FromAddress) > 0 { + i -= len(m.FromAddress) + copy(dAtA[i:], m.FromAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FromAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExecutionResources) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExecutionResources) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ExecutionResources) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.DataAvailability != nil { + size, err := m.DataAvailability.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + if m.SegmentArenaBuiltin != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SegmentArenaBuiltin)) + i-- + dAtA[i] = 0x50 + } + if m.KeccakBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.KeccakBuiltinApplications)) + i-- + dAtA[i] = 0x48 + } + if m.BitwiseBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.BitwiseBuiltinApplications)) + i-- + dAtA[i] = 0x40 + } + if m.EcdsaBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.EcdsaBuiltinApplications)) + i-- + dAtA[i] = 0x38 + } + if m.EcOpBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.EcOpBuiltinApplications)) + i-- + dAtA[i] = 0x30 + } + if m.PoseidonBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PoseidonBuiltinApplications)) + i-- + dAtA[i] = 0x28 + } + if m.PedersenBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PedersenBuiltinApplications)) + i-- + dAtA[i] = 0x20 + } + if m.RangeCheckBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RangeCheckBuiltinApplications)) + i-- + dAtA[i] = 0x18 + } + if m.MemoryHoles != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MemoryHoles)) + i-- + dAtA[i] = 0x10 + } + if m.Steps != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Steps)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *InvokeTransactionV0) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InvokeTransactionV0) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *InvokeTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.EntryPointSelector) > 0 { + i -= len(m.EntryPointSelector) + copy(dAtA[i:], m.EntryPointSelector) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EntryPointSelector))) + i-- + dAtA[i] = 0x32 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x2a + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *InvokeTransactionV1) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InvokeTransactionV1) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *InvokeTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x2a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x22 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *InvokeTransactionV3) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InvokeTransactionV3) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *InvokeTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.FeeDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) + i-- + dAtA[i] = 0x60 + } + if m.NonceDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) + i-- + dAtA[i] = 0x58 + } + if len(m.AccountDeploymentData) > 0 { + for iNdEx := len(m.AccountDeploymentData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AccountDeploymentData[iNdEx]) + copy(dAtA[i:], m.AccountDeploymentData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountDeploymentData[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + if len(m.PaymasterData) > 0 { + for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PaymasterData[iNdEx]) + copy(dAtA[i:], m.PaymasterData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0x42 + } + if m.ResourceBounds != nil { + size, err := m.ResourceBounds.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *L1HandlerTransaction) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *L1HandlerTransaction) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *L1HandlerTransaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.EntryPointSelector) > 0 { + i -= len(m.EntryPointSelector) + copy(dAtA[i:], m.EntryPointSelector) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EntryPointSelector))) + i-- + dAtA[i] = 0x2a + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x1a + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV0) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV0) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeclareTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x1a + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV1) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV1) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeclareTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x1a + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV2) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV2) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeclareTransactionV2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x1a + } + if len(m.CompiledClassHash) > 0 { + i -= len(m.CompiledClassHash) + copy(dAtA[i:], m.CompiledClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV3) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV3) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeclareTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.FeeDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) + i-- + dAtA[i] = 0x68 + } + if m.NonceDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) + i-- + dAtA[i] = 0x60 + } + if len(m.AccountDeploymentData) > 0 { + for iNdEx := len(m.AccountDeploymentData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AccountDeploymentData[iNdEx]) + copy(dAtA[i:], m.AccountDeploymentData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountDeploymentData[iNdEx]))) + i-- + dAtA[i] = 0x5a + } + } + if len(m.PaymasterData) > 0 { + for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PaymasterData[iNdEx]) + copy(dAtA[i:], m.PaymasterData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0x4a + } + if m.ResourceBounds != nil { + size, err := m.ResourceBounds.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.CompiledClassHash) > 0 { + i -= len(m.CompiledClassHash) + copy(dAtA[i:], m.CompiledClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) + i-- + dAtA[i] = 0x1a + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *DeployTransactionV0) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployTransactionV0) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeployTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ConstructorCalldata) > 0 { + for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ConstructorCalldata[iNdEx]) + copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.ContractAddressSalt) > 0 { + i -= len(m.ContractAddressSalt) + copy(dAtA[i:], m.ContractAddressSalt) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) + i-- + dAtA[i] = 0x1a + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeployAccountTransactionV1) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployAccountTransactionV1) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeployAccountTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ConstructorCalldata) > 0 { + for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ConstructorCalldata[iNdEx]) + copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.ContractAddressSalt) > 0 { + i -= len(m.ContractAddressSalt) + copy(dAtA[i:], m.ContractAddressSalt) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) + i-- + dAtA[i] = 0x32 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x2a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x22 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeployAccountTransactionV3) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployAccountTransactionV3) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeployAccountTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.FeeDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) + i-- + dAtA[i] = 0x60 + } + if m.NonceDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) + i-- + dAtA[i] = 0x58 + } + if len(m.PaymasterData) > 0 { + for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PaymasterData[iNdEx]) + copy(dAtA[i:], m.PaymasterData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0x42 + } + if m.ResourceBounds != nil { + size, err := m.ResourceBounds.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x32 + } + if len(m.ConstructorCalldata) > 0 { + for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ConstructorCalldata[iNdEx]) + copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.ContractAddressSalt) > 0 { + i -= len(m.ContractAddressSalt) + copy(dAtA[i:], m.ContractAddressSalt) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) + i-- + dAtA[i] = 0x22 + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x1a + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResourceBounds) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceBounds) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ResourceBounds) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.L2Gas != nil { + size, err := m.L2Gas.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.L1Gas != nil { + size, err := m.L1Gas.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Resource) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resource) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Resource) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.MaxPricePerUnit) > 0 { + i -= len(m.MaxPricePerUnit) + copy(dAtA[i:], m.MaxPricePerUnit) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxPricePerUnit))) + i-- + dAtA[i] = 0x12 + } + if len(m.MaxAmount) > 0 { + i -= len(m.MaxAmount) + copy(dAtA[i:], m.MaxAmount) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxAmount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Receipt) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Receipt) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Receipt) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.ActualFee != nil { + size, err := m.ActualFee.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ActualFee) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ActualFee) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ActualFee) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Unit) > 0 { + i -= len(m.Unit) + copy(dAtA[i:], m.Unit) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Unit))) + i-- + dAtA[i] = 0x12 + } + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DataAvailability) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DataAvailability) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataAvailability) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.L1DataGas != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1DataGas)) + i-- + dAtA[i] = 0x10 + } + if m.L1Gas != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1Gas)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *StateUpdate) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StateUpdate) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StateUpdate) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.StateDiff != nil { + size, err := m.StateDiff.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.NewRoot) > 0 { + i -= len(m.NewRoot) + copy(dAtA[i:], m.NewRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NewRoot))) + i-- + dAtA[i] = 0x12 + } + if len(m.OldRoot) > 0 { + i -= len(m.OldRoot) + copy(dAtA[i:], m.OldRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OldRoot))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StateDiff) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StateDiff) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StateDiff) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Nonces) > 0 { + for iNdEx := len(m.Nonces) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Nonces[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + } + if len(m.ReplacedClasses) > 0 { + for iNdEx := len(m.ReplacedClasses) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.ReplacedClasses[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + } + if len(m.DeployedContracts) > 0 { + for iNdEx := len(m.DeployedContracts) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.DeployedContracts[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if len(m.DeclaredClasses) > 0 { + for iNdEx := len(m.DeclaredClasses) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.DeclaredClasses[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.DeprecatedDeclaredClasses) > 0 { + for iNdEx := len(m.DeprecatedDeclaredClasses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DeprecatedDeclaredClasses[iNdEx]) + copy(dAtA[i:], m.DeprecatedDeclaredClasses[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeprecatedDeclaredClasses[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.StorageDiffs) > 0 { + for iNdEx := len(m.StorageDiffs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.StorageDiffs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *NonceDiff) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NonceDiff) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *NonceDiff) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x12 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ReplacedClass) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ReplacedClass) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ReplacedClass) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeployedContract) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployedContract) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeployedContract) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeclaredClass) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclaredClass) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeclaredClass) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.CompiledClassHash) > 0 { + i -= len(m.CompiledClassHash) + copy(dAtA[i:], m.CompiledClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ContractStorageDiff) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContractStorageDiff) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ContractStorageDiff) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.StorageEntries) > 0 { + for iNdEx := len(m.StorageEntries) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.StorageEntries[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StorageEntries) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageEntries) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StorageEntries) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Block) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Block) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Block) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.StateUpdate != nil { + size, err := m.StateUpdate.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + } + if len(m.Transactions) > 0 { + for iNdEx := len(m.Transactions) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Transactions[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + } + if len(m.StarknetVersion) > 0 { + i -= len(m.StarknetVersion) + copy(dAtA[i:], m.StarknetVersion) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StarknetVersion))) + i-- + dAtA[i] = 0x52 + } + if m.L1DaMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1DaMode)) + i-- + dAtA[i] = 0x48 + } + if m.L1DataGasPrice != nil { + size, err := m.L1DataGasPrice.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + if m.L1GasPrice != nil { + size, err := m.L1GasPrice.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + if len(m.SequencerAddress) > 0 { + i -= len(m.SequencerAddress) + copy(dAtA[i:], m.SequencerAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SequencerAddress))) + i-- + dAtA[i] = 0x32 + } + if m.Timestamp != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x28 + } + if len(m.NewRoot) > 0 { + i -= len(m.NewRoot) + copy(dAtA[i:], m.NewRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NewRoot))) + i-- + dAtA[i] = 0x22 + } + if m.BlockNumber != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.BlockNumber)) + i-- + dAtA[i] = 0x18 + } + if len(m.ParentHash) > 0 { + i -= len(m.ParentHash) + copy(dAtA[i:], m.ParentHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResourcePrice) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourcePrice) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ResourcePrice) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.PriceInWei) > 0 { + i -= len(m.PriceInWei) + copy(dAtA[i:], m.PriceInWei) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PriceInWei))) + i-- + dAtA[i] = 0x12 + } + if len(m.PriceInFri) > 0 { + i -= len(m.PriceInFri) + copy(dAtA[i:], m.PriceInFri) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PriceInFri))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TransactionWithReceipt) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TransactionWithReceipt) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Receipt != nil { + size, err := m.Receipt.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV3); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV1); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_DeployTransactionV0); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV3); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV2); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV1); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV0); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_L1HandlerTransaction); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV3); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV1); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV0); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + return len(dAtA) - i, nil +} + +func (m *TransactionWithReceipt_InvokeTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_InvokeTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.InvokeTransactionV0 != nil { + size, err := m.InvokeTransactionV0.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_InvokeTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_InvokeTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.InvokeTransactionV1 != nil { + size, err := m.InvokeTransactionV1.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_InvokeTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_InvokeTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.InvokeTransactionV3 != nil { + size, err := m.InvokeTransactionV3.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_L1HandlerTransaction) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_L1HandlerTransaction) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.L1HandlerTransaction != nil { + size, err := m.L1HandlerTransaction.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV0 != nil { + size, err := m.DeclareTransactionV0.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV1 != nil { + size, err := m.DeclareTransactionV1.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV2) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV2 != nil { + size, err := m.DeclareTransactionV2.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeclareTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeclareTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeclareTransactionV3 != nil { + size, err := m.DeclareTransactionV3.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeployTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeployTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeployTransactionV0 != nil { + size, err := m.DeployTransactionV0.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x4a + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeployAccountTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeployAccountTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeployAccountTransactionV1 != nil { + size, err := m.DeployAccountTransactionV1.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x52 + } + return len(dAtA) - i, nil +} +func (m *TransactionWithReceipt_DeployAccountTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionWithReceipt_DeployAccountTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.DeployAccountTransactionV3 != nil { + size, err := m.DeployAccountTransactionV3.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + return len(dAtA) - i, nil +} +func (m *TransactionReceipt) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TransactionReceipt) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *TransactionReceipt) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x52 + } + if m.ExecutionResources != nil { + size, err := m.ExecutionResources.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x4a + } + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Events[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + } + if len(m.MessagesSent) > 0 { + for iNdEx := len(m.MessagesSent) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.MessagesSent[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + } + if len(m.MessageHash) > 0 { + i -= len(m.MessageHash) + copy(dAtA[i:], m.MessageHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MessageHash))) + i-- + dAtA[i] = 0x32 + } + if m.Type != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x28 + } + if len(m.RevertReason) > 0 { + i -= len(m.RevertReason) + copy(dAtA[i:], m.RevertReason) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RevertReason))) + i-- + dAtA[i] = 0x22 + } + if m.ExecutionStatus != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ExecutionStatus)) + i-- + dAtA[i] = 0x18 + } + if m.ActualFee != nil { + size, err := m.ActualFee.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.TransactionHash) > 0 { + i -= len(m.TransactionHash) + copy(dAtA[i:], m.TransactionHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TransactionHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MessagesSent) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MessagesSent) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *MessagesSent) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Payload) > 0 { + for iNdEx := len(m.Payload) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Payload[iNdEx]) + copy(dAtA[i:], m.Payload[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.ToAddress) > 0 { + i -= len(m.ToAddress) + copy(dAtA[i:], m.ToAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ToAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.FromAddress) > 0 { + i -= len(m.FromAddress) + copy(dAtA[i:], m.FromAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FromAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Event) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Event) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Event) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Data) > 0 { + for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Data[iNdEx]) + copy(dAtA[i:], m.Data[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.FromAddress) > 0 { + i -= len(m.FromAddress) + copy(dAtA[i:], m.FromAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FromAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExecutionResources) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExecutionResources) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ExecutionResources) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.DataAvailability != nil { + size, err := m.DataAvailability.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + if m.SegmentArenaBuiltin != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SegmentArenaBuiltin)) + i-- + dAtA[i] = 0x50 + } + if m.KeccakBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.KeccakBuiltinApplications)) + i-- + dAtA[i] = 0x48 + } + if m.BitwiseBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.BitwiseBuiltinApplications)) + i-- + dAtA[i] = 0x40 + } + if m.EcdsaBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.EcdsaBuiltinApplications)) + i-- + dAtA[i] = 0x38 + } + if m.EcOpBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.EcOpBuiltinApplications)) + i-- + dAtA[i] = 0x30 + } + if m.PoseidonBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PoseidonBuiltinApplications)) + i-- + dAtA[i] = 0x28 + } + if m.PedersenBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PedersenBuiltinApplications)) + i-- + dAtA[i] = 0x20 + } + if m.RangeCheckBuiltinApplications != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RangeCheckBuiltinApplications)) + i-- + dAtA[i] = 0x18 + } + if m.MemoryHoles != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MemoryHoles)) + i-- + dAtA[i] = 0x10 + } + if m.Steps != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Steps)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *InvokeTransactionV0) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InvokeTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *InvokeTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.EntryPointSelector) > 0 { + i -= len(m.EntryPointSelector) + copy(dAtA[i:], m.EntryPointSelector) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EntryPointSelector))) + i-- + dAtA[i] = 0x32 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x2a + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *InvokeTransactionV1) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InvokeTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *InvokeTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x2a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x22 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *InvokeTransactionV3) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InvokeTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *InvokeTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.FeeDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) + i-- + dAtA[i] = 0x60 + } + if m.NonceDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) + i-- + dAtA[i] = 0x58 + } + if len(m.AccountDeploymentData) > 0 { + for iNdEx := len(m.AccountDeploymentData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AccountDeploymentData[iNdEx]) + copy(dAtA[i:], m.AccountDeploymentData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountDeploymentData[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + if len(m.PaymasterData) > 0 { + for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PaymasterData[iNdEx]) + copy(dAtA[i:], m.PaymasterData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0x42 + } + if m.ResourceBounds != nil { + size, err := m.ResourceBounds.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *L1HandlerTransaction) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *L1HandlerTransaction) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *L1HandlerTransaction) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Calldata) > 0 { + for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Calldata[iNdEx]) + copy(dAtA[i:], m.Calldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.EntryPointSelector) > 0 { + i -= len(m.EntryPointSelector) + copy(dAtA[i:], m.EntryPointSelector) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EntryPointSelector))) + i-- + dAtA[i] = 0x2a + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x1a + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV0) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeclareTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x1a + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV1) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeclareTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x1a + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV2) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV2) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeclareTransactionV2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0x1a + } + if len(m.CompiledClassHash) > 0 { + i -= len(m.CompiledClassHash) + copy(dAtA[i:], m.CompiledClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeclareTransactionV3) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclareTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeclareTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.FeeDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) + i-- + dAtA[i] = 0x68 + } + if m.NonceDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) + i-- + dAtA[i] = 0x60 + } + if len(m.AccountDeploymentData) > 0 { + for iNdEx := len(m.AccountDeploymentData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AccountDeploymentData[iNdEx]) + copy(dAtA[i:], m.AccountDeploymentData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountDeploymentData[iNdEx]))) + i-- + dAtA[i] = 0x5a + } + } + if len(m.PaymasterData) > 0 { + for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PaymasterData[iNdEx]) + copy(dAtA[i:], m.PaymasterData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0x4a + } + if m.ResourceBounds != nil { + size, err := m.ResourceBounds.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x32 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.CompiledClassHash) > 0 { + i -= len(m.CompiledClassHash) + copy(dAtA[i:], m.CompiledClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) + i-- + dAtA[i] = 0x1a + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *DeployTransactionV0) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeployTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ConstructorCalldata) > 0 { + for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ConstructorCalldata[iNdEx]) + copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.ContractAddressSalt) > 0 { + i -= len(m.ContractAddressSalt) + copy(dAtA[i:], m.ContractAddressSalt) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) + i-- + dAtA[i] = 0x1a + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeployAccountTransactionV1) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployAccountTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeployAccountTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ConstructorCalldata) > 0 { + for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ConstructorCalldata[iNdEx]) + copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.ContractAddressSalt) > 0 { + i -= len(m.ContractAddressSalt) + copy(dAtA[i:], m.ContractAddressSalt) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) + i-- + dAtA[i] = 0x32 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x2a + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x22 + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.MaxFee) > 0 { + i -= len(m.MaxFee) + copy(dAtA[i:], m.MaxFee) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeployAccountTransactionV3) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployAccountTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeployAccountTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.FeeDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) + i-- + dAtA[i] = 0x60 + } + if m.NonceDataAvailabilityMode != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) + i-- + dAtA[i] = 0x58 + } + if len(m.PaymasterData) > 0 { + for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PaymasterData[iNdEx]) + copy(dAtA[i:], m.PaymasterData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } + if len(m.Tip) > 0 { + i -= len(m.Tip) + copy(dAtA[i:], m.Tip) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) + i-- + dAtA[i] = 0x42 + } + if m.ResourceBounds != nil { + size, err := m.ResourceBounds.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x32 + } + if len(m.ConstructorCalldata) > 0 { + for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ConstructorCalldata[iNdEx]) + copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.ContractAddressSalt) > 0 { + i -= len(m.ContractAddressSalt) + copy(dAtA[i:], m.ContractAddressSalt) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) + i-- + dAtA[i] = 0x22 + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x1a + } + if len(m.Signature) > 0 { + for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signature[iNdEx]) + copy(dAtA[i:], m.Signature[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResourceBounds) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceBounds) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ResourceBounds) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.L2Gas != nil { + size, err := m.L2Gas.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.L1Gas != nil { + size, err := m.L1Gas.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Resource) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resource) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Resource) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.MaxPricePerUnit) > 0 { + i -= len(m.MaxPricePerUnit) + copy(dAtA[i:], m.MaxPricePerUnit) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxPricePerUnit))) + i-- + dAtA[i] = 0x12 + } + if len(m.MaxAmount) > 0 { + i -= len(m.MaxAmount) + copy(dAtA[i:], m.MaxAmount) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxAmount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Receipt) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Receipt) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Receipt) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.ActualFee != nil { + size, err := m.ActualFee.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ActualFee) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ActualFee) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ActualFee) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Unit) > 0 { + i -= len(m.Unit) + copy(dAtA[i:], m.Unit) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Unit))) + i-- + dAtA[i] = 0x12 + } + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DataAvailability) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DataAvailability) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DataAvailability) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.L1DataGas != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1DataGas)) + i-- + dAtA[i] = 0x10 + } + if m.L1Gas != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1Gas)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *StateUpdate) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StateUpdate) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StateUpdate) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.StateDiff != nil { + size, err := m.StateDiff.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.NewRoot) > 0 { + i -= len(m.NewRoot) + copy(dAtA[i:], m.NewRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NewRoot))) + i-- + dAtA[i] = 0x12 + } + if len(m.OldRoot) > 0 { + i -= len(m.OldRoot) + copy(dAtA[i:], m.OldRoot) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OldRoot))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StateDiff) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StateDiff) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StateDiff) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Nonces) > 0 { + for iNdEx := len(m.Nonces) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Nonces[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + } + if len(m.ReplacedClasses) > 0 { + for iNdEx := len(m.ReplacedClasses) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.ReplacedClasses[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + } + if len(m.DeployedContracts) > 0 { + for iNdEx := len(m.DeployedContracts) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.DeployedContracts[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if len(m.DeclaredClasses) > 0 { + for iNdEx := len(m.DeclaredClasses) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.DeclaredClasses[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.DeprecatedDeclaredClasses) > 0 { + for iNdEx := len(m.DeprecatedDeclaredClasses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DeprecatedDeclaredClasses[iNdEx]) + copy(dAtA[i:], m.DeprecatedDeclaredClasses[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeprecatedDeclaredClasses[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.StorageDiffs) > 0 { + for iNdEx := len(m.StorageDiffs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.StorageDiffs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *NonceDiff) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NonceDiff) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *NonceDiff) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Nonce) > 0 { + i -= len(m.Nonce) + copy(dAtA[i:], m.Nonce) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) + i-- + dAtA[i] = 0x12 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ReplacedClass) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ReplacedClass) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ReplacedClass) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeployedContract) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeployedContract) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeployedContract) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeclaredClass) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeclaredClass) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeclaredClass) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.CompiledClassHash) > 0 { + i -= len(m.CompiledClassHash) + copy(dAtA[i:], m.CompiledClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClassHash) > 0 { + i -= len(m.ClassHash) + copy(dAtA[i:], m.ClassHash) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ContractStorageDiff) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContractStorageDiff) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ContractStorageDiff) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.StorageEntries) > 0 { + for iNdEx := len(m.StorageEntries) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.StorageEntries[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StorageEntries) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageEntries) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StorageEntries) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Block) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ParentHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.BlockNumber != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.BlockNumber)) + } + l = len(m.NewRoot) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Timestamp != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) + } + l = len(m.SequencerAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.L1GasPrice != nil { + l = m.L1GasPrice.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.L1DataGasPrice != nil { + l = m.L1DataGasPrice.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.L1DaMode != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.L1DaMode)) + } + l = len(m.StarknetVersion) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Transactions) > 0 { + for _, e := range m.Transactions { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.StateUpdate != nil { + l = m.StateUpdate.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ResourcePrice) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PriceInFri) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.PriceInWei) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *TransactionWithReceipt) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.Transaction.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + if m.Receipt != nil { + l = m.Receipt.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *TransactionWithReceipt_InvokeTransactionV0) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.InvokeTransactionV0 != nil { + l = m.InvokeTransactionV0.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_InvokeTransactionV1) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.InvokeTransactionV1 != nil { + l = m.InvokeTransactionV1.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_InvokeTransactionV3) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.InvokeTransactionV3 != nil { + l = m.InvokeTransactionV3.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_L1HandlerTransaction) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.L1HandlerTransaction != nil { + l = m.L1HandlerTransaction.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_DeclareTransactionV0) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DeclareTransactionV0 != nil { + l = m.DeclareTransactionV0.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_DeclareTransactionV1) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DeclareTransactionV1 != nil { + l = m.DeclareTransactionV1.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_DeclareTransactionV2) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DeclareTransactionV2 != nil { + l = m.DeclareTransactionV2.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_DeclareTransactionV3) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DeclareTransactionV3 != nil { + l = m.DeclareTransactionV3.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_DeployTransactionV0) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DeployTransactionV0 != nil { + l = m.DeployTransactionV0.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_DeployAccountTransactionV1) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DeployAccountTransactionV1 != nil { + l = m.DeployAccountTransactionV1.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionWithReceipt_DeployAccountTransactionV3) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DeployAccountTransactionV3 != nil { + l = m.DeployAccountTransactionV3.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + return n +} +func (m *TransactionReceipt) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TransactionHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ActualFee != nil { + l = m.ActualFee.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ExecutionStatus != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.ExecutionStatus)) + } + l = len(m.RevertReason) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Type != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Type)) + } + l = len(m.MessageHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.MessagesSent) > 0 { + for _, e := range m.MessagesSent { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.ExecutionResources != nil { + l = m.ExecutionResources.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *MessagesSent) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FromAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ToAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Payload) > 0 { + for _, b := range m.Payload { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *Event) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FromAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Keys) > 0 { + for _, b := range m.Keys { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.Data) > 0 { + for _, b := range m.Data { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *ExecutionResources) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Steps != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Steps)) + } + if m.MemoryHoles != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.MemoryHoles)) + } + if m.RangeCheckBuiltinApplications != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.RangeCheckBuiltinApplications)) + } + if m.PedersenBuiltinApplications != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.PedersenBuiltinApplications)) + } + if m.PoseidonBuiltinApplications != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.PoseidonBuiltinApplications)) + } + if m.EcOpBuiltinApplications != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.EcOpBuiltinApplications)) + } + if m.EcdsaBuiltinApplications != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.EcdsaBuiltinApplications)) + } + if m.BitwiseBuiltinApplications != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.BitwiseBuiltinApplications)) + } + if m.KeccakBuiltinApplications != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.KeccakBuiltinApplications)) + } + if m.SegmentArenaBuiltin != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.SegmentArenaBuiltin)) + } + if m.DataAvailability != nil { + l = m.DataAvailability.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *InvokeTransactionV0) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MaxFee) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.EntryPointSelector) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Calldata) > 0 { + for _, b := range m.Calldata { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *InvokeTransactionV1) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MaxFee) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Calldata) > 0 { + for _, b := range m.Calldata { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *InvokeTransactionV3) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Calldata) > 0 { + for _, b := range m.Calldata { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ResourceBounds != nil { + l = m.ResourceBounds.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Tip) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.PaymasterData) > 0 { + for _, b := range m.PaymasterData { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.AccountDeploymentData) > 0 { + for _, b := range m.AccountDeploymentData { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.NonceDataAvailabilityMode != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.NonceDataAvailabilityMode)) + } + if m.FeeDataAvailabilityMode != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.FeeDataAvailabilityMode)) + } + n += len(m.unknownFields) + return n +} + +func (m *L1HandlerTransaction) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.EntryPointSelector) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Calldata) > 0 { + for _, b := range m.Calldata { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *DeclareTransactionV0) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.MaxFee) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeclareTransactionV1) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.MaxFee) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeclareTransactionV2) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.CompiledClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.MaxFee) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeclareTransactionV3) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.CompiledClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ResourceBounds != nil { + l = m.ResourceBounds.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Tip) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.PaymasterData) > 0 { + for _, b := range m.PaymasterData { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.AccountDeploymentData) > 0 { + for _, b := range m.AccountDeploymentData { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.NonceDataAvailabilityMode != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.NonceDataAvailabilityMode)) + } + if m.FeeDataAvailabilityMode != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.FeeDataAvailabilityMode)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeployTransactionV0) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ContractAddressSalt) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.ConstructorCalldata) > 0 { + for _, b := range m.ConstructorCalldata { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *DeployAccountTransactionV1) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MaxFee) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ContractAddressSalt) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.ConstructorCalldata) > 0 { + for _, b := range m.ConstructorCalldata { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *DeployAccountTransactionV3) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Version) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Signature) > 0 { + for _, b := range m.Signature { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ContractAddressSalt) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.ConstructorCalldata) > 0 { + for _, b := range m.ConstructorCalldata { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ResourceBounds != nil { + l = m.ResourceBounds.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Tip) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.PaymasterData) > 0 { + for _, b := range m.PaymasterData { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.NonceDataAvailabilityMode != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.NonceDataAvailabilityMode)) + } + if m.FeeDataAvailabilityMode != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.FeeDataAvailabilityMode)) + } + n += len(m.unknownFields) + return n +} + +func (m *ResourceBounds) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.L1Gas != nil { + l = m.L1Gas.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.L2Gas != nil { + l = m.L2Gas.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Resource) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MaxAmount) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.MaxPricePerUnit) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Receipt) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ActualFee != nil { + l = m.ActualFee.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ActualFee) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Amount) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Unit) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DataAvailability) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.L1Gas != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.L1Gas)) + } + if m.L1DataGas != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.L1DataGas)) + } + n += len(m.unknownFields) + return n +} + +func (m *StateUpdate) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OldRoot) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.NewRoot) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.StateDiff != nil { + l = m.StateDiff.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *StateDiff) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StorageDiffs) > 0 { + for _, e := range m.StorageDiffs { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.DeprecatedDeclaredClasses) > 0 { + for _, b := range m.DeprecatedDeclaredClasses { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.DeclaredClasses) > 0 { + for _, e := range m.DeclaredClasses { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.DeployedContracts) > 0 { + for _, e := range m.DeployedContracts { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.ReplacedClasses) > 0 { + for _, e := range m.ReplacedClasses { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.Nonces) > 0 { + for _, e := range m.Nonces { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *NonceDiff) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Nonce) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ReplacedClass) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeployedContract) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeclaredClass) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.CompiledClassHash) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ContractStorageDiff) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.StorageEntries) > 0 { + for _, e := range m.StorageEntries { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *StorageEntries) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Block) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Block: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = append(m.BlockHash[:0], dAtA[iNdEx:postIndex]...) + if m.BlockHash == nil { + m.BlockHash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParentHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ParentHash = append(m.ParentHash[:0], dAtA[iNdEx:postIndex]...) + if m.ParentHash == nil { + m.ParentHash = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) + } + m.BlockNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewRoot", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewRoot = append(m.NewRoot[:0], dAtA[iNdEx:postIndex]...) + if m.NewRoot == nil { + m.NewRoot = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SequencerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SequencerAddress = append(m.SequencerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.SequencerAddress == nil { + m.SequencerAddress = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1GasPrice", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L1GasPrice == nil { + m.L1GasPrice = &ResourcePrice{} + } + if err := m.L1GasPrice.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DataGasPrice", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L1DataGasPrice == nil { + m.L1DataGasPrice = &ResourcePrice{} + } + if err := m.L1DataGasPrice.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DaMode", wireType) + } + m.L1DaMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.L1DaMode |= L1_DA_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StarknetVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StarknetVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Transactions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Transactions = append(m.Transactions, &TransactionWithReceipt{}) + if err := m.Transactions[len(m.Transactions)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StateUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StateUpdate == nil { + m.StateUpdate = &StateUpdate{} + } + if err := m.StateUpdate.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourcePrice) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourcePrice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourcePrice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceInFri", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PriceInFri = append(m.PriceInFri[:0], dAtA[iNdEx:postIndex]...) + if m.PriceInFri == nil { + m.PriceInFri = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceInWei", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PriceInWei = append(m.PriceInWei[:0], dAtA[iNdEx:postIndex]...) + if m.PriceInWei == nil { + m.PriceInWei = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TransactionWithReceipt) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TransactionWithReceipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransactionWithReceipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV0", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV0); ok { + if err := oneof.InvokeTransactionV0.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &InvokeTransactionV0{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_InvokeTransactionV0{InvokeTransactionV0: v} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV1); ok { + if err := oneof.InvokeTransactionV1.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &InvokeTransactionV1{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_InvokeTransactionV1{InvokeTransactionV1: v} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV3); ok { + if err := oneof.InvokeTransactionV3.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &InvokeTransactionV3{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_InvokeTransactionV3{InvokeTransactionV3: v} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1HandlerTransaction", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_L1HandlerTransaction); ok { + if err := oneof.L1HandlerTransaction.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &L1HandlerTransaction{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_L1HandlerTransaction{L1HandlerTransaction: v} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV0", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV0); ok { + if err := oneof.DeclareTransactionV0.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV0{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV0{DeclareTransactionV0: v} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV1); ok { + if err := oneof.DeclareTransactionV1.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV1{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV1{DeclareTransactionV1: v} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV2); ok { + if err := oneof.DeclareTransactionV2.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV2{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV2{DeclareTransactionV2: v} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV3); ok { + if err := oneof.DeclareTransactionV3.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV3{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV3{DeclareTransactionV3: v} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployTransactionV0", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployTransactionV0); ok { + if err := oneof.DeployTransactionV0.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeployTransactionV0{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeployTransactionV0{DeployTransactionV0: v} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployAccountTransactionV1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV1); ok { + if err := oneof.DeployAccountTransactionV1.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeployAccountTransactionV1{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeployAccountTransactionV1{DeployAccountTransactionV1: v} + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployAccountTransactionV3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV3); ok { + if err := oneof.DeployAccountTransactionV3.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeployAccountTransactionV3{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeployAccountTransactionV3{DeployAccountTransactionV3: v} + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Receipt == nil { + m.Receipt = &TransactionReceipt{} + } + if err := m.Receipt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TransactionReceipt) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TransactionReceipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransactionReceipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TransactionHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TransactionHash = append(m.TransactionHash[:0], dAtA[iNdEx:postIndex]...) + if m.TransactionHash == nil { + m.TransactionHash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActualFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ActualFee == nil { + m.ActualFee = &ActualFee{} + } + if err := m.ActualFee.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionStatus", wireType) + } + m.ExecutionStatus = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExecutionStatus |= EXECUTION_STATUS(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RevertReason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RevertReason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= TRANSACTION_TYPE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MessageHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MessageHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MessagesSent", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MessagesSent = append(m.MessagesSent, &MessagesSent{}) + if err := m.MessagesSent[len(m.MessagesSent)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Events = append(m.Events, &Event{}) + if err := m.Events[len(m.Events)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionResources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExecutionResources == nil { + m.ExecutionResources = &ExecutionResources{} + } + if err := m.ExecutionResources.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = append(m.ContractAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddress == nil { + m.ContractAddress = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MessagesSent) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MessagesSent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MessagesSent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) + if m.FromAddress == nil { + m.FromAddress = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ToAddress == nil { + m.ToAddress = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload, make([]byte, postIndex-iNdEx)) + copy(m.Payload[len(m.Payload)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Event) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) + if m.FromAddress == nil { + m.FromAddress = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keys = append(m.Keys, make([]byte, postIndex-iNdEx)) + copy(m.Keys[len(m.Keys)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data, make([]byte, postIndex-iNdEx)) + copy(m.Data[len(m.Data)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecutionResources) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecutionResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecutionResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Steps", wireType) + } + m.Steps = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Steps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryHoles", wireType) + } + m.MemoryHoles = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryHoles |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RangeCheckBuiltinApplications", wireType) + } + m.RangeCheckBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RangeCheckBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PedersenBuiltinApplications", wireType) + } + m.PedersenBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PedersenBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoseidonBuiltinApplications", wireType) + } + m.PoseidonBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoseidonBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EcOpBuiltinApplications", wireType) + } + m.EcOpBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EcOpBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EcdsaBuiltinApplications", wireType) + } + m.EcdsaBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EcdsaBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BitwiseBuiltinApplications", wireType) + } + m.BitwiseBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BitwiseBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field KeccakBuiltinApplications", wireType) + } + m.KeccakBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.KeccakBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SegmentArenaBuiltin", wireType) + } + m.SegmentArenaBuiltin = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SegmentArenaBuiltin |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DataAvailability", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DataAvailability == nil { + m.DataAvailability = &DataAvailability{} + } + if err := m.DataAvailability.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InvokeTransactionV0) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InvokeTransactionV0: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InvokeTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) + if m.MaxFee == nil { + m.MaxFee = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = append(m.ContractAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddress == nil { + m.ContractAddress = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EntryPointSelector", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EntryPointSelector = append(m.EntryPointSelector[:0], dAtA[iNdEx:postIndex]...) + if m.EntryPointSelector == nil { + m.EntryPointSelector = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, make([]byte, postIndex-iNdEx)) + copy(m.Calldata[len(m.Calldata)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InvokeTransactionV1) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InvokeTransactionV1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InvokeTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) + if m.MaxFee == nil { + m.MaxFee = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) + if m.SenderAddress == nil { + m.SenderAddress = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, make([]byte, postIndex-iNdEx)) + copy(m.Calldata[len(m.Calldata)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InvokeTransactionV3) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InvokeTransactionV3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InvokeTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) + if m.SenderAddress == nil { + m.SenderAddress = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, make([]byte, postIndex-iNdEx)) + copy(m.Calldata[len(m.Calldata)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceBounds == nil { + m.ResourceBounds = &ResourceBounds{} + } + if err := m.ResourceBounds.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = append(m.Tip[:0], dAtA[iNdEx:postIndex]...) + if m.Tip == nil { + m.Tip = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymasterData = append(m.PaymasterData, make([]byte, postIndex-iNdEx)) + copy(m.PaymasterData[len(m.PaymasterData)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountDeploymentData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountDeploymentData = append(m.AccountDeploymentData, make([]byte, postIndex-iNdEx)) + copy(m.AccountDeploymentData[len(m.AccountDeploymentData)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) + } + m.NonceDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) + } + m.FeeDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *L1HandlerTransaction) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: L1HandlerTransaction: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: L1HandlerTransaction: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = append(m.ContractAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddress == nil { + m.ContractAddress = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EntryPointSelector", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EntryPointSelector = append(m.EntryPointSelector[:0], dAtA[iNdEx:postIndex]...) + if m.EntryPointSelector == nil { + m.EntryPointSelector = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, make([]byte, postIndex-iNdEx)) + copy(m.Calldata[len(m.Calldata)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV0) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV0: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) + if m.SenderAddress == nil { + m.SenderAddress = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) + if m.MaxFee == nil { + m.MaxFee = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV1) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) + if m.SenderAddress == nil { + m.SenderAddress = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) + if m.MaxFee == nil { + m.MaxFee = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV2) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV2: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV2: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) + if m.SenderAddress == nil { + m.SenderAddress = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompiledClassHash = append(m.CompiledClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.CompiledClassHash == nil { + m.CompiledClassHash = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) + if m.MaxFee == nil { + m.MaxFee = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV3) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) + if m.SenderAddress == nil { + m.SenderAddress = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompiledClassHash = append(m.CompiledClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.CompiledClassHash == nil { + m.CompiledClassHash = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceBounds == nil { + m.ResourceBounds = &ResourceBounds{} + } + if err := m.ResourceBounds.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = append(m.Tip[:0], dAtA[iNdEx:postIndex]...) + if m.Tip == nil { + m.Tip = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymasterData = append(m.PaymasterData, make([]byte, postIndex-iNdEx)) + copy(m.PaymasterData[len(m.PaymasterData)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountDeploymentData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountDeploymentData = append(m.AccountDeploymentData, make([]byte, postIndex-iNdEx)) + copy(m.AccountDeploymentData[len(m.AccountDeploymentData)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) + } + m.NonceDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) + } + m.FeeDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployTransactionV0) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployTransactionV0: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddressSalt = append(m.ContractAddressSalt[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddressSalt == nil { + m.ContractAddressSalt = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConstructorCalldata = append(m.ConstructorCalldata, make([]byte, postIndex-iNdEx)) + copy(m.ConstructorCalldata[len(m.ConstructorCalldata)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployAccountTransactionV1) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployAccountTransactionV1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployAccountTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) + if m.MaxFee == nil { + m.MaxFee = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddressSalt = append(m.ContractAddressSalt[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddressSalt == nil { + m.ContractAddressSalt = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConstructorCalldata = append(m.ConstructorCalldata, make([]byte, postIndex-iNdEx)) + copy(m.ConstructorCalldata[len(m.ConstructorCalldata)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployAccountTransactionV3) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployAccountTransactionV3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployAccountTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) + copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddressSalt = append(m.ContractAddressSalt[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddressSalt == nil { + m.ContractAddressSalt = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConstructorCalldata = append(m.ConstructorCalldata, make([]byte, postIndex-iNdEx)) + copy(m.ConstructorCalldata[len(m.ConstructorCalldata)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceBounds == nil { + m.ResourceBounds = &ResourceBounds{} + } + if err := m.ResourceBounds.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = append(m.Tip[:0], dAtA[iNdEx:postIndex]...) + if m.Tip == nil { + m.Tip = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymasterData = append(m.PaymasterData, make([]byte, postIndex-iNdEx)) + copy(m.PaymasterData[len(m.PaymasterData)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) + } + m.NonceDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) + } + m.FeeDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceBounds) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceBounds: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceBounds: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1Gas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L1Gas == nil { + m.L1Gas = &Resource{} + } + if err := m.L1Gas.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L2Gas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L2Gas == nil { + m.L2Gas = &Resource{} + } + if err := m.L2Gas.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Resource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxAmount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxPricePerUnit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxPricePerUnit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Receipt) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Receipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Receipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActualFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ActualFee == nil { + m.ActualFee = &ActualFee{} + } + if err := m.ActualFee.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ActualFee) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ActualFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ActualFee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount[:0], dAtA[iNdEx:postIndex]...) + if m.Amount == nil { + m.Amount = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Unit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DataAvailability) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DataAvailability: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DataAvailability: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1Gas", wireType) + } + m.L1Gas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.L1Gas |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DataGas", wireType) + } + m.L1DataGas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.L1DataGas |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StateUpdate) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StateUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StateUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OldRoot", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OldRoot = append(m.OldRoot[:0], dAtA[iNdEx:postIndex]...) + if m.OldRoot == nil { + m.OldRoot = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewRoot", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewRoot = append(m.NewRoot[:0], dAtA[iNdEx:postIndex]...) + if m.NewRoot == nil { + m.NewRoot = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StateDiff", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StateDiff == nil { + m.StateDiff = &StateDiff{} + } + if err := m.StateDiff.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StateDiff) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StateDiff: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StateDiff: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageDiffs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageDiffs = append(m.StorageDiffs, &ContractStorageDiff{}) + if err := m.StorageDiffs[len(m.StorageDiffs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedDeclaredClasses", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeprecatedDeclaredClasses = append(m.DeprecatedDeclaredClasses, make([]byte, postIndex-iNdEx)) + copy(m.DeprecatedDeclaredClasses[len(m.DeprecatedDeclaredClasses)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclaredClasses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeclaredClasses = append(m.DeclaredClasses, &DeclaredClass{}) + if err := m.DeclaredClasses[len(m.DeclaredClasses)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployedContracts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeployedContracts = append(m.DeployedContracts, &DeployedContract{}) + if err := m.DeployedContracts[len(m.DeployedContracts)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReplacedClasses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReplacedClasses = append(m.ReplacedClasses, &ReplacedClass{}) + if err := m.ReplacedClasses[len(m.ReplacedClasses)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonces", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonces = append(m.Nonces, &NonceDiff{}) + if err := m.Nonces[len(m.Nonces)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NonceDiff) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NonceDiff: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NonceDiff: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = append(m.ContractAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddress == nil { + m.ContractAddress = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) + if m.Nonce == nil { + m.Nonce = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ReplacedClass) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReplacedClass: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReplacedClass: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = append(m.ContractAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ContractAddress == nil { + m.ContractAddress = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployedContract) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployedContract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployedContract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclaredClass) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclaredClass: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclaredClass: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.ClassHash == nil { + m.ClassHash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompiledClassHash = append(m.CompiledClassHash[:0], dAtA[iNdEx:postIndex]...) + if m.CompiledClassHash == nil { + m.CompiledClassHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContractStorageDiff) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContractStorageDiff: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContractStorageDiff: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageEntries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageEntries = append(m.StorageEntries, &StorageEntries{}) + if err := m.StorageEntries[len(m.StorageEntries)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageEntries) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageEntries: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageEntries: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Block) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Block: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParentHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ParentHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) + } + m.BlockNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewRoot", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewRoot = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SequencerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SequencerAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1GasPrice", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L1GasPrice == nil { + m.L1GasPrice = &ResourcePrice{} + } + if err := m.L1GasPrice.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DataGasPrice", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L1DataGasPrice == nil { + m.L1DataGasPrice = &ResourcePrice{} + } + if err := m.L1DataGasPrice.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DaMode", wireType) + } + m.L1DaMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.L1DaMode |= L1_DA_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StarknetVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.StarknetVersion = stringValue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Transactions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Transactions = append(m.Transactions, &TransactionWithReceipt{}) + if err := m.Transactions[len(m.Transactions)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StateUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StateUpdate == nil { + m.StateUpdate = &StateUpdate{} + } + if err := m.StateUpdate.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourcePrice) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourcePrice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourcePrice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceInFri", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PriceInFri = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceInWei", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PriceInWei = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TransactionWithReceipt) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TransactionWithReceipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransactionWithReceipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV0", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV0); ok { + if err := oneof.InvokeTransactionV0.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &InvokeTransactionV0{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_InvokeTransactionV0{InvokeTransactionV0: v} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV1); ok { + if err := oneof.InvokeTransactionV1.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &InvokeTransactionV1{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_InvokeTransactionV1{InvokeTransactionV1: v} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV3); ok { + if err := oneof.InvokeTransactionV3.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &InvokeTransactionV3{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_InvokeTransactionV3{InvokeTransactionV3: v} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1HandlerTransaction", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_L1HandlerTransaction); ok { + if err := oneof.L1HandlerTransaction.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &L1HandlerTransaction{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_L1HandlerTransaction{L1HandlerTransaction: v} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV0", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV0); ok { + if err := oneof.DeclareTransactionV0.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV0{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV0{DeclareTransactionV0: v} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV1); ok { + if err := oneof.DeclareTransactionV1.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV1{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV1{DeclareTransactionV1: v} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV2); ok { + if err := oneof.DeclareTransactionV2.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV2{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV2{DeclareTransactionV2: v} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV3); ok { + if err := oneof.DeclareTransactionV3.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeclareTransactionV3{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeclareTransactionV3{DeclareTransactionV3: v} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployTransactionV0", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployTransactionV0); ok { + if err := oneof.DeployTransactionV0.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeployTransactionV0{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeployTransactionV0{DeployTransactionV0: v} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployAccountTransactionV1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV1); ok { + if err := oneof.DeployAccountTransactionV1.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeployAccountTransactionV1{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeployAccountTransactionV1{DeployAccountTransactionV1: v} + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployAccountTransactionV3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV3); ok { + if err := oneof.DeployAccountTransactionV3.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &DeployAccountTransactionV3{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Transaction = &TransactionWithReceipt_DeployAccountTransactionV3{DeployAccountTransactionV3: v} + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Receipt == nil { + m.Receipt = &TransactionReceipt{} + } + if err := m.Receipt.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TransactionReceipt) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TransactionReceipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransactionReceipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TransactionHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TransactionHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActualFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ActualFee == nil { + m.ActualFee = &ActualFee{} + } + if err := m.ActualFee.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionStatus", wireType) + } + m.ExecutionStatus = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExecutionStatus |= EXECUTION_STATUS(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RevertReason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.RevertReason = stringValue + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= TRANSACTION_TYPE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MessageHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.MessageHash = stringValue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MessagesSent", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MessagesSent = append(m.MessagesSent, &MessagesSent{}) + if err := m.MessagesSent[len(m.MessagesSent)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Events = append(m.Events, &Event{}) + if err := m.Events[len(m.Events)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionResources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExecutionResources == nil { + m.ExecutionResources = &ExecutionResources{} + } + if err := m.ExecutionResources.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MessagesSent) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MessagesSent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MessagesSent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FromAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ToAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Event) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FromAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keys = append(m.Keys, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecutionResources) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecutionResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecutionResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Steps", wireType) + } + m.Steps = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Steps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryHoles", wireType) + } + m.MemoryHoles = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryHoles |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RangeCheckBuiltinApplications", wireType) + } + m.RangeCheckBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RangeCheckBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PedersenBuiltinApplications", wireType) + } + m.PedersenBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PedersenBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoseidonBuiltinApplications", wireType) + } + m.PoseidonBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoseidonBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EcOpBuiltinApplications", wireType) + } + m.EcOpBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EcOpBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EcdsaBuiltinApplications", wireType) + } + m.EcdsaBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EcdsaBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BitwiseBuiltinApplications", wireType) + } + m.BitwiseBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BitwiseBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field KeccakBuiltinApplications", wireType) + } + m.KeccakBuiltinApplications = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.KeccakBuiltinApplications |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SegmentArenaBuiltin", wireType) + } + m.SegmentArenaBuiltin = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SegmentArenaBuiltin |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DataAvailability", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DataAvailability == nil { + m.DataAvailability = &DataAvailability{} + } + if err := m.DataAvailability.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InvokeTransactionV0) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InvokeTransactionV0: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InvokeTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EntryPointSelector", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EntryPointSelector = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InvokeTransactionV1) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InvokeTransactionV1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InvokeTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InvokeTransactionV3) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InvokeTransactionV3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InvokeTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceBounds == nil { + m.ResourceBounds = &ResourceBounds{} + } + if err := m.ResourceBounds.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymasterData = append(m.PaymasterData, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountDeploymentData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountDeploymentData = append(m.AccountDeploymentData, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) + } + m.NonceDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) + } + m.FeeDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *L1HandlerTransaction) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: L1HandlerTransaction: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: L1HandlerTransaction: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Nonce = stringValue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EntryPointSelector", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EntryPointSelector = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Calldata = append(m.Calldata, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV0) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV0: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV1) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV2) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV2: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV2: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompiledClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclareTransactionV3) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclareTransactionV3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclareTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompiledClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceBounds == nil { + m.ResourceBounds = &ResourceBounds{} + } + if err := m.ResourceBounds.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymasterData = append(m.PaymasterData, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountDeploymentData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountDeploymentData = append(m.AccountDeploymentData, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) + } + m.NonceDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) + } + m.FeeDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployTransactionV0) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployTransactionV0: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddressSalt = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConstructorCalldata = append(m.ConstructorCalldata, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployAccountTransactionV1) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployAccountTransactionV1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployAccountTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxFee = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddressSalt = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConstructorCalldata = append(m.ConstructorCalldata, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployAccountTransactionV3) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployAccountTransactionV3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployAccountTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Version = stringValue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddressSalt = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConstructorCalldata = append(m.ConstructorCalldata, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceBounds == nil { + m.ResourceBounds = &ResourceBounds{} + } + if err := m.ResourceBounds.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymasterData = append(m.PaymasterData, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) + } + m.NonceDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) + } + m.FeeDataAvailabilityMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceBounds) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceBounds: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceBounds: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L1Gas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L1Gas == nil { + m.L1Gas = &Resource{} + } + if err := m.L1Gas.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field L2Gas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.L2Gas == nil { + m.L2Gas = &Resource{} + } + if err := m.L2Gas.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Resource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.MaxAmount = stringValue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxPricePerUnit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.MaxPricePerUnit = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Receipt) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Receipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Receipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActualFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ActualFee == nil { + m.ActualFee = &ActualFee{} + } + if err := m.ActualFee.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ActualFee) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ActualFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ActualFee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Unit = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DataAvailability) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DataAvailability: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DataAvailability: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1Gas", wireType) + } + m.L1Gas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.L1Gas |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DataGas", wireType) + } + m.L1DataGas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.L1DataGas |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StateUpdate) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StateUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StateUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OldRoot", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OldRoot = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewRoot", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewRoot = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StateDiff", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StateDiff == nil { + m.StateDiff = &StateDiff{} + } + if err := m.StateDiff.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StateDiff) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StateDiff: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StateDiff: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageDiffs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageDiffs = append(m.StorageDiffs, &ContractStorageDiff{}) + if err := m.StorageDiffs[len(m.StorageDiffs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedDeclaredClasses", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeprecatedDeclaredClasses = append(m.DeprecatedDeclaredClasses, dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeclaredClasses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeclaredClasses = append(m.DeclaredClasses, &DeclaredClass{}) + if err := m.DeclaredClasses[len(m.DeclaredClasses)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeployedContracts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeployedContracts = append(m.DeployedContracts, &DeployedContract{}) + if err := m.DeployedContracts[len(m.DeployedContracts)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReplacedClasses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReplacedClasses = append(m.ReplacedClasses, &ReplacedClass{}) + if err := m.ReplacedClasses[len(m.ReplacedClasses)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonces", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonces = append(m.Nonces, &NonceDiff{}) + if err := m.Nonces[len(m.Nonces)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NonceDiff) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NonceDiff: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NonceDiff: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nonce = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ReplacedClass) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReplacedClass: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReplacedClass: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeployedContract) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeployedContract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeployedContract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeclaredClass) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeclaredClass: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeclaredClass: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompiledClassHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContractStorageDiff) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContractStorageDiff: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContractStorageDiff: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageEntries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageEntries = append(m.StorageEntries, &StorageEntries{}) + if err := m.StorageEntries[len(m.StorageEntries)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageEntries) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageEntries: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageEntries: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/starknet-common/pb/sf/substreams/index/v1/keys.pb.go b/starknet-common/pb/sf/substreams/index/v1/keys.pb.go new file mode 100644 index 0000000..39248e4 --- /dev/null +++ b/starknet-common/pb/sf/substreams/index/v1/keys.pb.go @@ -0,0 +1,159 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: sf/substreams/index/v1/keys.proto + +package indexv1 + +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) +) + +type Keys struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` +} + +func (x *Keys) Reset() { + *x = Keys{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_substreams_index_v1_keys_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Keys) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Keys) ProtoMessage() {} + +func (x *Keys) ProtoReflect() protoreflect.Message { + mi := &file_sf_substreams_index_v1_keys_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 Keys.ProtoReflect.Descriptor instead. +func (*Keys) Descriptor() ([]byte, []int) { + return file_sf_substreams_index_v1_keys_proto_rawDescGZIP(), []int{0} +} + +func (x *Keys) GetKeys() []string { + if x != nil { + return x.Keys + } + return nil +} + +var File_sf_substreams_index_v1_keys_proto protoreflect.FileDescriptor + +var file_sf_substreams_index_v1_keys_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x73, 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x76, 0x31, 0x22, 0x1a, 0x0a, 0x04, 0x4b, + 0x65, 0x79, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x42, 0x8d, 0x02, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, + 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x4b, 0x65, 0x79, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x69, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, 0x2f, 0x73, 0x75, + 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2d, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x2f, + 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x53, 0x53, 0x49, 0xaa, 0x02, 0x16, 0x53, 0x66, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x16, + 0x53, 0x66, 0x5c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x22, 0x53, 0x66, 0x5c, 0x53, 0x75, 0x62, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x53, 0x66, + 0x3a, 0x3a, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x3a, 0x3a, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sf_substreams_index_v1_keys_proto_rawDescOnce sync.Once + file_sf_substreams_index_v1_keys_proto_rawDescData = file_sf_substreams_index_v1_keys_proto_rawDesc +) + +func file_sf_substreams_index_v1_keys_proto_rawDescGZIP() []byte { + file_sf_substreams_index_v1_keys_proto_rawDescOnce.Do(func() { + file_sf_substreams_index_v1_keys_proto_rawDescData = protoimpl.X.CompressGZIP(file_sf_substreams_index_v1_keys_proto_rawDescData) + }) + return file_sf_substreams_index_v1_keys_proto_rawDescData +} + +var file_sf_substreams_index_v1_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_sf_substreams_index_v1_keys_proto_goTypes = []interface{}{ + (*Keys)(nil), // 0: sf.substreams.index.v1.Keys +} +var file_sf_substreams_index_v1_keys_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_sf_substreams_index_v1_keys_proto_init() } +func file_sf_substreams_index_v1_keys_proto_init() { + if File_sf_substreams_index_v1_keys_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sf_substreams_index_v1_keys_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Keys); 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_sf_substreams_index_v1_keys_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sf_substreams_index_v1_keys_proto_goTypes, + DependencyIndexes: file_sf_substreams_index_v1_keys_proto_depIdxs, + MessageInfos: file_sf_substreams_index_v1_keys_proto_msgTypes, + }.Build() + File_sf_substreams_index_v1_keys_proto = out.File + file_sf_substreams_index_v1_keys_proto_rawDesc = nil + file_sf_substreams_index_v1_keys_proto_goTypes = nil + file_sf_substreams_index_v1_keys_proto_depIdxs = nil +} diff --git a/starknet-common/pb/sf/substreams/index/v1/keys_vtproto.pb.go b/starknet-common/pb/sf/substreams/index/v1/keys_vtproto.pb.go new file mode 100644 index 0000000..c765d9a --- /dev/null +++ b/starknet-common/pb/sf/substreams/index/v1/keys_vtproto.pb.go @@ -0,0 +1,338 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.6.0 +// source: sf/substreams/index/v1/keys.proto + +package indexv1 + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + proto "google.golang.org/protobuf/proto" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + unsafe "unsafe" +) + +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) +) + +func (m *Keys) CloneVT() *Keys { + if m == nil { + return (*Keys)(nil) + } + r := new(Keys) + if rhs := m.Keys; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.Keys = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Keys) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (this *Keys) EqualVT(that *Keys) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.Keys) != len(that.Keys) { + return false + } + for i, vx := range this.Keys { + vy := that.Keys[i] + if vx != vy { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Keys) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Keys) + if !ok { + return false + } + return this.EqualVT(that) +} +func (m *Keys) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Keys) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Keys) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Keys) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Keys) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Keys) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Keys) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Keys) > 0 { + for _, s := range m.Keys { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *Keys) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Keys: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Keys: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keys = append(m.Keys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Keys) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Keys: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Keys: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Keys = append(m.Keys, stringValue) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/starknet-common/pb/sf/substreams/starknet/type/v1/starknet.pb.go b/starknet-common/pb/sf/substreams/starknet/type/v1/starknet.pb.go new file mode 100644 index 0000000..5af88cc --- /dev/null +++ b/starknet-common/pb/sf/substreams/starknet/type/v1/starknet.pb.go @@ -0,0 +1,194 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: sf/substreams/starknet/type/v1/starknet.proto + +package typev1 + +import ( + v11 "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/starknet/type/v1" + _ "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/substreams/index/v1" + v1 "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/substreams/v1" + 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) +) + +type Transactions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Clock *v1.Clock `protobuf:"bytes,1,opt,name=clock,proto3" json:"clock,omitempty"` + TransactionsWithReceipt []*v11.TransactionWithReceipt `protobuf:"bytes,2,rep,name=transactions_with_receipt,json=transactionsWithReceipt,proto3" json:"transactions_with_receipt,omitempty"` +} + +func (x *Transactions) Reset() { + *x = Transactions{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_substreams_starknet_type_v1_starknet_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Transactions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transactions) ProtoMessage() {} + +func (x *Transactions) ProtoReflect() protoreflect.Message { + mi := &file_sf_substreams_starknet_type_v1_starknet_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 Transactions.ProtoReflect.Descriptor instead. +func (*Transactions) Descriptor() ([]byte, []int) { + return file_sf_substreams_starknet_type_v1_starknet_proto_rawDescGZIP(), []int{0} +} + +func (x *Transactions) GetClock() *v1.Clock { + if x != nil { + return x.Clock + } + return nil +} + +func (x *Transactions) GetTransactionsWithReceipt() []*v11.TransactionWithReceipt { + if x != nil { + return x.TransactionsWithReceipt + } + return nil +} + +var File_sf_substreams_starknet_type_v1_starknet_proto protoreflect.FileDescriptor + +var file_sf_substreams_starknet_type_v1_starknet_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x1e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x73, + 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x1a, + 0x1f, 0x73, 0x66, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x21, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xa6, 0x01, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x67, 0x0a, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, + 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, + 0x74, 0x52, 0x17, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x57, + 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x42, 0xc2, 0x02, 0x0a, 0x22, 0x63, + 0x6f, 0x6d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, + 0x31, 0x42, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x70, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, 0x2f, 0x73, 0x75, 0x62, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2d, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x2d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x2f, 0x73, + 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x79, + 0x70, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x53, 0x53, 0x53, 0x54, 0xaa, 0x02, 0x1e, 0x53, 0x66, + 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x72, + 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1e, 0x53, + 0x66, 0x5c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x53, 0x74, 0x61, + 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x2a, + 0x53, 0x66, 0x5c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x53, 0x74, + 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x22, 0x53, 0x66, 0x3a, + 0x3a, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x61, + 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sf_substreams_starknet_type_v1_starknet_proto_rawDescOnce sync.Once + file_sf_substreams_starknet_type_v1_starknet_proto_rawDescData = file_sf_substreams_starknet_type_v1_starknet_proto_rawDesc +) + +func file_sf_substreams_starknet_type_v1_starknet_proto_rawDescGZIP() []byte { + file_sf_substreams_starknet_type_v1_starknet_proto_rawDescOnce.Do(func() { + file_sf_substreams_starknet_type_v1_starknet_proto_rawDescData = protoimpl.X.CompressGZIP(file_sf_substreams_starknet_type_v1_starknet_proto_rawDescData) + }) + return file_sf_substreams_starknet_type_v1_starknet_proto_rawDescData +} + +var file_sf_substreams_starknet_type_v1_starknet_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_sf_substreams_starknet_type_v1_starknet_proto_goTypes = []interface{}{ + (*Transactions)(nil), // 0: sf.substreams.starknet.type.v1.Transactions + (*v1.Clock)(nil), // 1: sf.substreams.v1.Clock + (*v11.TransactionWithReceipt)(nil), // 2: sf.starknet.type.v1.TransactionWithReceipt +} +var file_sf_substreams_starknet_type_v1_starknet_proto_depIdxs = []int32{ + 1, // 0: sf.substreams.starknet.type.v1.Transactions.clock:type_name -> sf.substreams.v1.Clock + 2, // 1: sf.substreams.starknet.type.v1.Transactions.transactions_with_receipt:type_name -> sf.starknet.type.v1.TransactionWithReceipt + 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_sf_substreams_starknet_type_v1_starknet_proto_init() } +func file_sf_substreams_starknet_type_v1_starknet_proto_init() { + if File_sf_substreams_starknet_type_v1_starknet_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sf_substreams_starknet_type_v1_starknet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Transactions); 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_sf_substreams_starknet_type_v1_starknet_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sf_substreams_starknet_type_v1_starknet_proto_goTypes, + DependencyIndexes: file_sf_substreams_starknet_type_v1_starknet_proto_depIdxs, + MessageInfos: file_sf_substreams_starknet_type_v1_starknet_proto_msgTypes, + }.Build() + File_sf_substreams_starknet_type_v1_starknet_proto = out.File + file_sf_substreams_starknet_type_v1_starknet_proto_rawDesc = nil + file_sf_substreams_starknet_type_v1_starknet_proto_goTypes = nil + file_sf_substreams_starknet_type_v1_starknet_proto_depIdxs = nil +} diff --git a/starknet-common/pb/sf/substreams/starknet/type/v1/starknet_vtproto.pb.go b/starknet-common/pb/sf/substreams/starknet/type/v1/starknet_vtproto.pb.go new file mode 100644 index 0000000..d4f81e0 --- /dev/null +++ b/starknet-common/pb/sf/substreams/starknet/type/v1/starknet_vtproto.pb.go @@ -0,0 +1,455 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.6.0 +// source: sf/substreams/starknet/type/v1/starknet.proto + +package typev1 + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + v1 "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/starknet/type/v1" + v11 "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/substreams/v1" + proto "google.golang.org/protobuf/proto" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" +) + +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) +) + +func (m *Transactions) CloneVT() *Transactions { + if m == nil { + return (*Transactions)(nil) + } + r := new(Transactions) + r.Clock = m.Clock.CloneVT() + if rhs := m.TransactionsWithReceipt; rhs != nil { + tmpContainer := make([]*v1.TransactionWithReceipt, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.TransactionsWithReceipt = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Transactions) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (this *Transactions) EqualVT(that *Transactions) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.Clock.EqualVT(that.Clock) { + return false + } + if len(this.TransactionsWithReceipt) != len(that.TransactionsWithReceipt) { + return false + } + for i, vx := range this.TransactionsWithReceipt { + vy := that.TransactionsWithReceipt[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &v1.TransactionWithReceipt{} + } + if q == nil { + q = &v1.TransactionWithReceipt{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Transactions) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Transactions) + if !ok { + return false + } + return this.EqualVT(that) +} +func (m *Transactions) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Transactions) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Transactions) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.TransactionsWithReceipt) > 0 { + for iNdEx := len(m.TransactionsWithReceipt) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.TransactionsWithReceipt[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if m.Clock != nil { + size, err := m.Clock.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Transactions) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Transactions) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Transactions) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.TransactionsWithReceipt) > 0 { + for iNdEx := len(m.TransactionsWithReceipt) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.TransactionsWithReceipt[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if m.Clock != nil { + size, err := m.Clock.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Transactions) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Clock != nil { + l = m.Clock.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.TransactionsWithReceipt) > 0 { + for _, e := range m.TransactionsWithReceipt { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *Transactions) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Transactions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Transactions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Clock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Clock == nil { + m.Clock = &v11.Clock{} + } + if err := m.Clock.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TransactionsWithReceipt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TransactionsWithReceipt = append(m.TransactionsWithReceipt, &v1.TransactionWithReceipt{}) + if err := m.TransactionsWithReceipt[len(m.TransactionsWithReceipt)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Transactions) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Transactions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Transactions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Clock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Clock == nil { + m.Clock = &v11.Clock{} + } + if err := m.Clock.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TransactionsWithReceipt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TransactionsWithReceipt = append(m.TransactionsWithReceipt, &v1.TransactionWithReceipt{}) + if err := m.TransactionsWithReceipt[len(m.TransactionsWithReceipt)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/starknet-common/pb/sf/substreams/v1/clock.pb.go b/starknet-common/pb/sf/substreams/v1/clock.pb.go new file mode 100644 index 0000000..0257032 --- /dev/null +++ b/starknet-common/pb/sf/substreams/v1/clock.pb.go @@ -0,0 +1,256 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: sf/substreams/v1/clock.proto + +package substreamsv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + 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) +) + +// Clock is a pointer to a block with added timestamp +type Clock struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Number uint64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *Clock) Reset() { + *x = Clock{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_substreams_v1_clock_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Clock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Clock) ProtoMessage() {} + +func (x *Clock) ProtoReflect() protoreflect.Message { + mi := &file_sf_substreams_v1_clock_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 Clock.ProtoReflect.Descriptor instead. +func (*Clock) Descriptor() ([]byte, []int) { + return file_sf_substreams_v1_clock_proto_rawDescGZIP(), []int{0} +} + +func (x *Clock) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Clock) GetNumber() uint64 { + if x != nil { + return x.Number + } + return 0 +} + +func (x *Clock) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// BlockRef is a pointer to a block to which we don't know the timestamp +type BlockRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Number uint64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` +} + +func (x *BlockRef) Reset() { + *x = BlockRef{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_substreams_v1_clock_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockRef) ProtoMessage() {} + +func (x *BlockRef) ProtoReflect() protoreflect.Message { + mi := &file_sf_substreams_v1_clock_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 BlockRef.ProtoReflect.Descriptor instead. +func (*BlockRef) Descriptor() ([]byte, []int) { + return file_sf_substreams_v1_clock_proto_rawDescGZIP(), []int{1} +} + +func (x *BlockRef) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *BlockRef) GetNumber() uint64 { + if x != nil { + return x.Number + } + return 0 +} + +var File_sf_substreams_v1_clock_proto protoreflect.FileDescriptor + +var file_sf_substreams_v1_clock_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, + 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x69, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x32, 0x0a, 0x08, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x66, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x42, 0xee, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x43, 0x6c, 0x6f, 0x63, 0x6b, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, + 0x74, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2d, 0x66, 0x6f, 0x75, + 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x10, 0x53, 0x66, 0x2e, 0x53, 0x75, 0x62, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x53, 0x66, 0x5c, + 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, + 0x53, 0x66, 0x5c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x53, + 0x66, 0x3a, 0x3a, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sf_substreams_v1_clock_proto_rawDescOnce sync.Once + file_sf_substreams_v1_clock_proto_rawDescData = file_sf_substreams_v1_clock_proto_rawDesc +) + +func file_sf_substreams_v1_clock_proto_rawDescGZIP() []byte { + file_sf_substreams_v1_clock_proto_rawDescOnce.Do(func() { + file_sf_substreams_v1_clock_proto_rawDescData = protoimpl.X.CompressGZIP(file_sf_substreams_v1_clock_proto_rawDescData) + }) + return file_sf_substreams_v1_clock_proto_rawDescData +} + +var file_sf_substreams_v1_clock_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_sf_substreams_v1_clock_proto_goTypes = []interface{}{ + (*Clock)(nil), // 0: sf.substreams.v1.Clock + (*BlockRef)(nil), // 1: sf.substreams.v1.BlockRef + (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp +} +var file_sf_substreams_v1_clock_proto_depIdxs = []int32{ + 2, // 0: sf.substreams.v1.Clock.timestamp:type_name -> google.protobuf.Timestamp + 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_sf_substreams_v1_clock_proto_init() } +func file_sf_substreams_v1_clock_proto_init() { + if File_sf_substreams_v1_clock_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sf_substreams_v1_clock_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Clock); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_substreams_v1_clock_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockRef); 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_sf_substreams_v1_clock_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sf_substreams_v1_clock_proto_goTypes, + DependencyIndexes: file_sf_substreams_v1_clock_proto_depIdxs, + MessageInfos: file_sf_substreams_v1_clock_proto_msgTypes, + }.Build() + File_sf_substreams_v1_clock_proto = out.File + file_sf_substreams_v1_clock_proto_rawDesc = nil + file_sf_substreams_v1_clock_proto_goTypes = nil + file_sf_substreams_v1_clock_proto_depIdxs = nil +} diff --git a/starknet-common/pb/sf/substreams/v1/clock_vtproto.pb.go b/starknet-common/pb/sf/substreams/v1/clock_vtproto.pb.go new file mode 100644 index 0000000..cdacd6c --- /dev/null +++ b/starknet-common/pb/sf/substreams/v1/clock_vtproto.pb.go @@ -0,0 +1,834 @@ +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.6.0 +// source: sf/substreams/v1/clock.proto + +package substreamsv1 + +import ( + fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + timestamppb1 "github.com/planetscale/vtprotobuf/types/known/timestamppb" + proto "google.golang.org/protobuf/proto" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + unsafe "unsafe" +) + +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) +) + +func (m *Clock) CloneVT() *Clock { + if m == nil { + return (*Clock)(nil) + } + r := new(Clock) + r.Id = m.Id + r.Number = m.Number + r.Timestamp = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.Timestamp).CloneVT()) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Clock) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *BlockRef) CloneVT() *BlockRef { + if m == nil { + return (*BlockRef)(nil) + } + r := new(BlockRef) + r.Id = m.Id + r.Number = m.Number + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *BlockRef) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (this *Clock) EqualVT(that *Clock) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Id != that.Id { + return false + } + if this.Number != that.Number { + return false + } + if !(*timestamppb1.Timestamp)(this.Timestamp).EqualVT((*timestamppb1.Timestamp)(that.Timestamp)) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Clock) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Clock) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *BlockRef) EqualVT(that *BlockRef) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Id != that.Id { + return false + } + if this.Number != that.Number { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *BlockRef) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*BlockRef) + if !ok { + return false + } + return this.EqualVT(that) +} +func (m *Clock) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Clock) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Clock) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Timestamp != nil { + size, err := (*timestamppb1.Timestamp)(m.Timestamp).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Number != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BlockRef) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlockRef) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BlockRef) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Number != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Clock) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Clock) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Clock) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Timestamp != nil { + size, err := (*timestamppb1.Timestamp)(m.Timestamp).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Number != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BlockRef) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlockRef) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *BlockRef) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Number != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Clock) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Number != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Number)) + } + if m.Timestamp != nil { + l = (*timestamppb1.Timestamp)(m.Timestamp).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *BlockRef) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Number != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Number)) + } + n += len(m.unknownFields) + return n +} + +func (m *Clock) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Clock: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Clock: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timestamp == nil { + m.Timestamp = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.Timestamp).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockRef) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlockRef: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockRef: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Clock) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Clock: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Clock: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Id = stringValue + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timestamp == nil { + m.Timestamp = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.Timestamp).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockRef) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlockRef: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockRef: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Id = stringValue + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/starknet-common/proto/buf.gen.yaml b/starknet-common/proto/buf.gen.yaml new file mode 100644 index 0000000..f83532f --- /dev/null +++ b/starknet-common/proto/buf.gen.yaml @@ -0,0 +1,13 @@ +version: v1 +managed: + enabled: true + go_package_prefix: + default: github.com/streamingfast/substreams-foundational-modules/starknet-common/pb + +plugins: + - plugin: buf.build/protocolbuffers/go:v1.31.0 + out: ../pb + opt: paths=source_relative + - plugin: buf.build/community/planetscale-vtprotobuf:v0.6.0 + out: ../pb + opt: paths=source_relative diff --git a/starknet-common/proto/buf.lock b/starknet-common/proto/buf.lock new file mode 100644 index 0000000..d2358ec --- /dev/null +++ b/starknet-common/proto/buf.lock @@ -0,0 +1,13 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: streamingfast + repository: firehose-starknet + commit: 591503374342443eb9a98cd3883b6ca9 + digest: shake256:21d3702cd6b3be350a1c25d57b66e669caf67dbd49dd205f4b0669d5055ca35a4c95235a05bc1d7175780149f8ad7f164153b446cdc004769d81697b19a72fb7 + - remote: buf.build + owner: streamingfast + repository: substreams + commit: ce84563cf22e4befa55edf53f61af055 + digest: shake256:09af59d53626d932d4960525e37559df71ddc7b4f95b98a4320ef742405217219b8d71c9c11541a1a4b0054cabe15fa2ab8fcb8b781435bab8c65e20d25c1090 diff --git a/starknet-common/proto/buf.yaml b/starknet-common/proto/buf.yaml new file mode 100644 index 0000000..b0ea8f2 --- /dev/null +++ b/starknet-common/proto/buf.yaml @@ -0,0 +1,4 @@ +version: v1 +deps: + - buf.build/streamingfast/firehose-starknet + - buf.build/streamingfast/substreams \ No newline at end of file diff --git a/starknet-common/proto/sf/substreams/starknet/type/v1/starknet.proto b/starknet-common/proto/sf/substreams/starknet/type/v1/starknet.proto new file mode 100644 index 0000000..e597a74 --- /dev/null +++ b/starknet-common/proto/sf/substreams/starknet/type/v1/starknet.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package sf.substreams.starknet.type.v1; + +option go_package = "github.com/streamingfast/substreams-starknet-foundational-modules/starknet-common/pb/sf/substreams-starknet/starknet/v1"; + +import "sf/starknet/type/v1/block.proto"; +import "sf/substreams/index/v1/keys.proto"; +import "sf/substreams/v1/clock.proto"; + +message Transactions { + .sf.substreams.v1.Clock clock = 1; + repeated .sf.starknet.type.v1.TransactionWithReceipt transactions_with_receipt = 2; +} diff --git a/starknet-common/sqe/api.go b/starknet-common/sqe/api.go new file mode 100644 index 0000000..b793304 --- /dev/null +++ b/starknet-common/sqe/api.go @@ -0,0 +1,54 @@ +package sqe + +import ( + "context" + "fmt" +) + +// FindAllFieldNames returns all used field names in the AST. There +// is **NO** ordering on the elements, i.e. they might not come in the +// same order specified in the AST. +func ExtractAllKeys(expression Expression) (out []string) { + uniqueFieldNames := map[string]bool{} + onExpression := func(_ context.Context, expr Expression) error { + if v, ok := expr.(*KeyTerm); ok { + uniqueFieldNames[v.Value.Value] = true + } + + return nil + } + + visitor := NewDepthFirstVisitor(nil, onExpression) + expression.Visit(context.Background(), visitor) + + i := 0 + out = make([]string, len(uniqueFieldNames)) + for fieldName := range uniqueFieldNames { + out[i] = fieldName + i++ + } + + return +} + +func TransformExpression(expr Expression, transformer FieldTransformer) error { + if transformer == nil { + return nil + } + + onExpression := func(_ context.Context, expr Expression) error { + v, ok := expr.(*KeyTerm) + if !ok { + return nil + } + + if err := transformer.TransformStringLiteral("", v.Value); err != nil { + return fmt.Errorf("key %q transformation failed: %s", v.Value.Value, err) + } + + return nil + } + + visitor := NewDepthFirstVisitor(nil, onExpression) + return expr.Visit(context.Background(), visitor) +} diff --git a/starknet-common/sqe/api_test.go b/starknet-common/sqe/api_test.go new file mode 100644 index 0000000..08fdeaa --- /dev/null +++ b/starknet-common/sqe/api_test.go @@ -0,0 +1,150 @@ +// Copyright 2024 StreamingFast Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sqe + +import ( + "context" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// func TestExpressionToBleveQuery(t *testing.T) { +// tests := []struct { +// in string +// expectBleve string +// }{ +// { +// in: "account:eoscanadacom", +// expectBleve: `{"term":"eoscanadacom","field":"account"}`, +// }, +// { +// in: "data.active:true", +// expectBleve: `{"bool":true,"field":"data.active"}`, +// }, +// { +// in: "data.active:false", +// expectBleve: `{"bool":false,"field":"data.active"}`, +// }, +// { +// in: `data.active:"true"`, +// expectBleve: `{"term":"true","field":"data.active"}`, +// }, +// { +// in: "receiver:eoscanadacom account:eoscanadacom", +// expectBleve: `{"conjuncts":[{"term":"eoscanadacom","field":"receiver"},{"term":"eoscanadacom","field":"account"}]}`, +// }, +// { +// in: "account:eoscanadacom receiver:eoscanadacom", +// expectBleve: `{"conjuncts":[{"term":"eoscanadacom","field":"account"},{"term":"eoscanadacom","field":"receiver"}]}`, +// }, +// { +// in: "receiver:eoscanadacom (action:transfer OR action:issue)", +// expectBleve: `{"conjuncts":[{"term":"eoscanadacom","field":"receiver"},{"disjuncts":[{"term":"transfer","field":"action"},{"term":"issue","field":"action"}],"min":1}]}`, +// }, +// { +// in: "receiver:eoscanadacom -(action:transfer OR action:issue)", +// expectBleve: `{"conjuncts":[{"term":"eoscanadacom","field":"receiver"},{"must_not":{"disjuncts":[{"disjuncts":[{"term":"transfer","field":"action"},{"term":"issue","field":"action"}],"min":1}],"min":0}}]}`, +// }, +// { +// in: "-receiver:eoscanadacom (action:transfer OR action:issue)", +// expectBleve: `{"conjuncts":[{"must_not":{"disjuncts":[{"term":"eoscanadacom","field":"receiver"}],"min":0}},{"disjuncts":[{"term":"transfer","field":"action"},{"term":"issue","field":"action"}],"min":1}]}`, +// }, +// { +// in: "-action:patate", +// expectBleve: `{"must_not":{"disjuncts":[{"term":"patate","field":"action"}],"min":0}}`, +// }, +// { +// in: "receiver:eoscanadacom (action:transfer OR action:issue) account:eoscanadacom (data.from:eoscanadacom OR data.to:eoscanadacom)", +// expectBleve: `{ +// "conjuncts": [ +// { "term": "eoscanadacom", "field": "receiver" }, +// { "disjuncts": [ +// { "term": "transfer", "field": "action" }, +// { "term": "issue", "field": "action" } +// ], "min": 1 +// }, +// { "term": "eoscanadacom", "field": "account" }, +// { "disjuncts": [ +// { "term": "eoscanadacom", "field": "data.from" }, +// { "term": "eoscanadacom", "field": "data.to" } +// ], "min": 1 +// } +// ] +// }`, +// }, +// } + +// for idx, test := range tests { +// t.Run(fmt.Sprintf("index %d", idx+1), func(t *testing.T) { +// ast, err := Parse(context.Background(), test.in) +// require.NoError(t, err) + +// res := ExpressionToBleve(ast) + +// cnt, err := json.Marshal(res) +// require.NoError(t, err) +// assert.JSONEq(t, test.expectBleve, string(cnt), "Failed on SQE %q, got %s", test.in, string(cnt)) +// }) +// } +// } + +func TestExtractAllKeys(t *testing.T) { + tests := []struct { + in string + expectedKeys []string + }{ + { + "account", + []string{"account"}, + }, + { + "data.active", + []string{"data.active"}, + }, + { + "data.active", + []string{"data.active"}, + }, + { + `"data.active"`, + []string{"data.active"}, + }, + { + "receiver account", + []string{"receiver", "account"}, + }, + { + "receiver (action || action)", + []string{"receiver", "action"}, + }, + { + "receiver (action || action) account (data.from || data.to)", + []string{"receiver", "action", "account", "data.from", "data.to"}, + }, + } + + for idx, test := range tests { + t.Run(fmt.Sprintf("index %d", idx+1), func(t *testing.T) { + ast, err := Parse(context.Background(), test.in) + require.NoError(t, err) + + actuals := ExtractAllKeys(ast) + assert.ElementsMatch(t, test.expectedKeys, actuals, "Mistmatch for SQE %q", test.in) + }) + } +} diff --git a/starknet-common/sqe/bitmap.go b/starknet-common/sqe/bitmap.go new file mode 100644 index 0000000..88d058f --- /dev/null +++ b/starknet-common/sqe/bitmap.go @@ -0,0 +1,116 @@ +package sqe + +import ( + "fmt" + "math" + + "github.com/RoaringBitmap/roaring/roaring64" +) + +func RoaringBitmapsApply(expr Expression, bitmaps map[string]*roaring64.Bitmap) *roaring64.Bitmap { + out := roaringQuerier{bitmaps: bitmaps}.apply(expr) + if out == nil { + return roaring64.New() + } + return out +} + +type roaringRange struct { + startInclusive uint64 + endExlusive uint64 +} + +type roaringQuerier struct { + bitmaps map[string]*roaring64.Bitmap + + // fullRange is computed once and is the full range of all the "block" + // represented within the bitmaps. This is used to optimize the "not" + // operation by flipping the full range. + // + // It's lazy since most expression will not use it so there is no + // need to compute unless strictly necessary. + fullRange *roaringRange +} + +func (q roaringQuerier) apply(expr Expression) *roaring64.Bitmap { + switch v := expr.(type) { + case *KeyTerm: + if out, ok := q.bitmaps[v.Value.Value]; ok { + return out + } + return roaring64.New() + + case *AndExpression, *OrExpression: + children := v.(HasChildrenExpression).GetChildren() + if len(children) == 0 { + panic(fmt.Errorf("%T expression with no children. this make no sense something is wrong in the parser", v)) + } + + firstChild := children[0] + if len(children) == 1 { + return q.apply(firstChild) + } + + result := q.apply(firstChild).Clone() + + var op func(x2 *roaring64.Bitmap) + switch v.(type) { + case *AndExpression: + op = result.And + case *OrExpression: + op = result.Or + default: + panic(fmt.Errorf("has children expression of type %T is not handled correctly", v)) + } + + for _, child := range children[1:] { + op(q.apply(child)) + } + + return result + + case *ParenthesisExpression: + return q.apply(v.Child) + + case *NotExpression: + roaringRange := q.getRoaringRange() + + result := q.apply(v.Child).Clone() + result.Flip(roaringRange.startInclusive, roaringRange.endExlusive) + + return result + + default: + panic(fmt.Errorf("element of type %T is not handled correctly", v)) + } +} + +func (q roaringQuerier) getRoaringRange() *roaringRange { + if q.fullRange == nil { + var start uint64 = math.MaxUint64 + var end uint64 = 0 + for _, bitmap := range q.bitmaps { + if bitmap.IsEmpty() { + continue + } + + first := bitmap.Minimum() + last := bitmap.Maximum() + + if first < start { + start = first + } + + if last > end { + end = last + } + } + + q.fullRange = &roaringRange{ + startInclusive: start, + endExlusive: end + 1, + } + } + + return q.fullRange +} diff --git a/starknet-common/sqe/bitmap_test.go b/starknet-common/sqe/bitmap_test.go new file mode 100644 index 0000000..2d65547 --- /dev/null +++ b/starknet-common/sqe/bitmap_test.go @@ -0,0 +1,57 @@ +package sqe + +import ( + "context" + "strings" + "testing" + + "github.com/RoaringBitmap/roaring/roaring64" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestApplyRoaringBitmap(t *testing.T) { + kv := map[string]*roaring64.Bitmap{ + "bob": roaring64.BitmapOf(1, 2, 3), + "alice": roaring64.BitmapOf(1, 4, 5), + "john": roaring64.BitmapOf(1, 3, 5), + "transfer": roaring64.BitmapOf(1, 3, 5), + "mint": roaring64.BitmapOf(5), + "delegate": roaring64.BitmapOf(4), + } + + // Matrix-based test cases + testCases := []struct { + expr string + operation func() *roaring64.Bitmap + result []uint64 + }{ + { + expr: "bob || alice", + result: []uint64{1, 2, 3, 4, 5}, + }, + { + expr: "bob transfer", + result: []uint64{1, 3}, + }, + { + expr: "(alice || bob) transfer", + result: []uint64{1, 3, 5}, + }, + { + expr: "(alice || bob) (delegate || mint)", + result: []uint64{4, 5}, + }, + } + + // Run test cases + for _, tc := range testCases { + parser, err := NewParser(strings.NewReader(tc.expr)) + require.NoError(t, err) + + expr, err := parser.Parse(context.Background()) + require.NoError(t, err) + + assert.ElementsMatch(t, tc.result, RoaringBitmapsApply(expr, kv).ToArray()) + } +} diff --git a/starknet-common/sqe/errors.go b/starknet-common/sqe/errors.go new file mode 100644 index 0000000..52526d3 --- /dev/null +++ b/starknet-common/sqe/errors.go @@ -0,0 +1,39 @@ +package sqe + +import ( + "fmt" + + lex "github.com/alecthomas/participle/lexer" +) + +type ParseError struct { + message string + position lex.Position +} + +func parserError(message string, position lex.Position) *ParseError { + return &ParseError{ + message: message, + position: position, + } +} + +func rangeParserError(message string, start lex.Position, end lex.Position) *ParseError { + return &ParseError{ + message: message, + position: lex.Position{ + Filename: start.Filename, + Offset: start.Offset, + Line: start.Line, + Column: end.Column, + }, + } +} + +func (e *ParseError) Error() string { + if e.position.Line <= 1 { + return fmt.Sprintf("%s at column %d", e.message, e.position.Offset) + } + + return fmt.Sprintf("%s at line %d column %d", e.message, e.position.Line, e.position.Column) +} diff --git a/starknet-common/sqe/init_test.go b/starknet-common/sqe/init_test.go new file mode 100644 index 0000000..24d6098 --- /dev/null +++ b/starknet-common/sqe/init_test.go @@ -0,0 +1,79 @@ +package sqe + +import ( + "context" + "fmt" + "io" + "strings" +) + +func expressionToString(expression Expression) string { + builder := &strings.Builder{} + visitor := &TestVisitor{ + writer: builder, + } + + expression.Visit(context.Background(), visitor) + + return builder.String() +} + +type TestVisitor struct { + writer io.Writer +} + +func (v *TestVisitor) Visit_And(ctx context.Context, e *AndExpression) error { + return v.visit_binary(ctx, "<", "&&", ">", e.Children) +} + +func (v *TestVisitor) Visit_Or(ctx context.Context, e *OrExpression) error { + return v.visit_binary(ctx, "[", "||", "]", e.Children) +} + +func (v *TestVisitor) visit_binary(ctx context.Context, opStart, op, opEnd string, children []Expression) error { + v.print(opStart) + + for i, child := range children { + if i != 0 { + v.print(" %s ", op) + } + + child.Visit(ctx, v) + } + v.print(opEnd) + + return nil +} + +func (v *TestVisitor) Visit_Parenthesis(ctx context.Context, e *ParenthesisExpression) error { + v.print("(") + e.Child.Visit(ctx, v) + v.print(")") + + return nil +} + +func (v *TestVisitor) Visit_Not(ctx context.Context, e *NotExpression) error { + v.print("!") + e.Child.Visit(ctx, v) + + return nil +} + +func (v *TestVisitor) Visit_KeyTerm(ctx context.Context, e *KeyTerm) error { + v.printStringLiteral(e.Value) + return nil +} + +func (v *TestVisitor) printStringLiteral(literal *StringLiteral) error { + if literal.QuotingChar != "" { + return v.print("%s%s%s", literal.QuotingChar, literal.Value, literal.QuotingChar) + } + + return v.print(literal.Value) +} + +func (v *TestVisitor) print(message string, args ...interface{}) error { + fmt.Fprintf(v.writer, message, args...) + return nil +} diff --git a/starknet-common/sqe/keys.go b/starknet-common/sqe/keys.go new file mode 100644 index 0000000..1c411f8 --- /dev/null +++ b/starknet-common/sqe/keys.go @@ -0,0 +1,80 @@ +package sqe + +import ( + "fmt" +) + +type KeysQuerier struct { + blockKeys map[string]struct{} +} + +func NewFromKeys(keys []string) KeysQuerier { + blockKeys := make(map[string]struct{}, len(keys)) + for _, key := range keys { + blockKeys[key] = struct{}{} + } + return KeysQuerier{blockKeys: blockKeys} +} + +func KeysApply(expr Expression, blockKeys KeysQuerier) bool { + return blockKeys.apply(expr) +} + +func (k KeysQuerier) apply(expr Expression) bool { + switch v := expr.(type) { + case *KeyTerm: + if k.blockKeys == nil { + return false + } + + _, ok := k.blockKeys[v.Value.Value] + return ok + + case *AndExpression, *OrExpression: + children := v.(HasChildrenExpression).GetChildren() + if len(children) == 0 { + panic(fmt.Errorf("%T expression with no children. this make no sense something is wrong in the parser", v)) + } + + firstChild := children[0] + if len(children) == 1 { + return k.apply(firstChild) + } + + result := k.apply(firstChild) + + var op func(bool) + switch v.(type) { + case *AndExpression: + op = func(x bool) { + result = result && x + } + + case *OrExpression: + op = func(x bool) { + result = result || x + } + default: + panic(fmt.Errorf("has children expression of type %T is not handled correctly", v)) + } + + for _, child := range children[1:] { + op(k.apply(child)) + } + + return result + + case *ParenthesisExpression: + return k.apply(v.Child) + + case *NotExpression: + if k.blockKeys == nil { + return false + } + + return !k.apply(v.Child) + + default: + panic(fmt.Errorf("element of type %T is not handled correctly", v)) + } +} diff --git a/starknet-common/sqe/keys_test.go b/starknet-common/sqe/keys_test.go new file mode 100644 index 0000000..f0af2ea --- /dev/null +++ b/starknet-common/sqe/keys_test.go @@ -0,0 +1,70 @@ +package sqe + +import ( + "context" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestApplyKeys(t *testing.T) { + kv := map[string]struct{}{ + "bob": {}, + "alice": {}, + "etienne": {}, + "charlie": {}, + "delegate": {}, + "mint": {}, + } + + blockKeys := KeysQuerier{blockKeys: kv} + + // Matrix-based test cases + testCases := []struct { + name string + expr string + result bool + }{ + { + name: "Or", + expr: "bob || alice", + result: true, + }, + { + name: "And", + expr: "bob transfer", + result: false, + }, + { + name: "And(Or key)", + expr: "(alice || bob) transfer", + result: false, + }, + { + name: "And(Or Or)", + expr: "(alice || bob) (delegate || mint)", + result: true, + }, + + { + name: "2 And", + expr: "alice john mint", + result: false, + }, + } + + // Run test cases + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + parser, err := NewParser(strings.NewReader(tc.expr)) + require.NoError(t, err) + + expr, err := parser.Parse(context.Background()) + require.NoError(t, err) + + assert.Equal(t, tc.result, blockKeys.apply(expr)) + }) + } +} diff --git a/starknet-common/sqe/lexer.go b/starknet-common/sqe/lexer.go new file mode 100644 index 0000000..331cf71 --- /dev/null +++ b/starknet-common/sqe/lexer.go @@ -0,0 +1,111 @@ +package sqe + +import ( + "fmt" + "io" + + lex "github.com/alecthomas/participle/lexer" +) + +type lexer struct { + *lex.PeekingLexer + + symbols map[rune]string +} + +func newLexer(reader io.Reader) (*lexer, error) { + l, err := lexerDefinition.Lex(reader) + if err != nil { + return nil, fmt.Errorf("new lexer: %s", err) + } + + peekingLexer, err := lex.Upgrade(l) + if err != nil { + return nil, fmt.Errorf("peekable lexer: %s", err) + } + + return &lexer{ + PeekingLexer: peekingLexer, + symbols: lex.SymbolsByRune(lexerDefinition), + }, nil +} + +func (l *lexer) skipSpaces() { + for { + token, err := l.Peek(0) + if err != nil || !l.isSpace(token) { + return + } + + l.mustLexNext() + } +} + +func (l *lexer) mustLexNext() lex.Token { + token, err := l.Next() + if err != nil { + panic(err) + } + + return token +} + +func (l *lexer) peekPos() lex.Position { + peek, err := l.Peek(0) + if err != nil { + return lex.Position{Filename: "", Line: 1, Offset: l.PeekingLexer.Length() - 1, Column: l.PeekingLexer.Length()} + } + + return peek.Pos +} + +var lexerDefinition = lex.Must(lex.Regexp( + `(?m)` + + `(?P"|')` + + // `|(?P,)` + + `|(?P\-)` + + `|(?P\|\|)` + + `|(?P&&)` + + `|(?P\()` + + `|(?P\))` + + // `|(?P\[)` + + // `|(?P\])` + + `|(?P[^\s'"\-\(\)][^\s'"\(\)]*)` + + `|(?P\s+)`, +)) + +func (l *lexer) isSpace(t lex.Token) bool { return l.isTokenType(t, "Space") } +func (l *lexer) isQuoting(t lex.Token) bool { return l.isTokenType(t, "Quoting") } + +// func (l *lexer) isColon(t lex.Token) bool { return l.isTokenType(t, "Colon") } +// func (l *lexer) isComma(t lex.Token) bool { return l.isTokenType(t, "Comma") } +func (l *lexer) isNotOperator(t lex.Token) bool { return l.isTokenType(t, "NotOperator") } +func (l *lexer) isOrOperator(t lex.Token) bool { return l.isTokenType(t, "OrOperator") } +func (l *lexer) isAndOperator(t lex.Token) bool { return l.isTokenType(t, "AndOperator") } +func (l *lexer) isLeftParenthesis(t lex.Token) bool { return l.isTokenType(t, "LeftParenthesis") } +func (l *lexer) isRightParenthesis(t lex.Token) bool { return l.isTokenType(t, "RightParenthesis") } + +// func (l *lexer) isLeftSquareBracket(t lex.Token) bool { return l.isTokenType(t, "LeftSquareBracket") } +// func (l *lexer) isRightSquareBracket(t lex.Token) bool { return l.isTokenType(t, "RightSquareBracket") } +func (l *lexer) isName(t lex.Token) bool { return l.isTokenType(t, "Name") } + +func (l *lexer) isTokenType(token lex.Token, expectedType string) bool { + return l.symbols[token.Type] == expectedType +} + +func (l *lexer) isBinaryOperator(t lex.Token) bool { + return l.isAnyTokenType(t, "AndOperator", "OrOperator") +} + +func (l *lexer) isAnyTokenType(token lex.Token, expectedTypes ...string) bool { + for _, expectedType := range expectedTypes { + if l.symbols[token.Type] == expectedType { + return true + } + } + return false +} + +func (l *lexer) getTokenType(token lex.Token) string { + return l.symbols[token.Type] +} diff --git a/starknet-common/sqe/lexer_test.go b/starknet-common/sqe/lexer_test.go new file mode 100644 index 0000000..0ab0097 --- /dev/null +++ b/starknet-common/sqe/lexer_test.go @@ -0,0 +1,57 @@ +package sqe + +import ( + "bytes" + "testing" + + lex "github.com/alecthomas/participle/lexer" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestLexer(t *testing.T) { + tests := []struct { + name string + sqe string + tokens []string + }{ + {"minus_followed_by_name", `-token`, []string{"NotOperator", "Name", "EOF"}}, + + {"name_with_inside_minus", `open-token`, []string{"Name", "EOF"}}, + + // {"legacy_and", `AND`, []string{"AndOperator", "EOF"}}, + {"new_and", `&&`, []string{"AndOperator", "EOF"}}, + + // {"legacy_or", `OR`, []string{"OrOperator", "EOF"}}, + {"new_or", `||`, []string{"OrOperator", "EOF"}}, + + {"quoting characters start", `'some "some`, []string{"Quoting", "Name", "Space", "Quoting", "Name", "EOF"}}, + {"quoting characters end", `some' some"`, []string{"Name", "Quoting", "Space", "Name", "Quoting", "EOF"}}, + + // {"square_brackets", `[field, "double quoted"]`, []string{"LeftSquareBracket", "Name", "Comma", "Space", "Quoting", "Name", "Space", "Name", "Quoting", "RightSquareBracket", "EOF"}}, + + {"expresion_with_and", `action && field`, []string{"Name", "Space", "AndOperator", "Space", "Name", "EOF"}}, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + actual := tokensList(t, test.sqe) + + assert.Equal(t, test.tokens, actual) + }) + } +} + +func tokensList(t *testing.T, input string) (out []string) { + lexer, err := newLexer(bytes.NewBufferString(input)) + require.NoError(t, err) + + tokens, err := lex.ConsumeAll(lexer.PeekingLexer) + require.NoError(t, err) + + for _, token := range tokens { + out = append(out, lexer.getTokenType(token)) + } + + return +} diff --git a/starknet-common/sqe/optimizer.go b/starknet-common/sqe/optimizer.go new file mode 100644 index 0000000..63f2977 --- /dev/null +++ b/starknet-common/sqe/optimizer.go @@ -0,0 +1,33 @@ +package sqe + +import ( + "context" + "fmt" +) + +func optimizeExpression(ctx context.Context, expr Expression) Expression { + visitor := NewDepthFirstVisitor(nil, func(_ context.Context, expr Expression) error { + v, ok := expr.(*OrExpression) + if !ok { + return nil + } + + newChildren := make([]Expression, 0, len(v.Children)) + for _, child := range v.Children { + if w, ok := child.(*OrExpression); ok { + newChildren = append(newChildren, w.Children...) + } else { + newChildren = append(newChildren, child) + } + } + + v.Children = newChildren + return nil + }) + + if err := expr.Visit(ctx, visitor); err != nil { + panic(fmt.Errorf("optimizer visitor is never expected to return error, something changed: %w", err)) + } + + return expr +} diff --git a/starknet-common/sqe/optimizer_test.go b/starknet-common/sqe/optimizer_test.go new file mode 100644 index 0000000..4f6f9ab --- /dev/null +++ b/starknet-common/sqe/optimizer_test.go @@ -0,0 +1,120 @@ +package sqe + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestOptimizer(t *testing.T) { + tests := []struct { + name string + expr Expression + expected string + }{ + { + "top_or_no_or_children", + orExpr(keyTermExpr("a1"), keyTermExpr("a2")), + `[a1 || a2]`, + }, + { + "top_or_single_or_children", + orExpr(orExpr(keyTermExpr("a1"), keyTermExpr("a2")), keyTermExpr("b2")), + `[a1 || a2 || b2]`, + }, + { + "top_or_multiple_or_children", + orExpr( + orExpr(keyTermExpr("a1"), keyTermExpr("a2")), + orExpr(keyTermExpr("c1"), keyTermExpr("c2")), + ), + `[a1 || a2 || c1 || c2]`, + }, + { + "top_or_mixed_multiple_or_children", + orExpr( + keyTermExpr("before2"), + orExpr(keyTermExpr("a1"), keyTermExpr("a2")), + andExpr(keyTermExpr("middle1"), keyTermExpr("middle2")), + orExpr(keyTermExpr("c1"), keyTermExpr("c2")), + notExpr(keyTermExpr("after3")), + ), + `[before2 || a1 || a2 || || c1 || c2 || !after3]`, + }, + + { + "or_in_not_multiple_or_children", + notExpr( + orExpr( + orExpr(keyTermExpr("a1"), keyTermExpr("a2")), + orExpr(keyTermExpr("c1"), keyTermExpr("c2")), + ), + ), + `![a1 || a2 || c1 || c2]`, + }, + { + "or_in_parens_multiple_or_children", + parensExpr( + orExpr( + orExpr(keyTermExpr("a1"), keyTermExpr("a2")), + orExpr(keyTermExpr("c1"), keyTermExpr("c2")), + ), + ), + `([a1 || a2 || c1 || c2])`, + }, + + { + "multi_level_nested_only_or", + orExpr( + orExpr( + orExpr( + keyTermExpr("l3a1"), + orExpr(keyTermExpr("l4a1"), keyTermExpr("l4a2")), + ), + orExpr( + orExpr(keyTermExpr("l4b1"), keyTermExpr("l4b2")), + keyTermExpr("l3b1"), + ), + orExpr( + orExpr(keyTermExpr("l4c1"), keyTermExpr("l4c2")), + orExpr(keyTermExpr("l4d1"), keyTermExpr("l4d2")), + ), + ), + ), + `[l3a1 || l4a1 || l4a2 || l4b1 || l4b2 || l3b1 || l4c1 || l4c2 || l4d1 || l4d2]`, + }, + + { + "multi_level_nested_mixed_or", + orExpr( + orExpr( + andExpr( + keyTermExpr("l3a1"), + notExpr(orExpr(keyTermExpr("l4a1"), keyTermExpr("l4a2"))), + ), + orExpr( + orExpr(keyTermExpr("l4b1"), keyTermExpr("l4b2")), + keyTermExpr("l3b1"), + ), + orExpr( + orExpr(keyTermExpr("l4c1"), keyTermExpr("l4c2")), + parensExpr(orExpr(keyTermExpr("l4d1"), keyTermExpr("l4d2"))), + ), + ), + andExpr( + keyTermExpr("l2e1"), + orExpr(keyTermExpr("l3f1"), keyTermExpr("l3f2")), + ), + ), + `[ || l4b1 || l4b2 || l3b1 || l4c1 || l4c2 || ([l4d1 || l4d2]) || ]`, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + optimized := optimizeExpression(context.Background(), test.expr) + assert.Equal(t, test.expected, expressionToString(optimized), "Invalid optimization for %q", test.name) + }) + } +} diff --git a/starknet-common/sqe/parser.go b/starknet-common/sqe/parser.go new file mode 100644 index 0000000..d627170 --- /dev/null +++ b/starknet-common/sqe/parser.go @@ -0,0 +1,263 @@ +package sqe + +import ( + "bytes" + "context" + "fmt" + "io" + "strings" + + lex "github.com/alecthomas/participle/lexer" +) + +// MaxRecursionDeepness is the limit we impose on the number of direct ORs expression. +// It's possible to have more than that, just not in a single successive sequence or `1 or 2 or 3 ...`. +// This is to avoid first a speed problem where parsing start to be +const MaxRecursionDeepness = 2501 + +func Parse(ctx context.Context, input string) (expr Expression, err error) { + parser, err := NewParser(bytes.NewBufferString(input)) + if err != nil { + return nil, fmt.Errorf("new parser: %w", err) + } + + return parser.Parse(ctx) +} + +type Parser struct { + ctx context.Context + l *lexer + + lookForRightParenthesis uint +} + +func NewParser(reader io.Reader) (*Parser, error) { + lexer, err := newLexer(reader) + if err != nil { + return nil, err + } + + return &Parser{ + ctx: context.Background(), + l: lexer, + }, nil +} + +func (p *Parser) Parse(ctx context.Context) (out Expression, err error) { + defer func() { + recoveredErr := recover() + if recoveredErr == nil { + return + } + + switch v := recoveredErr.(type) { + case *ParseError: + err = v + case error: + err = fmt.Errorf("unexpected error occurred while parsing SQE expression: %w", v) + case string, fmt.Stringer: + err = fmt.Errorf("unexpected error occurred while parsing SQE expression: %s", v) + default: + err = fmt.Errorf("unexpected error occurred while parsing SQE expression: %v", v) + } + }() + + rootExpr, err := p.parseExpression(0) + if err != nil { + return nil, err + } + + return optimizeExpression(ctx, rootExpr), nil +} + +func (p *Parser) parseExpression(depth int) (Expression, error) { + if depth >= MaxRecursionDeepness { + // This is a small hack, the panic is trapped at the public API `Parse` method. We do it with a panic + // to avoid the really deep wrapping of error that would happen if we returned right away. A test ensure + // that this behavior works as expected. + panic(parserError("expression is too long, too much ORs or parenthesis expressions", p.l.peekPos())) + } + + left, err := p.parseUnaryExpression(depth) + if err != nil { + return nil, err + } + + for { + p.l.skipSpaces() + next, err := p.l.Peek(0) + if err != nil { + return nil, err + } + + // If we reached end of file, we have finished our job + if next.EOF() { + return left, nil + } + + // If we reached right parenthesis, check if we were expecting one + if p.l.isRightParenthesis(next) { + if p.lookForRightParenthesis == 0 { + return nil, parserError("unexpected right parenthesis, expected right hand side expression or end of input", next.Pos) + } + + // We were expecting one, we finished our job for this part, decrement will be done at parsing site + return left, nil + } + + isImplicitAnd := true + if p.l.isBinaryOperator(next) { + isImplicitAnd = false + p.l.mustLexNext() + p.l.skipSpaces() + } + + // This implements precedence order between `&&` and `||`. A `&&` is parsed with the smallest + // next unit so it takes precedences while `||` parse with the longuest possibility. + parser := p.parseUnaryExpression + depthIncrease := 0 + if p.l.isOrOperator(next) { + parser = p.parseExpression + depthIncrease = 1 + } + + right, err := parser(depth + depthIncrease) + + switch { + case isImplicitAnd || p.l.isAndOperator(next): + if err != nil { + if isImplicitAnd { + return nil, fmt.Errorf("missing expression after implicit 'and' clause: %w", err) + } + + return nil, fmt.Errorf("missing expression after 'and' clause: %w", err) + } + + if v, ok := left.(*AndExpression); ok { + v.Children = append(v.Children, right) + } else { + left = &AndExpression{Children: []Expression{left, right}} + } + + case p.l.isOrOperator(next): + if err != nil { + return nil, fmt.Errorf("missing expression after 'or' clause: %w", err) + } + + // It's impossible to coascle `||` expressions since they are recursive + left = &OrExpression{Children: []Expression{left, right}} + + default: + if err != nil { + return nil, fmt.Errorf("unable to parse right hand side expression: %w", err) + } + + return nil, parserError(fmt.Sprintf("token type %s is not valid binary right hand side expression", p.l.getTokenType(next)), next.Pos) + } + } +} + +func (p *Parser) parseUnaryExpression(depth int) (Expression, error) { + p.l.skipSpaces() + + token, err := p.l.Peek(0) + if err != nil { + return nil, err + } + + if token.EOF() { + return nil, parserError("expected a key term, minus sign or left parenthesis, got end of input", token.Pos) + } + + switch { + case p.l.isName(token) || p.l.isQuoting(token): + return p.parseKeyTerm() + case p.l.isLeftParenthesis(token): + return p.parseParenthesisExpression(depth) + case p.l.isNotOperator(token): + return nil, fmt.Errorf("NOT operator (-) is not supported in the block filter") + default: + return nil, parserError(fmt.Sprintf("expected a key term, minus sign or left parenthesis, got %s", p.l.getTokenType(token)), token.Pos) + } +} + +func (p *Parser) parseParenthesisExpression(depth int) (Expression, error) { + // Consume left parenthesis + openingParenthesis := p.l.mustLexNext() + p.lookForRightParenthesis++ + + child, err := p.parseExpression(depth + 1) + if err != nil { + return nil, fmt.Errorf("invalid expression after opening parenthesis: %w", err) + } + + p.l.skipSpaces() + token, err := p.l.Next() + if err != nil { + return nil, err + } + + if token.EOF() { + return nil, parserError("expecting closing parenthesis, got end of input", openingParenthesis.Pos) + } + + if !p.l.isRightParenthesis(token) { + return nil, parserError(fmt.Sprintf("expecting closing parenthesis after expression, got %s", p.l.getTokenType(token)), token.Pos) + } + + p.lookForRightParenthesis-- + return &ParenthesisExpression{child}, nil +} + +func (p *Parser) parseKeyTerm() (Expression, error) { + token := p.l.mustLexNext() + + var value *StringLiteral + switch { + case p.l.isName(token): + value = &StringLiteral{ + Value: token.String(), + } + case p.l.isQuoting(token): + literal, err := p.parseQuotedString(token) + if err != nil { + return nil, err + } + + value = literal + default: + return nil, parserError(fmt.Sprintf("expecting key term, either a string or quoted string but got %s", p.l.getTokenType(token)), token.Pos) + } + + return &KeyTerm{ + Value: value, + }, nil +} + +func (p *Parser) parseQuotedString(startQuoting lex.Token) (*StringLiteral, error) { + builder := &strings.Builder{} + for { + token, err := p.l.Next() + if err != nil { + return nil, err + } + + if token.EOF() { + return nil, parserError(fmt.Sprintf("expecting closing quoting char %q, got end of input", startQuoting.Value), startQuoting.Pos) + } + + if p.l.isQuoting(token) { + value := builder.String() + if value == "" { + return nil, rangeParserError("an empty string is not valid", startQuoting.Pos, token.Pos) + } + + return &StringLiteral{ + Value: value, + QuotingChar: startQuoting.Value, + }, nil + } + + builder.WriteString(token.Value) + } +} diff --git a/starknet-common/sqe/parser_bench_test.go b/starknet-common/sqe/parser_bench_test.go new file mode 100644 index 0000000..9bdde62 --- /dev/null +++ b/starknet-common/sqe/parser_bench_test.go @@ -0,0 +1,54 @@ +package sqe + +import ( + "context" + "strings" + "testing" +) + +func BenchmarkParseExpression(b *testing.B) { + tests := []struct { + name string + sqe string + }{ + {"single term", "action:data"}, + + // Those are kind of standard query that are parsed quite often + {"triple and term", "eosio data specificacct"}, + {"multiple and term", "data data.from: 'action' string"}, + {"multiple and/or term", "data (data.from || data.from) ('action' || expected) 'action' string"}, + + // Some convoluted big ORs list + {"big ORs list 100", buildFromOrToList(100)}, + {"big ORs list 1_000", buildFromOrToList(1000)}, + } + + for _, test := range tests { + b.Run(test.name, func(b *testing.B) { + setupBench(b) + for n := 0; n < b.N; n++ { + _, err := Parse(context.Background(), test.sqe) + if err != nil { + b.Error(err) + b.FailNow() + } + } + }) + } +} + +func buildFromOrToList(count int) string { + var elements []string + + // The count is divided by 2 since we add 2 addresses per iteration + for i := 0; i < count/2; i++ { + elements = append(elements, "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb") + } + + return "(" + strings.Join(elements, " || ") + ")" +} + +func setupBench(b *testing.B) { + b.ReportAllocs() + b.ResetTimer() +} diff --git a/starknet-common/sqe/parser_test.go b/starknet-common/sqe/parser_test.go new file mode 100644 index 0000000..55e1e3d --- /dev/null +++ b/starknet-common/sqe/parser_test.go @@ -0,0 +1,317 @@ +package sqe + +import ( + "context" + "fmt" + "os" + "strings" + "testing" + + lex "github.com/alecthomas/participle/lexer" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +const ValidateOnlyThatItParses = "!__valiateOnlyThatItParses__!" + +func TestParser(t *testing.T) { + tests := []struct { + name string + sqe string + expected string + expectedErr error + }{ + { + "single_key_term", + `transfer`, + `transfer`, + nil, + }, + { + "single_key_term_space_before", + ` transfer`, + `transfer`, + nil, + }, + { + "single_key_term_space_after", + `transfer `, + `transfer`, + nil, + }, + { + "single_key_term_space_both", + ` transfer `, + `transfer`, + nil, + }, + { + "single_key_term_with_dot_in_it", + `some.action`, + `some.action`, + nil, + }, + { + "single_key_term_multi_spaces", + " \t transfer", + `transfer`, + nil, + }, + { + "single_key_term_with_dot", + `data.name`, + `data.name`, + nil, + }, + { + "double_quoted_string", + `"test || value AND other ( 10 )!"`, + `"test || value AND other ( 10 )!"`, + nil, + }, + { + "double_quoted_string_multi_spaces", + ` " test || value AND other ( 10 )!"`, + `" test || value AND other ( 10 )!"`, + nil, + }, + + { + "single_quoted_string", + `'test:value || value AND other ( 10 )!'`, + `'test:value || value AND other ( 10 )!'`, + nil, + }, + { + "single_quoted_string_multi_spaces", + ` ' test:value || value AND other ( 10 )!'`, + `' test:value || value AND other ( 10 )!'`, + nil, + }, + + { + "top_level_single_and_implicit", + `one two`, + "", + nil, + }, + { + "top_level_single_and_implicit_double_quotes", + `"one" two`, + `<"one" && two>`, + nil, + }, + { + "top_level_single_and", + `one && two`, + "", + nil, + }, + { + "top_level_single_and_legacy", + `one && two`, + "", + nil, + }, + + { + "top_level_single_or", + `one || two`, + "[one || two]", + nil, + }, + { + "top_level_single_or_legacy", + `one || two`, + "[one || two]", + nil, + }, + + { + "top_level_parenthesis_single_term", + `(one)`, + `(one)`, + nil, + }, + { + "top_level_parenthesis_and_term", + `(one && two)`, + `()`, + nil, + }, + { + "top_level_parenthesis_and_term_double_quote", + `(one && "two")`, + `()`, + nil, + }, + { + "top_level_parenthesis_or_term", + `(one || two)`, + `([one || two])`, + nil, + }, + { + "top_level_parenthesis_or_term_with_double_quotes", + `( "one" || two)`, + `(["one" || two])`, + nil, + }, + { + "top_level_parenthesis_with_spaces", + ` ( one || two ) `, + `([one || two])`, + nil, + }, + + { + "top_level_multi_and", + `a b c d`, + ``, + nil, + }, + { + "top_level_multi_or", + `a || b || c || d`, + `[a || b || c || d]`, + nil, + }, + + { + "precedence_and_or", + `a b || c`, + `[ || c]`, + nil, + }, + { + "precedence_or_and", + `a || b c`, + `[a || ]`, + nil, + }, + { + "precedence_and_or_and", + `a b || c d`, + `[ || ]`, + nil, + }, + { + "precedence_and_and_or", + `a b c || d`, + `[ || d]`, + nil, + }, + + { + "precedence_parenthesis_and_or_and", + `a (b || c) d`, + ``, + nil, + }, + { + "precedence_parenthesis_and_or", + `a (b || c)`, + ``, + nil, + }, + + { + "ported_big_example", + `"eos" (transfer || issue || matant) from to`, + `<"eos" && ([transfer || issue || matant]) && from && to>`, + nil, + }, + { + "ported_with_newlines", + "(a ||\n b)", + `([a || b])`, + nil, + }, + + { + "depthness_100_ors", + buildFromOrToList(100), + ValidateOnlyThatItParses, + nil, + }, + { + "depthness_1_000_ors", + buildFromOrToList(1000), + ValidateOnlyThatItParses, + nil, + }, + { + "depthness_2_500_ors", + buildFromOrToList(2500), + ValidateOnlyThatItParses, + nil, + }, + + { + "error_missing_expression_after_and", + `a && `, + "", + fmt.Errorf("missing expression after 'and' clause: %w", + &ParseError{"expected a key term, minus sign or left parenthesis, got end of input", pos(1, 5, 6)}, + ), + }, + { + "error_missing_expression_after_or", + `a || `, + "", + fmt.Errorf("missing expression after 'or' clause: %w", &ParseError{"expected a key term, minus sign or left parenthesis, got end of input", pos(1, 5, 6)}), + }, + { + "error_unstarted_right_parenthesis", + `a )`, + "", + &ParseError{"unexpected right parenthesis, expected right hand side expression or end of input", pos(1, 2, 3)}, + }, + { + "error_unclosed_over_left_parenthesis", + `( a`, + "", + &ParseError{"expecting closing parenthesis, got end of input", pos(1, 0, 1)}, + }, + { + "error_deepness_reached", + buildFromOrToList(MaxRecursionDeepness + 1), + "", + &ParseError{"expression is too long, too much ORs or parenthesis expressions", pos(1, 91251, 91252)}, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + if os.Getenv("DEBUG") != "" { + printTokens(t, test.sqe) + } + + parser, err := NewParser(strings.NewReader(test.sqe)) + require.NoError(t, err) + + expression, err := parser.Parse(context.Background()) + require.Equal(t, test.expectedErr, err) + + if test.expectedErr == nil && err == nil && test.expected != ValidateOnlyThatItParses { + assert.Equal(t, test.expected, expressionToString(expression), "Invalid parsing for SEQ %q", test.sqe) + } + }) + } +} + +func pos(line, offset, column int) lex.Position { + return lex.Position{Filename: "", Line: line, Offset: offset, Column: column} +} + +func printTokens(t *testing.T, input string) { + lexer, err := lexerDefinition.Lex(strings.NewReader(input)) + require.NoError(t, err) + + tokens, err := lex.ConsumeAll(lexer) + require.NoError(t, err) + + for _, token := range tokens { + fmt.Print(token.GoString()) + } +} diff --git a/starknet-common/sqe/transformer.go b/starknet-common/sqe/transformer.go new file mode 100644 index 0000000..7a94afa --- /dev/null +++ b/starknet-common/sqe/transformer.go @@ -0,0 +1,38 @@ +// Copyright 2024 StreamingFast Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sqe + +type FieldTransformer interface { + // TransformFieldName receives the field name and allow receiver of the invocation to update its name. The field's + // name is updated if the invocation returns a nil error. + TransformFieldName(field string) (string, error) + + // TransformStringLiteral receives the field name (the updated one from a prior invocation of `TransformFieldName`) + // and a string literal (either a direct one or a sub-element from a `StringList`) and allows transformation of the + // `StringLiteral` value in place. + TransformStringLiteral(field string, value *StringLiteral) error +} + +type noOpTransformer struct{} + +func (noOpTransformer) TransformFieldName(field string) (string, error) { + return field, nil +} + +func (noOpTransformer) TransformStringLiteral(field string, value *StringLiteral) error { + return nil +} + +var NoOpFieldTransformer noOpTransformer diff --git a/starknet-common/sqe/traversal.go b/starknet-common/sqe/traversal.go new file mode 100644 index 0000000..a6f7c4a --- /dev/null +++ b/starknet-common/sqe/traversal.go @@ -0,0 +1,113 @@ +package sqe + +import ( + "context" + "errors" +) + +type OnExpression func(ctx context.Context, expr Expression) error + +var ErrStopVisit = errors.New("stop") + +type DepthFirstVisitor struct { + beforeVisit OnExpression + afterVisit OnExpression + stopped bool +} + +func NewDepthFirstVisitor(beforeVisit, afterVisit OnExpression) *DepthFirstVisitor { + return &DepthFirstVisitor{beforeVisit: beforeVisit, afterVisit: afterVisit} +} + +func (v *DepthFirstVisitor) Visit_And(ctx context.Context, e *AndExpression) error { + return v.visit_binary(ctx, e, e.Children) +} + +func (v *DepthFirstVisitor) Visit_Or(ctx context.Context, e *OrExpression) error { + return v.visit_binary(ctx, e, e.Children) +} + +func (v *DepthFirstVisitor) visit_binary(ctx context.Context, parent Expression, children []Expression) error { + if stop, err := v.executeCallback(ctx, parent, v.beforeVisit); stop { + return err + } + + for _, child := range children { + err := child.Visit(ctx, v) + if v.stopped || err != nil { + return err + } + } + + if stop, err := v.executeCallback(ctx, parent, v.afterVisit); stop { + return err + } + + return nil +} + +func (v *DepthFirstVisitor) Visit_Parenthesis(ctx context.Context, e *ParenthesisExpression) error { + if stop, err := v.executeCallback(ctx, e, v.beforeVisit); stop { + return err + } + + if err := e.Child.Visit(ctx, v); err != nil { + return err + } + + if stop, err := v.executeCallback(ctx, e, v.afterVisit); stop { + return err + } + + return nil +} + +func (v *DepthFirstVisitor) Visit_Not(ctx context.Context, e *NotExpression) error { + if stop, err := v.executeCallback(ctx, e, v.beforeVisit); stop { + return err + } + + if err := e.Child.Visit(ctx, v); err != nil { + return err + } + + if stop, err := v.executeCallback(ctx, e, v.afterVisit); stop { + return err + } + + return nil +} + +func (v *DepthFirstVisitor) Visit_KeyTerm(ctx context.Context, e *KeyTerm) error { + if stop, err := v.executeCallback(ctx, e, v.beforeVisit); stop { + return err + } + + if stop, err := v.executeCallback(ctx, e, v.afterVisit); stop { + return err + } + + return nil +} + +func (v *DepthFirstVisitor) executeCallback(ctx context.Context, e Expression, callback OnExpression) (stop bool, err error) { + if callback == nil { + return false, nil + } + + if v.stopped { + return true, nil + } + + if err := callback(ctx, e); err != nil { + if err == ErrStopVisit { + v.stopped = true + return true, nil + } else { + v.stopped = true + return true, err + } + } + + return false, nil +} diff --git a/starknet-common/sqe/types.go b/starknet-common/sqe/types.go new file mode 100644 index 0000000..41841db --- /dev/null +++ b/starknet-common/sqe/types.go @@ -0,0 +1,111 @@ +package sqe + +import ( + "context" + "fmt" +) + +type Visitor interface { + Visit_And(ctx context.Context, expr *AndExpression) error + Visit_Or(ctx context.Context, expr *OrExpression) error + Visit_Parenthesis(ctx context.Context, expr *ParenthesisExpression) error + Visit_Not(ctx context.Context, expr *NotExpression) error + Visit_KeyTerm(ctx context.Context, expr *KeyTerm) error +} + +type Expression interface { + Visit(ctx context.Context, visitor Visitor) error +} + +type HasChildrenExpression interface { + GetChildren() []Expression +} + +type AndExpression struct { + Children []Expression +} + +func andExpr(children ...Expression) *AndExpression { + return &AndExpression{Children: children} +} + +func (e *AndExpression) Visit(ctx context.Context, visitor Visitor) error { + return visitor.Visit_And(ctx, e) +} + +func (e *AndExpression) GetChildren() []Expression { + return e.Children +} + +type OrExpression struct { + Children []Expression +} + +func orExpr(children ...Expression) *OrExpression { + return &OrExpression{Children: children} +} + +func (e *OrExpression) Visit(ctx context.Context, visitor Visitor) error { + return visitor.Visit_Or(ctx, e) +} + +func (e *OrExpression) GetChildren() []Expression { + return e.Children +} + +type ParenthesisExpression struct { + Child Expression +} + +func parensExpr(expr Expression) *ParenthesisExpression { + return &ParenthesisExpression{Child: expr} +} + +func (e *ParenthesisExpression) Visit(ctx context.Context, visitor Visitor) error { + return visitor.Visit_Parenthesis(ctx, e) +} + +type NotExpression struct { + Child Expression +} + +func notExpr(expr Expression) *NotExpression { + return &NotExpression{Child: expr} +} + +func (e *NotExpression) Visit(ctx context.Context, visitor Visitor) error { + return visitor.Visit_Not(ctx, e) +} + +type KeyTerm struct { + Value *StringLiteral +} + +func keyTermExpr(value string) *KeyTerm { + return &KeyTerm{Value: &StringLiteral{Value: value}} +} + +func (e *KeyTerm) Visit(ctx context.Context, visitor Visitor) error { + return visitor.Visit_KeyTerm(ctx, e) +} + +type StringLiteral struct { + Value string + QuotingChar string +} + +func (e *StringLiteral) Literal() string { + return e.Value +} + +func (e *StringLiteral) SetValue(value string) { + e.Value = value +} + +func (e *StringLiteral) String() string { + if e.QuotingChar != "" { + return fmt.Sprintf("%s%s%s", e.QuotingChar, e.Value, e.QuotingChar) + } + + return e.Value +} diff --git a/starknet-common/substreams.yaml b/starknet-common/substreams.yaml new file mode 100644 index 0000000..e88d9fe --- /dev/null +++ b/starknet-common/substreams.yaml @@ -0,0 +1,59 @@ +specVersion: v0.1.0 +package: + name: starknet_foundational + version: v0.1.2 + +protobuf: + files: + - starknet.proto + importPaths: + - ./proto/sf/substreams/starknet/type/v1 + +imports: + starknet: /Users/cbillett/devel/sf/substreams-starknet/starknet-v0.1.2.spkg + +binaries: + default: + type: wasip1/tinygo-v1 # wasm/rust-v1 + file: ./wasm.wasm + +network: starknet + +modules: + - name: all_transactions + kind: map + initialBlock: 0 + inputs: + - source: sf.starknet.type.v1.Block + output: + type: proto:sf.substreams.starknet.type.v1.Transactions + doc: | + `all_transaction` reads from the `sf.starknet.type.v1.Block` source and outputs a list of all transactions in the block. + + - name: index_transactions + kind: blockIndex + inputs: + - map: all_transactions + output: + type: proto:sf.substreams.index.v1.Keys + doc: | + `index_events` sets the keys corresponding to all event 'types' and 'attribute keys' in the block + + - name: filtered_transactions + kind: map + blockFilter: + module: index_transactions + query: + params: true + inputs: + - params: string + - map: all_transactions + output: + type: proto:sf.substreams.starknet.type.v1.Transactions + doc: | + `filtered_transactions` reads from `all_transactions` and applies a filter on keys, + only outputting the transactions that match the filter. + Example usage: `(tx:class_hash:0x0000000 && rc:type:0)` + +params: + filtered_transactions: "(rc:execution_status:1)" From b90b8fd160ed393e46340d57df0f7dff174c269e Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Tue, 16 Jul 2024 12:35:02 -0400 Subject: [PATCH 18/23] remove old files --- starket-common/.gitignore | 3 - starket-common/.idea/workspace.xml | 56 + starket-common/Makefile | 19 - starket-common/README.md | 25 - starket-common/generated.go | 170 - starket-common/go.mod | 25 - starket-common/go.sum | 45 - starket-common/local.go | 10 - starket-common/main.go | 190 - starket-common/main_test.go | 50 - .../pb/sf/starknet/type/v1/block.pb.go | 4045 --- .../sf/starknet/type/v1/block_vtproto.pb.go | 22205 ---------------- .../pb/sf/substreams/index/v1/keys.pb.go | 159 - .../sf/substreams/index/v1/keys_vtproto.pb.go | 338 - .../starknet/type/v1/starknet.pb.go | 194 - .../starknet/type/v1/starknet_vtproto.pb.go | 455 - .../pb/sf/substreams/v1/clock.pb.go | 256 - .../pb/sf/substreams/v1/clock_vtproto.pb.go | 834 - starket-common/proto/buf.gen.yaml | 13 - starket-common/proto/buf.lock | 13 - starket-common/proto/buf.yaml | 4 - .../starknet/type/v1/starknet.proto | 14 - starket-common/sqe/api.go | 54 - starket-common/sqe/api_test.go | 150 - starket-common/sqe/bitmap.go | 116 - starket-common/sqe/bitmap_test.go | 57 - starket-common/sqe/errors.go | 39 - starket-common/sqe/init_test.go | 79 - starket-common/sqe/keys.go | 80 - starket-common/sqe/keys_test.go | 70 - starket-common/sqe/lexer.go | 111 - starket-common/sqe/lexer_test.go | 57 - starket-common/sqe/optimizer.go | 33 - starket-common/sqe/optimizer_test.go | 120 - starket-common/sqe/parser.go | 263 - starket-common/sqe/parser_bench_test.go | 54 - starket-common/sqe/parser_test.go | 317 - starket-common/sqe/transformer.go | 38 - starket-common/sqe/traversal.go | 113 - starket-common/sqe/types.go | 111 - starket-common/substreams.yaml | 59 - 41 files changed, 56 insertions(+), 30988 deletions(-) delete mode 100644 starket-common/.gitignore create mode 100644 starket-common/.idea/workspace.xml delete mode 100644 starket-common/Makefile delete mode 100644 starket-common/README.md delete mode 100644 starket-common/generated.go delete mode 100644 starket-common/go.mod delete mode 100644 starket-common/go.sum delete mode 100644 starket-common/local.go delete mode 100644 starket-common/main.go delete mode 100644 starket-common/main_test.go delete mode 100644 starket-common/pb/sf/starknet/type/v1/block.pb.go delete mode 100644 starket-common/pb/sf/starknet/type/v1/block_vtproto.pb.go delete mode 100644 starket-common/pb/sf/substreams/index/v1/keys.pb.go delete mode 100644 starket-common/pb/sf/substreams/index/v1/keys_vtproto.pb.go delete mode 100644 starket-common/pb/sf/substreams/starknet/type/v1/starknet.pb.go delete mode 100644 starket-common/pb/sf/substreams/starknet/type/v1/starknet_vtproto.pb.go delete mode 100644 starket-common/pb/sf/substreams/v1/clock.pb.go delete mode 100644 starket-common/pb/sf/substreams/v1/clock_vtproto.pb.go delete mode 100644 starket-common/proto/buf.gen.yaml delete mode 100644 starket-common/proto/buf.lock delete mode 100644 starket-common/proto/buf.yaml delete mode 100644 starket-common/proto/sf/substreams/starknet/type/v1/starknet.proto delete mode 100644 starket-common/sqe/api.go delete mode 100644 starket-common/sqe/api_test.go delete mode 100644 starket-common/sqe/bitmap.go delete mode 100644 starket-common/sqe/bitmap_test.go delete mode 100644 starket-common/sqe/errors.go delete mode 100644 starket-common/sqe/init_test.go delete mode 100644 starket-common/sqe/keys.go delete mode 100644 starket-common/sqe/keys_test.go delete mode 100644 starket-common/sqe/lexer.go delete mode 100644 starket-common/sqe/lexer_test.go delete mode 100644 starket-common/sqe/optimizer.go delete mode 100644 starket-common/sqe/optimizer_test.go delete mode 100644 starket-common/sqe/parser.go delete mode 100644 starket-common/sqe/parser_bench_test.go delete mode 100644 starket-common/sqe/parser_test.go delete mode 100644 starket-common/sqe/transformer.go delete mode 100644 starket-common/sqe/traversal.go delete mode 100644 starket-common/sqe/types.go delete mode 100644 starket-common/substreams.yaml diff --git a/starket-common/.gitignore b/starket-common/.gitignore deleted file mode 100644 index e3816cc..0000000 --- a/starket-common/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.DS_Store -wasm.wasm -.idea diff --git a/starket-common/.idea/workspace.xml b/starket-common/.idea/workspace.xml new file mode 100644 index 0000000..4b86796 --- /dev/null +++ b/starket-common/.idea/workspace.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + true + + \ No newline at end of file diff --git a/starket-common/Makefile b/starket-common/Makefile deleted file mode 100644 index 3705982..0000000 --- a/starket-common/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -delete-binpb: -ifneq ("$(wildcard $(PATH_TO_FILE))","") - rm proto/generated-buf-build.binpb -endif - -generated-buf-build.binpb: proto/buf.gen.yaml proto/buf.yaml delete-binpb - cd proto; buf mod update; buf build --as-file-descriptor-set -o generated-buf-build.binpb - -.PHONY: build -build: generated-buf-build.binpb - cargo build --target wasm32-unknown-unknown --release - -.PHONY: protogen -protogen: generated-buf-build.binpb - cd proto; buf generate generated-buf-build.binpb -o ../ - -.PHONY: package -package: build - substreams pack ./substreams.yaml \ No newline at end of file diff --git a/starket-common/README.md b/starket-common/README.md deleted file mode 100644 index 852f2eb..0000000 --- a/starket-common/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Substreams in Go with tinygo - -First test is to receive a Clock in Go, and ship it to the Substreams engine, and have it run over there. - -- Craft a first `map_mod` that prints something to logs. - -First test is to unpack a raw Ethereum Block, from within `tinygo`. - -## Build - -```bash -tinygo build -o wasm.wasm -target wasi -gc leaking -scheduler none . -``` - -## Usage - -```bash -substreams gui ./substreams-starknet.yaml --plaintext -e 127.0.0.1:10016 -t +10 map_test -# or -substreams run ./substreams-starknet.yaml --plaintext -e 127.0.0.1:10016 -t +10 map_test -``` - -```bash -buf generate --exclude-path sf/substreams-starknet/v1,sf/substreams-starknet/rpc,google/,sf/substreams-starknet/sink,sf/substreams-starknet -``` diff --git a/starket-common/generated.go b/starket-common/generated.go deleted file mode 100644 index 24b16f9..0000000 --- a/starket-common/generated.go +++ /dev/null @@ -1,170 +0,0 @@ -//go:build tinygo - -package main - -import ( - "fmt" - "reflect" - "unsafe" - - pbstarknet "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/starknet/type/v1" - v1 "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/starknet/type/v1" -) - -//go:generate substreams-starknet protogen ./substreams-starknet.yaml --with-tinygo-maps // creates genre substreams-starknet.gen.go - -// Dans WASI: _start -func main() {} - -////export db_get_i64 -//func _db_get_i64(code, scope, key uint64) []byte {} - -//export output -func _output(ptr, len int32) - -//go:wasm-module logger -//export println -func _log(ptr int32, len int32) - -// Output the serialized protobuf byte array to the Substreams engine -func output(out []byte) { - _output(byteArrayToPtr(out)) -} - -// Log a line to the Substreams engine -func Logf(message string, args ...any) { - _log(stringToPtr(fmt.Sprintf(message, args...))) -} - -//export all_transactions -func _all_transactions(blockPtr, blockLen int32) (retval int32) { - defer func() { - if r := recover(); r != nil { - Logf("%#v", r) - retval = 1 - } - }() - - a := ptrToString(blockPtr, blockLen) - b := []byte(a) - dest := &pbstarknet.Block{} - if err := dest.UnmarshalVT(b); err != nil { - Logf("failed unmarshal: %s", err) - return 1 - } - - ret, err := AllTransactions(dest) - if err != nil { - panic(fmt.Errorf("map_extrinsics failed: %w", err)) - } - if ret != nil { - cnt, err := ret.MarshalVT() - if err != nil { - panic(fmt.Errorf("marshal output: %w", err)) - } - output(cnt) - } - return 0 -} - -//export index_transactions -func _index_transactions(ptr, len int32) (retval int32) { - defer func() { - if r := recover(); r != nil { - Logf("%#v", r) - retval = 1 - } - }() - - a := ptrToString(int32(ptr), int32(len)) - b := []byte(a) - dest := &v1.Transactions{} - if err := dest.UnmarshalVT(b); err != nil { - Logf("failed unmarshal: %s", err) - return 1 - } - - ret, err := IndexTransaction(dest) - if err != nil { - panic(fmt.Errorf("map_extrinsics failed: %w", err)) - } - if ret != nil { - cnt, err := ret.MarshalVT() - if err != nil { - panic(fmt.Errorf("marshal output: %w", err)) - } - output(cnt) - } - return 0 -} - -//export filtered_transactions -func _filtered_transactions(queryPtr, queryLen int32, transactionsPtr, transactionsLen int32) (ret int32) { - defer func() { - if r := recover(); r != nil { - Logf("%#v", r) - ret = 1 - } - }() - - query := ptrToString(queryPtr, queryLen) - txsData := ptrToBytes(transactionsPtr, transactionsLen) - txs := &v1.Transactions{} - - if err := txs.UnmarshalVT(txsData); err != nil { - Logf("failed unmarshal: %s", err) - return 1 - } - - out, err := FilteredTransactions(query, txs) - if err != nil { - panic(fmt.Errorf("map_extrinsics failed: %w", err)) - } - - if out != nil { - cnt, err := out.MarshalVT() - if err != nil { - panic(fmt.Errorf("marshal output: %w", err)) - } - output(cnt) - } - return 0 -} - -// ptrToString returns a string from WebAssembly compatible numeric types -// representing its pointer and length. -func ptrToString(ptr int32, size int32) string { - // Get a slice view of the underlying bytes in the stream. We use SliceHeader, not StringHeader - // as it allows us to fix the capacity to what was allocated. - return *(*string)(unsafe.Pointer(&reflect.SliceHeader{ - Data: uintptr(ptr), - Len: int(size), // Tinygo requires these as uintptrs even if they are int fields. - Cap: int(size), // ^^ See https://github.com/tinygo-org/tinygo/issues/1284 - })) -} - -func ptrToBytes(ptr int32, size int32) []byte { - // Get a slice view of the underlying bytes in the stream. We use SliceHeader, not StringHeader - // as it allows us to fix the capacity to what was allocated. - return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{ - Data: uintptr(ptr), - Len: int(size), // Tinygo requires these as uintptrs even if they are int fields. - Cap: int(size), // ^^ See https://github.com/tinygo-org/tinygo/issues/1284 - })) -} - -// stringToPtr returns a pointer and size pair for the given string in a way -// compatible with WebAssembly numeric types. -func stringToPtr(s string) (int32, int32) { - buf := []byte(s) - ptr := &buf[0] - unsafePtr := uintptr(unsafe.Pointer(ptr)) - return int32(unsafePtr), int32(len(buf)) -} - -// byteArrayToPtr returns a pointer and size pair for the given byte array, for WASM compat. -func byteArrayToPtr(buf []byte) (int32, int32) { - ptr := &buf[0] - unsafePtr := uintptr(unsafe.Pointer(ptr)) - return int32(unsafePtr), int32(len(buf)) -} diff --git a/starket-common/go.mod b/starket-common/go.mod deleted file mode 100644 index caa490b..0000000 --- a/starket-common/go.mod +++ /dev/null @@ -1,25 +0,0 @@ -module github.com/streamingfast/substreams-foundational-modules/starket-common - -go 1.22.0 - -require ( - github.com/NethermindEth/juno v0.3.1 - github.com/RoaringBitmap/roaring v1.9.1 - github.com/alecthomas/participle v0.7.1 - github.com/planetscale/vtprotobuf v0.6.0 - github.com/protocolbuffers/protoscope v0.0.0-20221109213918-8e7a6aafa2c9 - github.com/stretchr/testify v1.8.4 - google.golang.org/protobuf v1.33.0 -) - -require ( - github.com/bits-and-blooms/bitset v1.12.0 // indirect - github.com/consensys/gnark-crypto v0.10.1-0.20230414110055-e500f2f0ff3a // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/fxamacker/cbor/v2 v2.4.0 // indirect - github.com/mschoch/smat v0.2.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/x448/float16 v0.8.4 // indirect - golang.org/x/sys v0.20.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/starket-common/go.sum b/starket-common/go.sum deleted file mode 100644 index 3843e5c..0000000 --- a/starket-common/go.sum +++ /dev/null @@ -1,45 +0,0 @@ -github.com/NethermindEth/juno v0.3.1 h1:AW72LiAm9gqUeCVJWvepnZcTnpU4Vkl0KzPMxS+42FA= -github.com/NethermindEth/juno v0.3.1/go.mod h1:SGbTpgGaCsxhFsKOid7Ylnz//WZ8swtILk+NbHGsk/Q= -github.com/RoaringBitmap/roaring v1.9.1 h1:LXcSqGGGMKm+KAzUyWn7ZeREqoOkoMX+KwLOK1thc4I= -github.com/RoaringBitmap/roaring v1.9.1/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= -github.com/alecthomas/participle v0.7.1 h1:2bN7reTw//5f0cugJcTOnY/NYZcWQOaajW+BwZB5xWs= -github.com/alecthomas/participle v0.7.1/go.mod h1:HfdmEuwvr12HXQN44HPWXR0lHmVolVYe4dyL6lQ3duY= -github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= -github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA= -github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/consensys/gnark-crypto v0.10.1-0.20230414110055-e500f2f0ff3a h1:hUUl++56+8w2aG2NXdQGfU8cBT9ZZ8UP4R3s47dSFdQ= -github.com/consensys/gnark-crypto v0.10.1-0.20230414110055-e500f2f0ff3a/go.mod h1:Iq/P3HHl0ElSjsg2E1gsMwhAyxnxoKK5nVyZKd+/KhU= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fxamacker/cbor/v2 v2.4.0 h1:ri0ArlOR+5XunOP8CRUowT0pSJOwhW098ZCUyskZD88= -github.com/fxamacker/cbor/v2 v2.4.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= -github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= -github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= -github.com/planetscale/vtprotobuf v0.6.0 h1:nBeETjudeJ5ZgBHUz1fVHvbqUKnYOXNhsIEabROxmNA= -github.com/planetscale/vtprotobuf v0.6.0/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/protocolbuffers/protoscope v0.0.0-20221109213918-8e7a6aafa2c9 h1:arwj11zP0yJIxIRiDn22E0H8PxfF7TsTrc2wIPFIsf4= -github.com/protocolbuffers/protoscope v0.0.0-20221109213918-8e7a6aafa2c9/go.mod h1:SKZx6stCn03JN3BOWTwvVIO2ajMkb/zQdTceXYhKw/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= -github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/starket-common/local.go b/starket-common/local.go deleted file mode 100644 index beb15e8..0000000 --- a/starket-common/local.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build !tinygo - -package main - -import "fmt" - -// Log a line to the Substreams engine -func Logf(message string, args ...any) { - fmt.Printf(message+"\n", args...) -} diff --git a/starket-common/main.go b/starket-common/main.go deleted file mode 100644 index 47f8681..0000000 --- a/starket-common/main.go +++ /dev/null @@ -1,190 +0,0 @@ -package main - -import ( - "context" - "fmt" - "time" - - "github.com/streamingfast/substreams-foundational-modules/starket-common/sqe" - - "github.com/NethermindEth/juno/core/felt" - pbstarknet "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/starknet/type/v1" - pbindex "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/index/v1" - v1 "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/starknet/type/v1" - pbsubstreams "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/v1" - "google.golang.org/protobuf/types/known/timestamppb" -) - -func AllTransactions(block *pbstarknet.Block) (*v1.Transactions, error) { - clock := &pbsubstreams.Clock{ - Id: feltToString(block.BlockHash), - Number: block.BlockNumber, - Timestamp: timestamppb.New(time.Unix(int64(block.Timestamp), 0)), - } - - transactions := &v1.Transactions{ - Clock: clock, - } - for _, tx := range block.Transactions { - transactions.TransactionsWithReceipt = append(transactions.TransactionsWithReceipt, tx) - } - - return transactions, nil -} - -func IndexTransaction(transactions *v1.Transactions) (*pbindex.Keys, error) { - keys := &pbindex.Keys{} - for _, tx := range transactions.TransactionsWithReceipt { - idx, err := indexForTransactionsWithReceipt(tx) - if err != nil { - return nil, fmt.Errorf("indexing transaction: %w", err) - } - keys.Keys = append(keys.Keys, idx.Keys.Keys...) - } - return keys, nil -} - -func indexForTransactionsWithReceipt(transaction *pbstarknet.TransactionWithReceipt) (*Index, error) { - index := &Index{ - Keys: &pbindex.Keys{}, - } - - switch tt := transaction.Transaction.(type) { - case *pbstarknet.TransactionWithReceipt_DeployTransactionV0: - t := tt.DeployTransactionV0 - index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) - index.AddKey(feltToIndexKey("tx:contract_address_salt", t.ContractAddressSalt)) - index.AddKey(stringToIndexKey("tx:version", t.Version)) - - case *pbstarknet.TransactionWithReceipt_DeployAccountTransactionV1: - t := tt.DeployAccountTransactionV1 - index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) - index.AddKey(feltToIndexKey("tx:contract_address_salt", t.ContractAddressSalt)) - index.AddKey(stringToIndexKey("tx:version", t.Version)) - - case *pbstarknet.TransactionWithReceipt_DeployAccountTransactionV3: - t := tt.DeployAccountTransactionV3 - index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) - index.AddKey(feltToIndexKey("tx:contract_address_salt", t.ContractAddressSalt)) - index.AddKey(stringToIndexKey("tx:version", t.Version)) - - case *pbstarknet.TransactionWithReceipt_DeclareTransactionV0: - t := tt.DeclareTransactionV0 - index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) - index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) - - case *pbstarknet.TransactionWithReceipt_DeclareTransactionV1: - t := tt.DeclareTransactionV1 - index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) - index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) - - case *pbstarknet.TransactionWithReceipt_DeclareTransactionV2: - t := tt.DeclareTransactionV2 - index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) - index.AddKey(feltToIndexKey("tx:class_hash", t.ClassHash)) - index.AddKey(feltToIndexKey("tx:compile_class_hash", t.CompiledClassHash)) - - case *pbstarknet.TransactionWithReceipt_DeclareTransactionV3: - t := tt.DeclareTransactionV3 - index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) - index.AddKey(feltToIndexKey("tx:compile_class_hash", t.CompiledClassHash)) - index.AddKey(stringToIndexKey("tx:version", t.Version)) - - case *pbstarknet.TransactionWithReceipt_InvokeTransactionV0: - t := tt.InvokeTransactionV0 - index.AddKey(feltToIndexKey("tx:contract_address", t.ContractAddress)) - index.AddKey(stringToIndexKey("tx:version", t.Version)) - index.AddKey(feltToIndexKey("tx:entry_point_selector", t.EntryPointSelector)) - - case *pbstarknet.TransactionWithReceipt_InvokeTransactionV1: - t := tt.InvokeTransactionV1 - index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) - index.AddKey(stringToIndexKey("tx:version", t.Version)) - - case *pbstarknet.TransactionWithReceipt_InvokeTransactionV3: - t := tt.InvokeTransactionV3 - index.AddKey(feltToIndexKey("tx:sender_address", t.SenderAddress)) - index.AddKey(stringToIndexKey("tx:version", t.Version)) - - case *pbstarknet.TransactionWithReceipt_L1HandlerTransaction: - t := tt.L1HandlerTransaction - index.AddKey(stringToIndexKey("tx:version", t.Version)) - index.AddKey(feltToIndexKey("tx:contract_address", t.ContractAddress)) - index.AddKey(feltToIndexKey("tx:entry_point_selector", t.EntryPointSelector)) - - default: - return nil, fmt.Errorf("unknown transaction type %T", transaction) - } - receipt := transaction.Receipt - index.AddKey(fmt.Sprintf("rc:type:%d", receipt.Type)) - index.AddKey(fmt.Sprintf("rc:execution_status:%d", receipt.ExecutionStatus)) - - for _, e := range receipt.Events { - index.AddKey(feltToIndexKey("ev:from_address", e.FromAddress)) - for _, key := range e.Keys { - index.AddKey(feltToIndexKey("ev:key", key)) - } - } - - return index, nil -} - -func FilteredTransactions(query string, transactions *v1.Transactions) (*v1.Transactions, error) { - filtered := &v1.Transactions{ - Clock: transactions.Clock, - } - - for _, tx := range transactions.TransactionsWithReceipt { - idx, err := indexForTransactionsWithReceipt(tx) - if err != nil { - return nil, fmt.Errorf("indexing transaction: %w", err) - } - - match, err := applyQuery(idx.Keys, query) - if err != nil { - return nil, fmt.Errorf("applying query: %w", err) - } - if match { - filtered.TransactionsWithReceipt = append(filtered.TransactionsWithReceipt, tx) - } - - } - - if len(filtered.TransactionsWithReceipt) == 0 { - return &v1.Transactions{}, nil - } - - return filtered, nil -} - -func applyQuery(keys *pbindex.Keys, query string) (bool, error) { - keyQuerier := sqe.NewFromKeys(keys.Keys) - q, err := sqe.Parse(context.Background(), query) - if err != nil { - return false, fmt.Errorf("parsing query %q: %w", query, err) - } - - return sqe.KeysApply(q, keyQuerier), nil -} - -type Index struct { - Keys *pbindex.Keys -} - -func (i *Index) AddKey(key string) { - i.Keys.Keys = append(i.Keys.Keys, key) -} - -func stringToIndexKey(prefix, str string) string { - return fmt.Sprintf("%s:%s", prefix, str) -} - -func feltToIndexKey(prefix string, bytes []byte) string { - return fmt.Sprintf("%s:%s", prefix, feltToString(bytes)) -} - -func feltToString(bytes []byte) string { - f := &felt.Felt{} - f.SetBytes(bytes) - return f.String() -} diff --git a/starket-common/main_test.go b/starket-common/main_test.go deleted file mode 100644 index b55aac1..0000000 --- a/starket-common/main_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package main - -import ( - "encoding/hex" - "testing" - - v1 "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/starknet/type/v1" - - pbstarknet "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/starknet/type/v1" - "github.com/stretchr/testify/require" -) - -func Test_mapBlockEvents(t *testing.T) { - block := &pbstarknet.Block{ - Transactions: []*pbstarknet.TransactionWithReceipt{ - { - Transaction: &pbstarknet.TransactionWithReceipt_DeployTransactionV0{}, - }, - }, - } - - txs, err := AllTransaction(block) - require.NoError(t, err) - - require.Equal(t, 1, len(txs.TransactionsWithReceipt)) -} - -func Test_FilteredTransactions(t *testing.T) { - ch := []byte("class_hash") - xch := "0x" + hex.EncodeToString(ch) - - tx := &pbstarknet.TransactionWithReceipt{ - Transaction: &pbstarknet.TransactionWithReceipt_DeployTransactionV0{ - DeployTransactionV0: &pbstarknet.DeployTransactionV0{ - ClassHash: []byte("class_hash"), - Version: "0x3", - ContractAddressSalt: []byte("contract_address_salt"), - }, - }, - Receipt: &pbstarknet.TransactionReceipt{}, - } - txs := &v1.Transactions{ - TransactionsWithReceipt: []*pbstarknet.TransactionWithReceipt{tx}, - } - - txs, err := FilteredTransactions("tx:class_hash:"+xch, txs) - require.NoError(t, err) - - require.Equal(t, 1, len(txs.TransactionsWithReceipt)) -} diff --git a/starket-common/pb/sf/starknet/type/v1/block.pb.go b/starket-common/pb/sf/starknet/type/v1/block.pb.go deleted file mode 100644 index cd54c08..0000000 --- a/starket-common/pb/sf/starknet/type/v1/block.pb.go +++ /dev/null @@ -1,4045 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: sf/starknet/type/v1/block.proto - -package typev1 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/timestamppb" - 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) -) - -// specifies whether the data of this block is published via blob data or calldata -type L1_DA_MODE int32 - -const ( - L1_DA_MODE_L1_DA_MODE_UNKNOWN L1_DA_MODE = 0 - L1_DA_MODE_CALLDATA L1_DA_MODE = 1 - L1_DA_MODE_BLOB L1_DA_MODE = 2 -) - -// Enum value maps for L1_DA_MODE. -var ( - L1_DA_MODE_name = map[int32]string{ - 0: "L1_DA_MODE_UNKNOWN", - 1: "CALLDATA", - 2: "BLOB", - } - L1_DA_MODE_value = map[string]int32{ - "L1_DA_MODE_UNKNOWN": 0, - "CALLDATA": 1, - "BLOB": 2, - } -) - -func (x L1_DA_MODE) Enum() *L1_DA_MODE { - p := new(L1_DA_MODE) - *p = x - return p -} - -func (x L1_DA_MODE) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (L1_DA_MODE) Descriptor() protoreflect.EnumDescriptor { - return file_sf_starknet_type_v1_block_proto_enumTypes[0].Descriptor() -} - -func (L1_DA_MODE) Type() protoreflect.EnumType { - return &file_sf_starknet_type_v1_block_proto_enumTypes[0] -} - -func (x L1_DA_MODE) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use L1_DA_MODE.Descriptor instead. -func (L1_DA_MODE) EnumDescriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{0} -} - -type FEE_DATA_AVAILABILITY_MODE int32 - -const ( - FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN FEE_DATA_AVAILABILITY_MODE = 0 - FEE_DATA_AVAILABILITY_MODE_L1 FEE_DATA_AVAILABILITY_MODE = 1 - FEE_DATA_AVAILABILITY_MODE_L2 FEE_DATA_AVAILABILITY_MODE = 2 -) - -// Enum value maps for FEE_DATA_AVAILABILITY_MODE. -var ( - FEE_DATA_AVAILABILITY_MODE_name = map[int32]string{ - 0: "FEE_DATA_AVAILABILITY_MODE_UNKNOWN", - 1: "L1", - 2: "L2", - } - FEE_DATA_AVAILABILITY_MODE_value = map[string]int32{ - "FEE_DATA_AVAILABILITY_MODE_UNKNOWN": 0, - "L1": 1, - "L2": 2, - } -) - -func (x FEE_DATA_AVAILABILITY_MODE) Enum() *FEE_DATA_AVAILABILITY_MODE { - p := new(FEE_DATA_AVAILABILITY_MODE) - *p = x - return p -} - -func (x FEE_DATA_AVAILABILITY_MODE) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FEE_DATA_AVAILABILITY_MODE) Descriptor() protoreflect.EnumDescriptor { - return file_sf_starknet_type_v1_block_proto_enumTypes[1].Descriptor() -} - -func (FEE_DATA_AVAILABILITY_MODE) Type() protoreflect.EnumType { - return &file_sf_starknet_type_v1_block_proto_enumTypes[1] -} - -func (x FEE_DATA_AVAILABILITY_MODE) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use FEE_DATA_AVAILABILITY_MODE.Descriptor instead. -func (FEE_DATA_AVAILABILITY_MODE) EnumDescriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{1} -} - -type TRANSACTION_TYPE int32 - -const ( - TRANSACTION_TYPE_TRANSACTION_TYPE_UNKNOWN TRANSACTION_TYPE = 0 - TRANSACTION_TYPE_INVOKE TRANSACTION_TYPE = 1 - TRANSACTION_TYPE_DECLARE TRANSACTION_TYPE = 2 - TRANSACTION_TYPE_DEPLOY TRANSACTION_TYPE = 3 - TRANSACTION_TYPE_DEPLOY_ACCOUNT TRANSACTION_TYPE = 4 - TRANSACTION_TYPE_L1_HANDLER TRANSACTION_TYPE = 5 -) - -// Enum value maps for TRANSACTION_TYPE. -var ( - TRANSACTION_TYPE_name = map[int32]string{ - 0: "TRANSACTION_TYPE_UNKNOWN", - 1: "INVOKE", - 2: "DECLARE", - 3: "DEPLOY", - 4: "DEPLOY_ACCOUNT", - 5: "L1_HANDLER", - } - TRANSACTION_TYPE_value = map[string]int32{ - "TRANSACTION_TYPE_UNKNOWN": 0, - "INVOKE": 1, - "DECLARE": 2, - "DEPLOY": 3, - "DEPLOY_ACCOUNT": 4, - "L1_HANDLER": 5, - } -) - -func (x TRANSACTION_TYPE) Enum() *TRANSACTION_TYPE { - p := new(TRANSACTION_TYPE) - *p = x - return p -} - -func (x TRANSACTION_TYPE) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TRANSACTION_TYPE) Descriptor() protoreflect.EnumDescriptor { - return file_sf_starknet_type_v1_block_proto_enumTypes[2].Descriptor() -} - -func (TRANSACTION_TYPE) Type() protoreflect.EnumType { - return &file_sf_starknet_type_v1_block_proto_enumTypes[2] -} - -func (x TRANSACTION_TYPE) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TRANSACTION_TYPE.Descriptor instead. -func (TRANSACTION_TYPE) EnumDescriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{2} -} - -type EXECUTION_STATUS int32 - -const ( - EXECUTION_STATUS_EXECUTION_STATUS_UNKNOWN EXECUTION_STATUS = 0 - EXECUTION_STATUS_EXECUTION_STATUS_SUCCESS EXECUTION_STATUS = 1 - EXECUTION_STATUS_EXECUTION_STATUS_REVERTED EXECUTION_STATUS = 2 -) - -// Enum value maps for EXECUTION_STATUS. -var ( - EXECUTION_STATUS_name = map[int32]string{ - 0: "EXECUTION_STATUS_UNKNOWN", - 1: "EXECUTION_STATUS_SUCCESS", - 2: "EXECUTION_STATUS_REVERTED", - } - EXECUTION_STATUS_value = map[string]int32{ - "EXECUTION_STATUS_UNKNOWN": 0, - "EXECUTION_STATUS_SUCCESS": 1, - "EXECUTION_STATUS_REVERTED": 2, - } -) - -func (x EXECUTION_STATUS) Enum() *EXECUTION_STATUS { - p := new(EXECUTION_STATUS) - *p = x - return p -} - -func (x EXECUTION_STATUS) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (EXECUTION_STATUS) Descriptor() protoreflect.EnumDescriptor { - return file_sf_starknet_type_v1_block_proto_enumTypes[3].Descriptor() -} - -func (EXECUTION_STATUS) Type() protoreflect.EnumType { - return &file_sf_starknet_type_v1_block_proto_enumTypes[3] -} - -func (x EXECUTION_STATUS) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use EXECUTION_STATUS.Descriptor instead. -func (EXECUTION_STATUS) EnumDescriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{3} -} - -type Block struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockHash []byte `protobuf:"bytes,1,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - // The hash of this block's parent - ParentHash []byte `protobuf:"bytes,2,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` - BlockNumber uint64 `protobuf:"varint,3,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - // The new global state root - NewRoot []byte `protobuf:"bytes,4,opt,name=new_root,json=newRoot,proto3" json:"new_root,omitempty"` - // The time in which the block was created - Timestamp uint64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - // The StarkNet identity of the sequencer submitting this block - SequencerAddress []byte `protobuf:"bytes,6,opt,name=sequencer_address,json=sequencerAddress,proto3" json:"sequencer_address,omitempty"` - // The price of l1 gas in the block - L1GasPrice *ResourcePrice `protobuf:"bytes,7,opt,name=l1_gas_price,json=l1GasPrice,proto3" json:"l1_gas_price,omitempty"` - // The price of l1 data gas in the block - L1DataGasPrice *ResourcePrice `protobuf:"bytes,8,opt,name=l1_data_gas_price,json=l1DataGasPrice,proto3" json:"l1_data_gas_price,omitempty"` - // specifies whether the data of this block is published via blob data or calldata - L1DaMode L1_DA_MODE `protobuf:"varint,9,opt,name=l1_da_mode,json=l1DaMode,proto3,enum=sf.starknet.type.v1.L1_DA_MODE" json:"l1_da_mode,omitempty"` - // Semver of the current Starknet protocol - StarknetVersion string `protobuf:"bytes,10,opt,name=starknet_version,json=starknetVersion,proto3" json:"starknet_version,omitempty"` - // The transactions in this block - Transactions []*TransactionWithReceipt `protobuf:"bytes,11,rep,name=transactions,proto3" json:"transactions,omitempty"` - StateUpdate *StateUpdate `protobuf:"bytes,12,opt,name=state_update,json=stateUpdate,proto3" json:"state_update,omitempty"` -} - -func (x *Block) Reset() { - *x = Block{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Block) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Block) ProtoMessage() {} - -func (x *Block) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_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 Block.ProtoReflect.Descriptor instead. -func (*Block) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{0} -} - -func (x *Block) GetBlockHash() []byte { - if x != nil { - return x.BlockHash - } - return nil -} - -func (x *Block) GetParentHash() []byte { - if x != nil { - return x.ParentHash - } - return nil -} - -func (x *Block) GetBlockNumber() uint64 { - if x != nil { - return x.BlockNumber - } - return 0 -} - -func (x *Block) GetNewRoot() []byte { - if x != nil { - return x.NewRoot - } - return nil -} - -func (x *Block) GetTimestamp() uint64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -func (x *Block) GetSequencerAddress() []byte { - if x != nil { - return x.SequencerAddress - } - return nil -} - -func (x *Block) GetL1GasPrice() *ResourcePrice { - if x != nil { - return x.L1GasPrice - } - return nil -} - -func (x *Block) GetL1DataGasPrice() *ResourcePrice { - if x != nil { - return x.L1DataGasPrice - } - return nil -} - -func (x *Block) GetL1DaMode() L1_DA_MODE { - if x != nil { - return x.L1DaMode - } - return L1_DA_MODE_L1_DA_MODE_UNKNOWN -} - -func (x *Block) GetStarknetVersion() string { - if x != nil { - return x.StarknetVersion - } - return "" -} - -func (x *Block) GetTransactions() []*TransactionWithReceipt { - if x != nil { - return x.Transactions - } - return nil -} - -func (x *Block) GetStateUpdate() *StateUpdate { - if x != nil { - return x.StateUpdate - } - return nil -} - -type ResourcePrice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PriceInFri []byte `protobuf:"bytes,1,opt,name=price_in_fri,json=priceInFri,proto3" json:"price_in_fri,omitempty"` - PriceInWei []byte `protobuf:"bytes,2,opt,name=price_in_wei,json=priceInWei,proto3" json:"price_in_wei,omitempty"` -} - -func (x *ResourcePrice) Reset() { - *x = ResourcePrice{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourcePrice) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourcePrice) ProtoMessage() {} - -func (x *ResourcePrice) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_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 ResourcePrice.ProtoReflect.Descriptor instead. -func (*ResourcePrice) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{1} -} - -func (x *ResourcePrice) GetPriceInFri() []byte { - if x != nil { - return x.PriceInFri - } - return nil -} - -func (x *ResourcePrice) GetPriceInWei() []byte { - if x != nil { - return x.PriceInWei - } - return nil -} - -type TransactionWithReceipt struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Transaction: - // - // *TransactionWithReceipt_InvokeTransactionV0 - // *TransactionWithReceipt_InvokeTransactionV1 - // *TransactionWithReceipt_InvokeTransactionV3 - // *TransactionWithReceipt_L1HandlerTransaction - // *TransactionWithReceipt_DeclareTransactionV0 - // *TransactionWithReceipt_DeclareTransactionV1 - // *TransactionWithReceipt_DeclareTransactionV2 - // *TransactionWithReceipt_DeclareTransactionV3 - // *TransactionWithReceipt_DeployTransactionV0 - // *TransactionWithReceipt_DeployAccountTransactionV1 - // *TransactionWithReceipt_DeployAccountTransactionV3 - Transaction isTransactionWithReceipt_Transaction `protobuf_oneof:"transaction"` - Receipt *TransactionReceipt `protobuf:"bytes,12,opt,name=receipt,proto3" json:"receipt,omitempty"` -} - -func (x *TransactionWithReceipt) Reset() { - *x = TransactionWithReceipt{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransactionWithReceipt) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransactionWithReceipt) ProtoMessage() {} - -func (x *TransactionWithReceipt) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_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 TransactionWithReceipt.ProtoReflect.Descriptor instead. -func (*TransactionWithReceipt) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{2} -} - -func (m *TransactionWithReceipt) GetTransaction() isTransactionWithReceipt_Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (x *TransactionWithReceipt) GetInvokeTransactionV0() *InvokeTransactionV0 { - if x, ok := x.GetTransaction().(*TransactionWithReceipt_InvokeTransactionV0); ok { - return x.InvokeTransactionV0 - } - return nil -} - -func (x *TransactionWithReceipt) GetInvokeTransactionV1() *InvokeTransactionV1 { - if x, ok := x.GetTransaction().(*TransactionWithReceipt_InvokeTransactionV1); ok { - return x.InvokeTransactionV1 - } - return nil -} - -func (x *TransactionWithReceipt) GetInvokeTransactionV3() *InvokeTransactionV3 { - if x, ok := x.GetTransaction().(*TransactionWithReceipt_InvokeTransactionV3); ok { - return x.InvokeTransactionV3 - } - return nil -} - -func (x *TransactionWithReceipt) GetL1HandlerTransaction() *L1HandlerTransaction { - if x, ok := x.GetTransaction().(*TransactionWithReceipt_L1HandlerTransaction); ok { - return x.L1HandlerTransaction - } - return nil -} - -func (x *TransactionWithReceipt) GetDeclareTransactionV0() *DeclareTransactionV0 { - if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeclareTransactionV0); ok { - return x.DeclareTransactionV0 - } - return nil -} - -func (x *TransactionWithReceipt) GetDeclareTransactionV1() *DeclareTransactionV1 { - if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeclareTransactionV1); ok { - return x.DeclareTransactionV1 - } - return nil -} - -func (x *TransactionWithReceipt) GetDeclareTransactionV2() *DeclareTransactionV2 { - if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeclareTransactionV2); ok { - return x.DeclareTransactionV2 - } - return nil -} - -func (x *TransactionWithReceipt) GetDeclareTransactionV3() *DeclareTransactionV3 { - if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeclareTransactionV3); ok { - return x.DeclareTransactionV3 - } - return nil -} - -func (x *TransactionWithReceipt) GetDeployTransactionV0() *DeployTransactionV0 { - if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeployTransactionV0); ok { - return x.DeployTransactionV0 - } - return nil -} - -func (x *TransactionWithReceipt) GetDeployAccountTransactionV1() *DeployAccountTransactionV1 { - if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeployAccountTransactionV1); ok { - return x.DeployAccountTransactionV1 - } - return nil -} - -func (x *TransactionWithReceipt) GetDeployAccountTransactionV3() *DeployAccountTransactionV3 { - if x, ok := x.GetTransaction().(*TransactionWithReceipt_DeployAccountTransactionV3); ok { - return x.DeployAccountTransactionV3 - } - return nil -} - -func (x *TransactionWithReceipt) GetReceipt() *TransactionReceipt { - if x != nil { - return x.Receipt - } - return nil -} - -type isTransactionWithReceipt_Transaction interface { - isTransactionWithReceipt_Transaction() -} - -type TransactionWithReceipt_InvokeTransactionV0 struct { - InvokeTransactionV0 *InvokeTransactionV0 `protobuf:"bytes,1,opt,name=invoke_transaction_v0,json=invokeTransactionV0,proto3,oneof"` -} - -type TransactionWithReceipt_InvokeTransactionV1 struct { - InvokeTransactionV1 *InvokeTransactionV1 `protobuf:"bytes,2,opt,name=invoke_transaction_v1,json=invokeTransactionV1,proto3,oneof"` -} - -type TransactionWithReceipt_InvokeTransactionV3 struct { - InvokeTransactionV3 *InvokeTransactionV3 `protobuf:"bytes,3,opt,name=invoke_transaction_v3,json=invokeTransactionV3,proto3,oneof"` -} - -type TransactionWithReceipt_L1HandlerTransaction struct { - L1HandlerTransaction *L1HandlerTransaction `protobuf:"bytes,4,opt,name=l1_handler_transaction,json=l1HandlerTransaction,proto3,oneof"` //not versioned in api definition -} - -type TransactionWithReceipt_DeclareTransactionV0 struct { - DeclareTransactionV0 *DeclareTransactionV0 `protobuf:"bytes,5,opt,name=declare_transaction_v0,json=declareTransactionV0,proto3,oneof"` -} - -type TransactionWithReceipt_DeclareTransactionV1 struct { - DeclareTransactionV1 *DeclareTransactionV1 `protobuf:"bytes,6,opt,name=declare_transaction_v1,json=declareTransactionV1,proto3,oneof"` -} - -type TransactionWithReceipt_DeclareTransactionV2 struct { - DeclareTransactionV2 *DeclareTransactionV2 `protobuf:"bytes,7,opt,name=declare_transaction_v2,json=declareTransactionV2,proto3,oneof"` -} - -type TransactionWithReceipt_DeclareTransactionV3 struct { - DeclareTransactionV3 *DeclareTransactionV3 `protobuf:"bytes,8,opt,name=declare_transaction_v3,json=declareTransactionV3,proto3,oneof"` -} - -type TransactionWithReceipt_DeployTransactionV0 struct { - DeployTransactionV0 *DeployTransactionV0 `protobuf:"bytes,9,opt,name=deploy_transaction_v0,json=deployTransactionV0,proto3,oneof"` -} - -type TransactionWithReceipt_DeployAccountTransactionV1 struct { - DeployAccountTransactionV1 *DeployAccountTransactionV1 `protobuf:"bytes,10,opt,name=deploy_account_transaction_v1,json=deployAccountTransactionV1,proto3,oneof"` -} - -type TransactionWithReceipt_DeployAccountTransactionV3 struct { - DeployAccountTransactionV3 *DeployAccountTransactionV3 `protobuf:"bytes,11,opt,name=deploy_account_transaction_v3,json=deployAccountTransactionV3,proto3,oneof"` -} - -func (*TransactionWithReceipt_InvokeTransactionV0) isTransactionWithReceipt_Transaction() {} - -func (*TransactionWithReceipt_InvokeTransactionV1) isTransactionWithReceipt_Transaction() {} - -func (*TransactionWithReceipt_InvokeTransactionV3) isTransactionWithReceipt_Transaction() {} - -func (*TransactionWithReceipt_L1HandlerTransaction) isTransactionWithReceipt_Transaction() {} - -func (*TransactionWithReceipt_DeclareTransactionV0) isTransactionWithReceipt_Transaction() {} - -func (*TransactionWithReceipt_DeclareTransactionV1) isTransactionWithReceipt_Transaction() {} - -func (*TransactionWithReceipt_DeclareTransactionV2) isTransactionWithReceipt_Transaction() {} - -func (*TransactionWithReceipt_DeclareTransactionV3) isTransactionWithReceipt_Transaction() {} - -func (*TransactionWithReceipt_DeployTransactionV0) isTransactionWithReceipt_Transaction() {} - -func (*TransactionWithReceipt_DeployAccountTransactionV1) isTransactionWithReceipt_Transaction() {} - -func (*TransactionWithReceipt_DeployAccountTransactionV3) isTransactionWithReceipt_Transaction() {} - -type TransactionReceipt struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The hash identifying the transaction - TransactionHash []byte `protobuf:"bytes,1,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` - // The fee that was charged by the sequencer - ActualFee *ActualFee `protobuf:"bytes,2,opt,name=actual_fee,json=actualFee,proto3" json:"actual_fee,omitempty"` - // Execution status - ExecutionStatus EXECUTION_STATUS `protobuf:"varint,3,opt,name=execution_status,json=executionStatus,proto3,enum=sf.starknet.type.v1.EXECUTION_STATUS" json:"execution_status,omitempty"` - RevertReason string `protobuf:"bytes,4,opt,name=revert_reason,json=revertReason,proto3" json:"revert_reason,omitempty"` - Type TRANSACTION_TYPE `protobuf:"varint,5,opt,name=type,proto3,enum=sf.starknet.type.v1.TRANSACTION_TYPE" json:"type,omitempty"` - // Messages sent - MessageHash string `protobuf:"bytes,6,opt,name=message_hash,json=messageHash,proto3" json:"message_hash,omitempty"` - // The address of the deployed contract - MessagesSent []*MessagesSent `protobuf:"bytes,7,rep,name=messages_sent,json=messagesSent,proto3" json:"messages_sent,omitempty"` - // The events emitted as part of this transaction - Events []*Event `protobuf:"bytes,8,rep,name=events,proto3" json:"events,omitempty"` - // The resources consumed by the transaction - ExecutionResources *ExecutionResources `protobuf:"bytes,9,opt,name=execution_resources,json=executionResources,proto3" json:"execution_resources,omitempty"` - // The message hash as it appears on the L1 core contract - ContractAddress []byte `protobuf:"bytes,10,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` -} - -func (x *TransactionReceipt) Reset() { - *x = TransactionReceipt{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransactionReceipt) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransactionReceipt) ProtoMessage() {} - -func (x *TransactionReceipt) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[3] - 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 TransactionReceipt.ProtoReflect.Descriptor instead. -func (*TransactionReceipt) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{3} -} - -func (x *TransactionReceipt) GetTransactionHash() []byte { - if x != nil { - return x.TransactionHash - } - return nil -} - -func (x *TransactionReceipt) GetActualFee() *ActualFee { - if x != nil { - return x.ActualFee - } - return nil -} - -func (x *TransactionReceipt) GetExecutionStatus() EXECUTION_STATUS { - if x != nil { - return x.ExecutionStatus - } - return EXECUTION_STATUS_EXECUTION_STATUS_UNKNOWN -} - -func (x *TransactionReceipt) GetRevertReason() string { - if x != nil { - return x.RevertReason - } - return "" -} - -func (x *TransactionReceipt) GetType() TRANSACTION_TYPE { - if x != nil { - return x.Type - } - return TRANSACTION_TYPE_TRANSACTION_TYPE_UNKNOWN -} - -func (x *TransactionReceipt) GetMessageHash() string { - if x != nil { - return x.MessageHash - } - return "" -} - -func (x *TransactionReceipt) GetMessagesSent() []*MessagesSent { - if x != nil { - return x.MessagesSent - } - return nil -} - -func (x *TransactionReceipt) GetEvents() []*Event { - if x != nil { - return x.Events - } - return nil -} - -func (x *TransactionReceipt) GetExecutionResources() *ExecutionResources { - if x != nil { - return x.ExecutionResources - } - return nil -} - -func (x *TransactionReceipt) GetContractAddress() []byte { - if x != nil { - return x.ContractAddress - } - return nil -} - -type MessagesSent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the L2 contract sending the message - FromAddress []byte `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` - // The target L1 address the message is sent to - ToAddress []byte `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` - // The payload of the messageResourceBounds - Payload [][]byte `protobuf:"bytes,3,rep,name=payload,proto3" json:"payload,omitempty"` -} - -func (x *MessagesSent) Reset() { - *x = MessagesSent{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MessagesSent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MessagesSent) ProtoMessage() {} - -func (x *MessagesSent) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[4] - 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 MessagesSent.ProtoReflect.Descriptor instead. -func (*MessagesSent) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{4} -} - -func (x *MessagesSent) GetFromAddress() []byte { - if x != nil { - return x.FromAddress - } - return nil -} - -func (x *MessagesSent) GetToAddress() []byte { - if x != nil { - return x.ToAddress - } - return nil -} - -func (x *MessagesSent) GetPayload() [][]byte { - if x != nil { - return x.Payload - } - return nil -} - -type Event struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // From address - FromAddress []byte `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` - Keys [][]byte `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"` - Data [][]byte `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"` -} - -func (x *Event) Reset() { - *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Event) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Event) ProtoMessage() {} - -func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[5] - 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 Event.ProtoReflect.Descriptor instead. -func (*Event) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{5} -} - -func (x *Event) GetFromAddress() []byte { - if x != nil { - return x.FromAddress - } - return nil -} - -func (x *Event) GetKeys() [][]byte { - if x != nil { - return x.Keys - } - return nil -} - -func (x *Event) GetData() [][]byte { - if x != nil { - return x.Data - } - return nil -} - -type ExecutionResources struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The number of Cairo steps used - Steps uint64 `protobuf:"varint,1,opt,name=steps,proto3" json:"steps,omitempty"` - // The number of unused memory cells (each cell is roughly equivalent to a step) - MemoryHoles uint64 `protobuf:"varint,2,opt,name=memory_holes,json=memoryHoles,proto3" json:"memory_holes,omitempty"` - // The number of RANGE_CHECK builtin instances - RangeCheckBuiltinApplications uint64 `protobuf:"varint,3,opt,name=range_check_builtin_applications,json=rangeCheckBuiltinApplications,proto3" json:"range_check_builtin_applications,omitempty"` - // The number of Pedersen builtin instances - PedersenBuiltinApplications uint64 `protobuf:"varint,4,opt,name=pedersen_builtin_applications,json=pedersenBuiltinApplications,proto3" json:"pedersen_builtin_applications,omitempty"` - // The number of Poseidon builtin instances - PoseidonBuiltinApplications uint64 `protobuf:"varint,5,opt,name=poseidon_builtin_applications,json=poseidonBuiltinApplications,proto3" json:"poseidon_builtin_applications,omitempty"` - // the number of EC_OP builtin instances - EcOpBuiltinApplications uint64 `protobuf:"varint,6,opt,name=ec_op_builtin_applications,json=ecOpBuiltinApplications,proto3" json:"ec_op_builtin_applications,omitempty"` - // the number of ECDSA builtin instances - EcdsaBuiltinApplications uint64 `protobuf:"varint,7,opt,name=ecdsa_builtin_applications,json=ecdsaBuiltinApplications,proto3" json:"ecdsa_builtin_applications,omitempty"` - // the number of BITWISE builtin instances - BitwiseBuiltinApplications uint64 `protobuf:"varint,8,opt,name=bitwise_builtin_applications,json=bitwiseBuiltinApplications,proto3" json:"bitwise_builtin_applications,omitempty"` - // The number of KECCAK builtin instances - KeccakBuiltinApplications uint64 `protobuf:"varint,9,opt,name=keccak_builtin_applications,json=keccakBuiltinApplications,proto3" json:"keccak_builtin_applications,omitempty"` - // The number of accesses to the segment arena - SegmentArenaBuiltin uint64 `protobuf:"varint,10,opt,name=segment_arena_builtin,json=segmentArenaBuiltin,proto3" json:"segment_arena_builtin,omitempty"` - DataAvailability *DataAvailability `protobuf:"bytes,11,opt,name=data_availability,json=dataAvailability,proto3" json:"data_availability,omitempty"` -} - -func (x *ExecutionResources) Reset() { - *x = ExecutionResources{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExecutionResources) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExecutionResources) ProtoMessage() {} - -func (x *ExecutionResources) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[6] - 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 ExecutionResources.ProtoReflect.Descriptor instead. -func (*ExecutionResources) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{6} -} - -func (x *ExecutionResources) GetSteps() uint64 { - if x != nil { - return x.Steps - } - return 0 -} - -func (x *ExecutionResources) GetMemoryHoles() uint64 { - if x != nil { - return x.MemoryHoles - } - return 0 -} - -func (x *ExecutionResources) GetRangeCheckBuiltinApplications() uint64 { - if x != nil { - return x.RangeCheckBuiltinApplications - } - return 0 -} - -func (x *ExecutionResources) GetPedersenBuiltinApplications() uint64 { - if x != nil { - return x.PedersenBuiltinApplications - } - return 0 -} - -func (x *ExecutionResources) GetPoseidonBuiltinApplications() uint64 { - if x != nil { - return x.PoseidonBuiltinApplications - } - return 0 -} - -func (x *ExecutionResources) GetEcOpBuiltinApplications() uint64 { - if x != nil { - return x.EcOpBuiltinApplications - } - return 0 -} - -func (x *ExecutionResources) GetEcdsaBuiltinApplications() uint64 { - if x != nil { - return x.EcdsaBuiltinApplications - } - return 0 -} - -func (x *ExecutionResources) GetBitwiseBuiltinApplications() uint64 { - if x != nil { - return x.BitwiseBuiltinApplications - } - return 0 -} - -func (x *ExecutionResources) GetKeccakBuiltinApplications() uint64 { - if x != nil { - return x.KeccakBuiltinApplications - } - return 0 -} - -func (x *ExecutionResources) GetSegmentArenaBuiltin() uint64 { - if x != nil { - return x.SegmentArenaBuiltin - } - return 0 -} - -func (x *ExecutionResources) GetDataAvailability() *DataAvailability { - if x != nil { - return x.DataAvailability - } - return nil -} - -// invokes a specific function in the desired contract (not necessarily an account) -type InvokeTransactionV0 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The maximal fee that can be charged for including the transaction - MaxFee []byte `protobuf:"bytes,2,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` - // Version of the transaction scheme - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - Signature [][]byte `protobuf:"bytes,4,rep,name=signature,proto3" json:"signature,omitempty"` - ContractAddress []byte `protobuf:"bytes,5,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` - EntryPointSelector []byte `protobuf:"bytes,6,opt,name=entry_point_selector,json=entryPointSelector,proto3" json:"entry_point_selector,omitempty"` - // The parameters passed to the function - Calldata [][]byte `protobuf:"bytes,7,rep,name=calldata,proto3" json:"calldata,omitempty"` -} - -func (x *InvokeTransactionV0) Reset() { - *x = InvokeTransactionV0{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InvokeTransactionV0) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InvokeTransactionV0) ProtoMessage() {} - -func (x *InvokeTransactionV0) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[7] - 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 InvokeTransactionV0.ProtoReflect.Descriptor instead. -func (*InvokeTransactionV0) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{7} -} - -func (x *InvokeTransactionV0) GetMaxFee() []byte { - if x != nil { - return x.MaxFee - } - return nil -} - -func (x *InvokeTransactionV0) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *InvokeTransactionV0) GetSignature() [][]byte { - if x != nil { - return x.Signature - } - return nil -} - -func (x *InvokeTransactionV0) GetContractAddress() []byte { - if x != nil { - return x.ContractAddress - } - return nil -} - -func (x *InvokeTransactionV0) GetEntryPointSelector() []byte { - if x != nil { - return x.EntryPointSelector - } - return nil -} - -func (x *InvokeTransactionV0) GetCalldata() [][]byte { - if x != nil { - return x.Calldata - } - return nil -} - -// initiates a transaction from a given account -type InvokeTransactionV1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The maximal fee that can be charged for including the transaction - MaxFee []byte `protobuf:"bytes,1,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` - // Version of the transaction scheme - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Signature [][]byte `protobuf:"bytes,3,rep,name=signature,proto3" json:"signature,omitempty"` - Nonce []byte `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` - // sender address - SenderAddress []byte `protobuf:"bytes,5,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` - // The data expected by the account's `execute` function (in most usecases, this includes the called contract address and a function selector) - Calldata [][]byte `protobuf:"bytes,6,rep,name=calldata,proto3" json:"calldata,omitempty"` -} - -func (x *InvokeTransactionV1) Reset() { - *x = InvokeTransactionV1{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InvokeTransactionV1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InvokeTransactionV1) ProtoMessage() {} - -func (x *InvokeTransactionV1) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[8] - 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 InvokeTransactionV1.ProtoReflect.Descriptor instead. -func (*InvokeTransactionV1) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{8} -} - -func (x *InvokeTransactionV1) GetMaxFee() []byte { - if x != nil { - return x.MaxFee - } - return nil -} - -func (x *InvokeTransactionV1) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *InvokeTransactionV1) GetSignature() [][]byte { - if x != nil { - return x.Signature - } - return nil -} - -func (x *InvokeTransactionV1) GetNonce() []byte { - if x != nil { - return x.Nonce - } - return nil -} - -func (x *InvokeTransactionV1) GetSenderAddress() []byte { - if x != nil { - return x.SenderAddress - } - return nil -} - -func (x *InvokeTransactionV1) GetCalldata() [][]byte { - if x != nil { - return x.Calldata - } - return nil -} - -// initiates a transaction from a given account -type InvokeTransactionV3 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SenderAddress []byte `protobuf:"bytes,2,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` - // The data expected by the account's `execute` function (in most usecases, this includes the called contract address and a function selector) - Calldata [][]byte `protobuf:"bytes,3,rep,name=calldata,proto3" json:"calldata,omitempty"` - // Version of the transaction scheme - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - Signature [][]byte `protobuf:"bytes,5,rep,name=signature,proto3" json:"signature,omitempty"` - Nonce []byte `protobuf:"bytes,6,opt,name=nonce,proto3" json:"nonce,omitempty"` - // resource bounds for the transaction execution - ResourceBounds *ResourceBounds `protobuf:"bytes,7,opt,name=resource_bounds,json=resourceBounds,proto3" json:"resource_bounds,omitempty"` - // the tip for the transaction - Tip []byte `protobuf:"bytes,8,opt,name=tip,proto3" json:"tip,omitempty"` - // data needed to allow the paymaster to pay for the transaction in native tokens - PaymasterData [][]byte `protobuf:"bytes,9,rep,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` - // data needed to deploy the account contract from which this tx will be initiated - AccountDeploymentData [][]byte `protobuf:"bytes,10,rep,name=account_deployment_data,json=accountDeploymentData,proto3" json:"account_deployment_data,omitempty"` - // The storage domain of the account's nonce (an account has a nonce per DA mode) - NonceDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,11,opt,name=nonce_data_availability_mode,json=nonceDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"nonce_data_availability_mode,omitempty"` - // The storage domain of the account's balance from which fee will be charged - FeeDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,12,opt,name=fee_data_availability_mode,json=feeDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"fee_data_availability_mode,omitempty"` -} - -func (x *InvokeTransactionV3) Reset() { - *x = InvokeTransactionV3{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InvokeTransactionV3) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InvokeTransactionV3) ProtoMessage() {} - -func (x *InvokeTransactionV3) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[9] - 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 InvokeTransactionV3.ProtoReflect.Descriptor instead. -func (*InvokeTransactionV3) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{9} -} - -func (x *InvokeTransactionV3) GetSenderAddress() []byte { - if x != nil { - return x.SenderAddress - } - return nil -} - -func (x *InvokeTransactionV3) GetCalldata() [][]byte { - if x != nil { - return x.Calldata - } - return nil -} - -func (x *InvokeTransactionV3) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *InvokeTransactionV3) GetSignature() [][]byte { - if x != nil { - return x.Signature - } - return nil -} - -func (x *InvokeTransactionV3) GetNonce() []byte { - if x != nil { - return x.Nonce - } - return nil -} - -func (x *InvokeTransactionV3) GetResourceBounds() *ResourceBounds { - if x != nil { - return x.ResourceBounds - } - return nil -} - -func (x *InvokeTransactionV3) GetTip() []byte { - if x != nil { - return x.Tip - } - return nil -} - -func (x *InvokeTransactionV3) GetPaymasterData() [][]byte { - if x != nil { - return x.PaymasterData - } - return nil -} - -func (x *InvokeTransactionV3) GetAccountDeploymentData() [][]byte { - if x != nil { - return x.AccountDeploymentData - } - return nil -} - -func (x *InvokeTransactionV3) GetNonceDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { - if x != nil { - return x.NonceDataAvailabilityMode - } - return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN -} - -func (x *InvokeTransactionV3) GetFeeDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { - if x != nil { - return x.FeeDataAvailabilityMode - } - return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN -} - -// a call to an l1_handler on an L2 contract induced by a message from L1 -type L1HandlerTransaction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Version of the transaction scheme - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // Version of the transaction scheme - Nonce string `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"` - // The address of the contract whose class hash will be returned - ContractAddress []byte `protobuf:"bytes,4,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` - // Entry point selector - EntryPointSelector []byte `protobuf:"bytes,5,opt,name=entry_point_selector,json=entryPointSelector,proto3" json:"entry_point_selector,omitempty"` - // The parameters passed to the function - Calldata [][]byte `protobuf:"bytes,6,rep,name=calldata,proto3" json:"calldata,omitempty"` -} - -func (x *L1HandlerTransaction) Reset() { - *x = L1HandlerTransaction{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *L1HandlerTransaction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*L1HandlerTransaction) ProtoMessage() {} - -func (x *L1HandlerTransaction) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[10] - 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 L1HandlerTransaction.ProtoReflect.Descriptor instead. -func (*L1HandlerTransaction) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{10} -} - -func (x *L1HandlerTransaction) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *L1HandlerTransaction) GetNonce() string { - if x != nil { - return x.Nonce - } - return "" -} - -func (x *L1HandlerTransaction) GetContractAddress() []byte { - if x != nil { - return x.ContractAddress - } - return nil -} - -func (x *L1HandlerTransaction) GetEntryPointSelector() []byte { - if x != nil { - return x.EntryPointSelector - } - return nil -} - -func (x *L1HandlerTransaction) GetCalldata() [][]byte { - if x != nil { - return x.Calldata - } - return nil -} - -// Declare Contract Transaction V0 -type DeclareTransactionV0 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SenderAddress []byte `protobuf:"bytes,2,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` - // The maximal fee that can be charged for including the transaction - MaxFee []byte `protobuf:"bytes,3,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` - // Version of the transaction scheme - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - Signature [][]byte `protobuf:"bytes,5,rep,name=signature,proto3" json:"signature,omitempty"` - // The hash of the requested contract class - ClassHash []byte `protobuf:"bytes,6,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` -} - -func (x *DeclareTransactionV0) Reset() { - *x = DeclareTransactionV0{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeclareTransactionV0) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeclareTransactionV0) ProtoMessage() {} - -func (x *DeclareTransactionV0) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[11] - 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 DeclareTransactionV0.ProtoReflect.Descriptor instead. -func (*DeclareTransactionV0) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{11} -} - -func (x *DeclareTransactionV0) GetSenderAddress() []byte { - if x != nil { - return x.SenderAddress - } - return nil -} - -func (x *DeclareTransactionV0) GetMaxFee() []byte { - if x != nil { - return x.MaxFee - } - return nil -} - -func (x *DeclareTransactionV0) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *DeclareTransactionV0) GetSignature() [][]byte { - if x != nil { - return x.Signature - } - return nil -} - -func (x *DeclareTransactionV0) GetClassHash() []byte { - if x != nil { - return x.ClassHash - } - return nil -} - -// Declare Contract Transaction V1 -type DeclareTransactionV1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SenderAddress []byte `protobuf:"bytes,2,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` - // The maximal fee that can be charged for including the transaction - MaxFee []byte `protobuf:"bytes,3,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` - // Version of the transaction scheme - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - Signature [][]byte `protobuf:"bytes,5,rep,name=signature,proto3" json:"signature,omitempty"` - Nonce []byte `protobuf:"bytes,6,opt,name=nonce,proto3" json:"nonce,omitempty"` - // The hash of the requested contract class - ClassHash []byte `protobuf:"bytes,7,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` -} - -func (x *DeclareTransactionV1) Reset() { - *x = DeclareTransactionV1{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeclareTransactionV1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeclareTransactionV1) ProtoMessage() {} - -func (x *DeclareTransactionV1) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[12] - 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 DeclareTransactionV1.ProtoReflect.Descriptor instead. -func (*DeclareTransactionV1) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{12} -} - -func (x *DeclareTransactionV1) GetSenderAddress() []byte { - if x != nil { - return x.SenderAddress - } - return nil -} - -func (x *DeclareTransactionV1) GetMaxFee() []byte { - if x != nil { - return x.MaxFee - } - return nil -} - -func (x *DeclareTransactionV1) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *DeclareTransactionV1) GetSignature() [][]byte { - if x != nil { - return x.Signature - } - return nil -} - -func (x *DeclareTransactionV1) GetNonce() []byte { - if x != nil { - return x.Nonce - } - return nil -} - -func (x *DeclareTransactionV1) GetClassHash() []byte { - if x != nil { - return x.ClassHash - } - return nil -} - -// Declare Contract Transaction V2 -type DeclareTransactionV2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SenderAddress []byte `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` - // The maximal fee that can be charged for including the transaction - CompiledClassHash []byte `protobuf:"bytes,2,opt,name=compiled_class_hash,json=compiledClassHash,proto3" json:"compiled_class_hash,omitempty"` - MaxFee []byte `protobuf:"bytes,3,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` - // Version of the transaction scheme - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - Signature [][]byte `protobuf:"bytes,5,rep,name=signature,proto3" json:"signature,omitempty"` - Nonce []byte `protobuf:"bytes,6,opt,name=nonce,proto3" json:"nonce,omitempty"` - // The hash of the requested contract class - ClassHash []byte `protobuf:"bytes,7,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` -} - -func (x *DeclareTransactionV2) Reset() { - *x = DeclareTransactionV2{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeclareTransactionV2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeclareTransactionV2) ProtoMessage() {} - -func (x *DeclareTransactionV2) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[13] - 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 DeclareTransactionV2.ProtoReflect.Descriptor instead. -func (*DeclareTransactionV2) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{13} -} - -func (x *DeclareTransactionV2) GetSenderAddress() []byte { - if x != nil { - return x.SenderAddress - } - return nil -} - -func (x *DeclareTransactionV2) GetCompiledClassHash() []byte { - if x != nil { - return x.CompiledClassHash - } - return nil -} - -func (x *DeclareTransactionV2) GetMaxFee() []byte { - if x != nil { - return x.MaxFee - } - return nil -} - -func (x *DeclareTransactionV2) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *DeclareTransactionV2) GetSignature() [][]byte { - if x != nil { - return x.Signature - } - return nil -} - -func (x *DeclareTransactionV2) GetNonce() []byte { - if x != nil { - return x.Nonce - } - return nil -} - -func (x *DeclareTransactionV2) GetClassHash() []byte { - if x != nil { - return x.ClassHash - } - return nil -} - -// Declare Contract Transaction V3 -type DeclareTransactionV3 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SenderAddress []byte `protobuf:"bytes,2,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` - // The hash of the Cairo assembly resulting from the Sierra compilation - CompiledClassHash []byte `protobuf:"bytes,3,opt,name=compiled_class_hash,json=compiledClassHash,proto3" json:"compiled_class_hash,omitempty"` - // Version of the transaction scheme - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - Signature [][]byte `protobuf:"bytes,5,rep,name=signature,proto3" json:"signature,omitempty"` - Nonce []byte `protobuf:"bytes,6,opt,name=nonce,proto3" json:"nonce,omitempty"` - // The hash of the requested contract class - ClassHash []byte `protobuf:"bytes,7,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` - // resource bounds for the transaction execution - ResourceBounds *ResourceBounds `protobuf:"bytes,8,opt,name=resource_bounds,json=resourceBounds,proto3" json:"resource_bounds,omitempty"` - // the tip for the transaction - Tip []byte `protobuf:"bytes,9,opt,name=tip,proto3" json:"tip,omitempty"` - // data needed to allow the paymaster to pay for the transaction in native tokens - PaymasterData [][]byte `protobuf:"bytes,10,rep,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` - // data needed to deploy the account contract from which this tx will be initiated - AccountDeploymentData [][]byte `protobuf:"bytes,11,rep,name=account_deployment_data,json=accountDeploymentData,proto3" json:"account_deployment_data,omitempty"` - // The storage domain of the account's nonce (an account has a nonce per DA mode) - NonceDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,12,opt,name=nonce_data_availability_mode,json=nonceDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"nonce_data_availability_mode,omitempty"` - // The storage domain of the account's balance from which fee will be charged - FeeDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,13,opt,name=fee_data_availability_mode,json=feeDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"fee_data_availability_mode,omitempty"` -} - -func (x *DeclareTransactionV3) Reset() { - *x = DeclareTransactionV3{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeclareTransactionV3) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeclareTransactionV3) ProtoMessage() {} - -func (x *DeclareTransactionV3) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[14] - 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 DeclareTransactionV3.ProtoReflect.Descriptor instead. -func (*DeclareTransactionV3) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{14} -} - -func (x *DeclareTransactionV3) GetSenderAddress() []byte { - if x != nil { - return x.SenderAddress - } - return nil -} - -func (x *DeclareTransactionV3) GetCompiledClassHash() []byte { - if x != nil { - return x.CompiledClassHash - } - return nil -} - -func (x *DeclareTransactionV3) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *DeclareTransactionV3) GetSignature() [][]byte { - if x != nil { - return x.Signature - } - return nil -} - -func (x *DeclareTransactionV3) GetNonce() []byte { - if x != nil { - return x.Nonce - } - return nil -} - -func (x *DeclareTransactionV3) GetClassHash() []byte { - if x != nil { - return x.ClassHash - } - return nil -} - -func (x *DeclareTransactionV3) GetResourceBounds() *ResourceBounds { - if x != nil { - return x.ResourceBounds - } - return nil -} - -func (x *DeclareTransactionV3) GetTip() []byte { - if x != nil { - return x.Tip - } - return nil -} - -func (x *DeclareTransactionV3) GetPaymasterData() [][]byte { - if x != nil { - return x.PaymasterData - } - return nil -} - -func (x *DeclareTransactionV3) GetAccountDeploymentData() [][]byte { - if x != nil { - return x.AccountDeploymentData - } - return nil -} - -func (x *DeclareTransactionV3) GetNonceDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { - if x != nil { - return x.NonceDataAvailabilityMode - } - return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN -} - -func (x *DeclareTransactionV3) GetFeeDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { - if x != nil { - return x.FeeDataAvailabilityMode - } - return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN -} - -// deploys a new account contract -type DeployTransactionV0 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The hash of the deployed contract's class - ClassHash []byte `protobuf:"bytes,1,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` - // Version of the transaction scheme - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - // The salt for the address of the deployed contract - ContractAddressSalt []byte `protobuf:"bytes,3,opt,name=contract_address_salt,json=contractAddressSalt,proto3" json:"contract_address_salt,omitempty"` - // The parameters passed to the constructor - ConstructorCalldata [][]byte `protobuf:"bytes,4,rep,name=constructor_calldata,json=constructorCalldata,proto3" json:"constructor_calldata,omitempty"` -} - -func (x *DeployTransactionV0) Reset() { - *x = DeployTransactionV0{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeployTransactionV0) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeployTransactionV0) ProtoMessage() {} - -func (x *DeployTransactionV0) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[15] - 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 DeployTransactionV0.ProtoReflect.Descriptor instead. -func (*DeployTransactionV0) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{15} -} - -func (x *DeployTransactionV0) GetClassHash() []byte { - if x != nil { - return x.ClassHash - } - return nil -} - -func (x *DeployTransactionV0) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *DeployTransactionV0) GetContractAddressSalt() []byte { - if x != nil { - return x.ContractAddressSalt - } - return nil -} - -func (x *DeployTransactionV0) GetConstructorCalldata() [][]byte { - if x != nil { - return x.ConstructorCalldata - } - return nil -} - -// Deploys an account contract, charges fee from the pre-funded account addresses -type DeployAccountTransactionV1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The maximal fee that can be charged for including the transaction - MaxFee []byte `protobuf:"bytes,1,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` - // Version of the transaction scheme - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Signature [][]byte `protobuf:"bytes,3,rep,name=signature,proto3" json:"signature,omitempty"` - Nonce []byte `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` - // The hash of the deployed contract's class - ClassHash []byte `protobuf:"bytes,5,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` - // The salt for the address of the deployed contract - ContractAddressSalt []byte `protobuf:"bytes,6,opt,name=contract_address_salt,json=contractAddressSalt,proto3" json:"contract_address_salt,omitempty"` - // The parameters passed to the constructor - ConstructorCalldata [][]byte `protobuf:"bytes,7,rep,name=constructor_calldata,json=constructorCalldata,proto3" json:"constructor_calldata,omitempty"` -} - -func (x *DeployAccountTransactionV1) Reset() { - *x = DeployAccountTransactionV1{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeployAccountTransactionV1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeployAccountTransactionV1) ProtoMessage() {} - -func (x *DeployAccountTransactionV1) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[16] - 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 DeployAccountTransactionV1.ProtoReflect.Descriptor instead. -func (*DeployAccountTransactionV1) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{16} -} - -func (x *DeployAccountTransactionV1) GetMaxFee() []byte { - if x != nil { - return x.MaxFee - } - return nil -} - -func (x *DeployAccountTransactionV1) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *DeployAccountTransactionV1) GetSignature() [][]byte { - if x != nil { - return x.Signature - } - return nil -} - -func (x *DeployAccountTransactionV1) GetNonce() []byte { - if x != nil { - return x.Nonce - } - return nil -} - -func (x *DeployAccountTransactionV1) GetClassHash() []byte { - if x != nil { - return x.ClassHash - } - return nil -} - -func (x *DeployAccountTransactionV1) GetContractAddressSalt() []byte { - if x != nil { - return x.ContractAddressSalt - } - return nil -} - -func (x *DeployAccountTransactionV1) GetConstructorCalldata() [][]byte { - if x != nil { - return x.ConstructorCalldata - } - return nil -} - -// Deploys an account contract, charges fee from the pre-funded account addresses -type DeployAccountTransactionV3 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Version of the transaction scheme - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - Signature [][]byte `protobuf:"bytes,2,rep,name=signature,proto3" json:"signature,omitempty"` - Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"` - // The salt for the address of the deployed contract - ContractAddressSalt []byte `protobuf:"bytes,4,opt,name=contract_address_salt,json=contractAddressSalt,proto3" json:"contract_address_salt,omitempty"` - // The parameters passed to the constructor - ConstructorCalldata [][]byte `protobuf:"bytes,5,rep,name=constructor_calldata,json=constructorCalldata,proto3" json:"constructor_calldata,omitempty"` - // The hash of the deployed contract's class - ClassHash []byte `protobuf:"bytes,6,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` - // resource bounds for the transaction execution - ResourceBounds *ResourceBounds `protobuf:"bytes,7,opt,name=resource_bounds,json=resourceBounds,proto3" json:"resource_bounds,omitempty"` - // the tip for the transaction - Tip []byte `protobuf:"bytes,8,opt,name=tip,proto3" json:"tip,omitempty"` - // data needed to allow the paymaster to pay for the transaction in native tokens - PaymasterData [][]byte `protobuf:"bytes,9,rep,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` - // The storage domain of the account's nonce (an account has a nonce per DA mode) - NonceDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,11,opt,name=nonce_data_availability_mode,json=nonceDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"nonce_data_availability_mode,omitempty"` - // The storage domain of the account's balance from which fee will be charged - FeeDataAvailabilityMode FEE_DATA_AVAILABILITY_MODE `protobuf:"varint,12,opt,name=fee_data_availability_mode,json=feeDataAvailabilityMode,proto3,enum=sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE" json:"fee_data_availability_mode,omitempty"` -} - -func (x *DeployAccountTransactionV3) Reset() { - *x = DeployAccountTransactionV3{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeployAccountTransactionV3) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeployAccountTransactionV3) ProtoMessage() {} - -func (x *DeployAccountTransactionV3) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[17] - 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 DeployAccountTransactionV3.ProtoReflect.Descriptor instead. -func (*DeployAccountTransactionV3) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{17} -} - -func (x *DeployAccountTransactionV3) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *DeployAccountTransactionV3) GetSignature() [][]byte { - if x != nil { - return x.Signature - } - return nil -} - -func (x *DeployAccountTransactionV3) GetNonce() []byte { - if x != nil { - return x.Nonce - } - return nil -} - -func (x *DeployAccountTransactionV3) GetContractAddressSalt() []byte { - if x != nil { - return x.ContractAddressSalt - } - return nil -} - -func (x *DeployAccountTransactionV3) GetConstructorCalldata() [][]byte { - if x != nil { - return x.ConstructorCalldata - } - return nil -} - -func (x *DeployAccountTransactionV3) GetClassHash() []byte { - if x != nil { - return x.ClassHash - } - return nil -} - -func (x *DeployAccountTransactionV3) GetResourceBounds() *ResourceBounds { - if x != nil { - return x.ResourceBounds - } - return nil -} - -func (x *DeployAccountTransactionV3) GetTip() []byte { - if x != nil { - return x.Tip - } - return nil -} - -func (x *DeployAccountTransactionV3) GetPaymasterData() [][]byte { - if x != nil { - return x.PaymasterData - } - return nil -} - -func (x *DeployAccountTransactionV3) GetNonceDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { - if x != nil { - return x.NonceDataAvailabilityMode - } - return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN -} - -func (x *DeployAccountTransactionV3) GetFeeDataAvailabilityMode() FEE_DATA_AVAILABILITY_MODE { - if x != nil { - return x.FeeDataAvailabilityMode - } - return FEE_DATA_AVAILABILITY_MODE_FEE_DATA_AVAILABILITY_MODE_UNKNOWN -} - -type ResourceBounds struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The max amount and max price per unit of L1 gas used in this tx - L1Gas *Resource `protobuf:"bytes,1,opt,name=l1_gas,json=l1Gas,proto3" json:"l1_gas,omitempty"` - // The max amount and max price per unit of L2 gas used in this tx - L2Gas *Resource `protobuf:"bytes,2,opt,name=l2_gas,json=l2Gas,proto3" json:"l2_gas,omitempty"` -} - -func (x *ResourceBounds) Reset() { - *x = ResourceBounds{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceBounds) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceBounds) ProtoMessage() {} - -func (x *ResourceBounds) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[18] - 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 ResourceBounds.ProtoReflect.Descriptor instead. -func (*ResourceBounds) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{18} -} - -func (x *ResourceBounds) GetL1Gas() *Resource { - if x != nil { - return x.L1Gas - } - return nil -} - -func (x *ResourceBounds) GetL2Gas() *Resource { - if x != nil { - return x.L2Gas - } - return nil -} - -type Resource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // the max amount of the resource that can be used in the tx - MaxAmount string `protobuf:"bytes,1,opt,name=max_amount,json=maxAmount,proto3" json:"max_amount,omitempty"` - // the max price per unit of this resource for this tx - MaxPricePerUnit string `protobuf:"bytes,2,opt,name=max_price_per_unit,json=maxPricePerUnit,proto3" json:"max_price_per_unit,omitempty"` -} - -func (x *Resource) Reset() { - *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Resource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Resource) ProtoMessage() {} - -func (x *Resource) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[19] - 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 Resource.ProtoReflect.Descriptor instead. -func (*Resource) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{19} -} - -func (x *Resource) GetMaxAmount() string { - if x != nil { - return x.MaxAmount - } - return "" -} - -func (x *Resource) GetMaxPricePerUnit() string { - if x != nil { - return x.MaxPricePerUnit - } - return "" -} - -type Receipt struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The fee that was charged by the sequencer - ActualFee *ActualFee `protobuf:"bytes,1,opt,name=actual_fee,json=actualFee,proto3" json:"actual_fee,omitempty"` -} - -func (x *Receipt) Reset() { - *x = Receipt{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Receipt) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Receipt) ProtoMessage() {} - -func (x *Receipt) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[20] - 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 Receipt.ProtoReflect.Descriptor instead. -func (*Receipt) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{20} -} - -func (x *Receipt) GetActualFee() *ActualFee { - if x != nil { - return x.ActualFee - } - return nil -} - -type ActualFee struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // amount paid - Amount []byte `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` - // units in which the fee is given - Unit string `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"` -} - -func (x *ActualFee) Reset() { - *x = ActualFee{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ActualFee) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActualFee) ProtoMessage() {} - -func (x *ActualFee) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[21] - 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 ActualFee.ProtoReflect.Descriptor instead. -func (*ActualFee) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{21} -} - -func (x *ActualFee) GetAmount() []byte { - if x != nil { - return x.Amount - } - return nil -} - -func (x *ActualFee) GetUnit() string { - if x != nil { - return x.Unit - } - return "" -} - -type DataAvailability struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // the data gas consumed by this transaction's data, 0 if it uses gas for DA - L1Gas uint64 `protobuf:"varint,1,opt,name=l1_gas,json=l1Gas,proto3" json:"l1_gas,omitempty"` - // the gas consumed by this transaction's data, 0 if it uses data gas for DA - L1DataGas uint64 `protobuf:"varint,2,opt,name=l1_data_gas,json=l1DataGas,proto3" json:"l1_data_gas,omitempty"` -} - -func (x *DataAvailability) Reset() { - *x = DataAvailability{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DataAvailability) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DataAvailability) ProtoMessage() {} - -func (x *DataAvailability) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[22] - 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 DataAvailability.ProtoReflect.Descriptor instead. -func (*DataAvailability) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{22} -} - -func (x *DataAvailability) GetL1Gas() uint64 { - if x != nil { - return x.L1Gas - } - return 0 -} - -func (x *DataAvailability) GetL1DataGas() uint64 { - if x != nil { - return x.L1DataGas - } - return 0 -} - -// State update -type StateUpdate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The new global state root - NewRoot []byte `protobuf:"bytes,2,opt,name=new_root,json=newRoot,proto3" json:"new_root,omitempty"` - // The previous global state root - OldRoot []byte `protobuf:"bytes,1,opt,name=old_root,json=oldRoot,proto3" json:"old_root,omitempty"` - // The change in state applied in this block, given as a mapping of addresses to the new values and/or new contracts - StateDiff *StateDiff `protobuf:"bytes,3,opt,name=state_diff,json=stateDiff,proto3" json:"state_diff,omitempty"` -} - -func (x *StateUpdate) Reset() { - *x = StateUpdate{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StateUpdate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StateUpdate) ProtoMessage() {} - -func (x *StateUpdate) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[23] - 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 StateUpdate.ProtoReflect.Descriptor instead. -func (*StateUpdate) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{23} -} - -func (x *StateUpdate) GetNewRoot() []byte { - if x != nil { - return x.NewRoot - } - return nil -} - -func (x *StateUpdate) GetOldRoot() []byte { - if x != nil { - return x.OldRoot - } - return nil -} - -func (x *StateUpdate) GetStateDiff() *StateDiff { - if x != nil { - return x.StateDiff - } - return nil -} - -// The change in state applied in this block, given as a mapping of addresses to the new values and/or new contracts -type StateDiff struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The changes in the storage per contract address - StorageDiffs []*ContractStorageDiff `protobuf:"bytes,1,rep,name=storage_diffs,json=storageDiffs,proto3" json:"storage_diffs,omitempty"` - // The hash of the declared class - DeprecatedDeclaredClasses [][]byte `protobuf:"bytes,2,rep,name=deprecated_declared_classes,json=deprecatedDeclaredClasses,proto3" json:"deprecated_declared_classes,omitempty"` - // The declared class hash and compiled class hash - DeclaredClasses []*DeclaredClass `protobuf:"bytes,3,rep,name=declared_classes,json=declaredClasses,proto3" json:"declared_classes,omitempty"` - // A new contract deployed as part of the state update - DeployedContracts []*DeployedContract `protobuf:"bytes,4,rep,name=deployed_contracts,json=deployedContracts,proto3" json:"deployed_contracts,omitempty"` - // The list of contracts whose class was replaced - ReplacedClasses []*ReplacedClass `protobuf:"bytes,5,rep,name=replaced_classes,json=replacedClasses,proto3" json:"replaced_classes,omitempty"` - // The updated nonce per contract address - Nonces []*NonceDiff `protobuf:"bytes,6,rep,name=nonces,proto3" json:"nonces,omitempty"` //Do we need this? -} - -func (x *StateDiff) Reset() { - *x = StateDiff{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StateDiff) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StateDiff) ProtoMessage() {} - -func (x *StateDiff) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[24] - 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 StateDiff.ProtoReflect.Descriptor instead. -func (*StateDiff) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{24} -} - -func (x *StateDiff) GetStorageDiffs() []*ContractStorageDiff { - if x != nil { - return x.StorageDiffs - } - return nil -} - -func (x *StateDiff) GetDeprecatedDeclaredClasses() [][]byte { - if x != nil { - return x.DeprecatedDeclaredClasses - } - return nil -} - -func (x *StateDiff) GetDeclaredClasses() []*DeclaredClass { - if x != nil { - return x.DeclaredClasses - } - return nil -} - -func (x *StateDiff) GetDeployedContracts() []*DeployedContract { - if x != nil { - return x.DeployedContracts - } - return nil -} - -func (x *StateDiff) GetReplacedClasses() []*ReplacedClass { - if x != nil { - return x.ReplacedClasses - } - return nil -} - -func (x *StateDiff) GetNonces() []*NonceDiff { - if x != nil { - return x.Nonces - } - return nil -} - -type NonceDiff struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // "The address of the contract - ContractAddress []byte `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` - // The nonce for the given address at the end of the block - Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` -} - -func (x *NonceDiff) Reset() { - *x = NonceDiff{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NonceDiff) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NonceDiff) ProtoMessage() {} - -func (x *NonceDiff) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[25] - 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 NonceDiff.ProtoReflect.Descriptor instead. -func (*NonceDiff) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{25} -} - -func (x *NonceDiff) GetContractAddress() []byte { - if x != nil { - return x.ContractAddress - } - return nil -} - -func (x *NonceDiff) GetNonce() []byte { - if x != nil { - return x.Nonce - } - return nil -} - -type ReplacedClass struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the contract whose class was replaced - ContractAddress []byte `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` - // The new class hash - ClassHash []byte `protobuf:"bytes,2,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` -} - -func (x *ReplacedClass) Reset() { - *x = ReplacedClass{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ReplacedClass) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReplacedClass) ProtoMessage() {} - -func (x *ReplacedClass) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[26] - 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 ReplacedClass.ProtoReflect.Descriptor instead. -func (*ReplacedClass) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{26} -} - -func (x *ReplacedClass) GetContractAddress() []byte { - if x != nil { - return x.ContractAddress - } - return nil -} - -func (x *ReplacedClass) GetClassHash() []byte { - if x != nil { - return x.ClassHash - } - return nil -} - -type DeployedContract struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the contract - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // The hash of the contract code - ClassHash []byte `protobuf:"bytes,2,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` -} - -func (x *DeployedContract) Reset() { - *x = DeployedContract{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeployedContract) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeployedContract) ProtoMessage() {} - -func (x *DeployedContract) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[27] - 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 DeployedContract.ProtoReflect.Descriptor instead. -func (*DeployedContract) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{27} -} - -func (x *DeployedContract) GetAddress() []byte { - if x != nil { - return x.Address - } - return nil -} - -func (x *DeployedContract) GetClassHash() []byte { - if x != nil { - return x.ClassHash - } - return nil -} - -type DeclaredClass struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The hash of the declared class - ClassHash []byte `protobuf:"bytes,1,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` - // The Cairo assembly hash corresponding to the declared class - CompiledClassHash []byte `protobuf:"bytes,2,opt,name=compiled_class_hash,json=compiledClassHash,proto3" json:"compiled_class_hash,omitempty"` -} - -func (x *DeclaredClass) Reset() { - *x = DeclaredClass{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeclaredClass) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeclaredClass) ProtoMessage() {} - -func (x *DeclaredClass) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[28] - 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 DeclaredClass.ProtoReflect.Descriptor instead. -func (*DeclaredClass) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{28} -} - -func (x *DeclaredClass) GetClassHash() []byte { - if x != nil { - return x.ClassHash - } - return nil -} - -func (x *DeclaredClass) GetCompiledClassHash() []byte { - if x != nil { - return x.CompiledClassHash - } - return nil -} - -type ContractStorageDiff struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the contract - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // The changes in the storage of the contract - StorageEntries []*StorageEntries `protobuf:"bytes,2,rep,name=storage_entries,json=storageEntries,proto3" json:"storage_entries,omitempty"` -} - -func (x *ContractStorageDiff) Reset() { - *x = ContractStorageDiff{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ContractStorageDiff) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContractStorageDiff) ProtoMessage() {} - -func (x *ContractStorageDiff) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[29] - 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 ContractStorageDiff.ProtoReflect.Descriptor instead. -func (*ContractStorageDiff) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{29} -} - -func (x *ContractStorageDiff) GetAddress() []byte { - if x != nil { - return x.Address - } - return nil -} - -func (x *ContractStorageDiff) GetStorageEntries() []*StorageEntries { - if x != nil { - return x.StorageEntries - } - return nil -} - -type StorageEntries struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The key of the changed value - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // The new value applied to the given address - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *StorageEntries) Reset() { - *x = StorageEntries{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StorageEntries) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StorageEntries) ProtoMessage() {} - -func (x *StorageEntries) ProtoReflect() protoreflect.Message { - mi := &file_sf_starknet_type_v1_block_proto_msgTypes[30] - 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 StorageEntries.ProtoReflect.Descriptor instead. -func (*StorageEntries) Descriptor() ([]byte, []int) { - return file_sf_starknet_type_v1_block_proto_rawDescGZIP(), []int{30} -} - -func (x *StorageEntries) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *StorageEntries) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -var File_sf_starknet_type_v1_block_proto protoreflect.FileDescriptor - -var file_sf_starknet_type_v1_block_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x73, 0x66, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x13, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x04, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, - 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x52, 0x6f, 0x6f, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2b, 0x0a, - 0x11, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x44, 0x0a, 0x0c, 0x6c, 0x31, - 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x52, 0x0a, 0x6c, 0x31, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, - 0x12, 0x4d, 0x0a, 0x11, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x67, 0x61, 0x73, 0x5f, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x66, - 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, - 0x0e, 0x6c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, - 0x3d, 0x0a, 0x0a, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, - 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x31, 0x5f, 0x44, 0x41, 0x5f, - 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x08, 0x6c, 0x31, 0x44, 0x61, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x29, - 0x0a, 0x10, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, - 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x0c, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2b, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x0c, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, - 0x53, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, - 0x12, 0x20, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x72, 0x69, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x46, - 0x72, 0x69, 0x12, 0x20, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x5f, 0x77, - 0x65, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x63, 0x65, 0x49, - 0x6e, 0x57, 0x65, 0x69, 0x22, 0xc5, 0x09, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, - 0x5e, 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, - 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x48, 0x00, 0x52, 0x13, 0x69, 0x6e, 0x76, 0x6f, - 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x12, - 0x5e, 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, - 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x13, 0x69, 0x6e, 0x76, 0x6f, - 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, - 0x5e, 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, - 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x48, 0x00, 0x52, 0x13, 0x69, 0x6e, 0x76, 0x6f, - 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x12, - 0x61, 0x0a, 0x16, 0x6c, 0x31, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x29, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, 0x6c, 0x31, - 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x61, 0x0a, 0x16, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x30, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x48, 0x00, 0x52, - 0x14, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x12, 0x61, 0x0a, 0x16, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, - 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x31, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, - 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, - 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, - 0x48, 0x00, 0x52, 0x14, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, 0x61, 0x0a, 0x16, 0x64, 0x65, 0x63, 0x6c, - 0x61, 0x72, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x76, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, - 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x56, 0x32, 0x48, 0x00, 0x52, 0x14, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x12, 0x61, 0x0a, 0x16, 0x64, - 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x76, 0x33, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x66, - 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x48, 0x00, 0x52, 0x14, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, - 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x12, 0x5e, - 0x0a, 0x15, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x30, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x48, 0x00, 0x52, 0x13, 0x64, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x12, 0x74, - 0x0a, 0x1d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x31, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, - 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x1a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x56, 0x31, 0x12, 0x74, 0x0a, 0x1d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x76, 0x33, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x73, 0x66, - 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x48, 0x00, 0x52, 0x1a, - 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x12, 0x41, 0x0a, 0x07, 0x72, 0x65, - 0x63, 0x65, 0x69, 0x70, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x66, - 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, - 0x65, 0x69, 0x70, 0x74, 0x52, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x42, 0x0d, 0x0a, - 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd4, 0x04, 0x0a, - 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, - 0x69, 0x70, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x3d, - 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, - 0x65, 0x65, 0x52, 0x09, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x12, 0x50, 0x0a, - 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, - 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x58, - 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x52, 0x0f, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, - 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x46, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, - 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x66, 0x2e, 0x73, - 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x66, 0x2e, - 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x58, - 0x0a, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x66, - 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x52, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0x6a, 0x0a, 0x0c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x53, - 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 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, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, - 0x52, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, - 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, - 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, - 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x22, 0xa3, 0x05, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, - 0x65, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, - 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x6c, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x48, 0x6f, - 0x6c, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x20, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1d, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, - 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x1d, - 0x70, 0x65, 0x64, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, - 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x1b, 0x70, 0x65, 0x64, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x42, 0x75, 0x69, - 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x42, 0x0a, 0x1d, 0x70, 0x6f, 0x73, 0x65, 0x69, 0x64, 0x6f, 0x6e, 0x5f, 0x62, 0x75, 0x69, - 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1b, 0x70, 0x6f, 0x73, 0x65, 0x69, 0x64, 0x6f, - 0x6e, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x65, 0x63, 0x5f, 0x6f, 0x70, 0x5f, 0x62, 0x75, - 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x65, 0x63, 0x4f, 0x70, 0x42, 0x75, - 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x3c, 0x0a, 0x1a, 0x65, 0x63, 0x64, 0x73, 0x61, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, - 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x18, 0x65, 0x63, 0x64, 0x73, 0x61, 0x42, 0x75, 0x69, 0x6c, - 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x40, 0x0a, 0x1c, 0x62, 0x69, 0x74, 0x77, 0x69, 0x73, 0x65, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, - 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1a, 0x62, 0x69, 0x74, 0x77, 0x69, 0x73, 0x65, 0x42, 0x75, - 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x3e, 0x0a, 0x1b, 0x6b, 0x65, 0x63, 0x63, 0x61, 0x6b, 0x5f, 0x62, 0x75, 0x69, 0x6c, - 0x74, 0x69, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x6b, 0x65, 0x63, 0x63, 0x61, 0x6b, 0x42, 0x75, - 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x72, 0x65, - 0x6e, 0x61, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x13, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x42, 0x75, - 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x12, 0x52, 0x0a, 0x11, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, - 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x10, 0x64, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xdf, 0x01, 0x0a, 0x13, 0x49, 0x6e, - 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, - 0x30, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, - 0x14, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, - 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0c, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x22, 0xbf, 0x01, 0x0a, 0x13, - 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x56, 0x31, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x22, 0xc5, 0x04, - 0x0a, 0x13, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, - 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, - 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, - 0x75, 0x6e, 0x64, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, - 0x75, 0x6e, 0x64, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x03, 0x74, 0x69, 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, - 0x74, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, - 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, - 0x17, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x15, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x70, 0x0a, 0x1c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x64, - 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, - 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, - 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x19, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x6c, 0x0a, 0x1a, 0x66, 0x65, 0x65, 0x5f, 0x64, - 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, - 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, - 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x17, 0x66, 0x65, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x14, 0x4c, 0x31, 0x48, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x29, - 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, - 0x69, 0x6e, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x63, - 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x63, - 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x22, 0xad, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6c, - 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, - 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, - 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0xc3, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6c, - 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, - 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, - 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0xf3, 0x01, - 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, - 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, - 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x17, 0x0a, - 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, - 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, - 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, - 0x61, 0x73, 0x68, 0x22, 0xf9, 0x04, 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x33, 0x12, 0x25, 0x0a, 0x0e, - 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, - 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, - 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, - 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x66, 0x2e, 0x73, - 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x0e, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x10, - 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x69, 0x70, - 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, - 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x17, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x15, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x70, 0x0a, 0x1c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, - 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, - 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, - 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, - 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x19, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, - 0x65, 0x12, 0x6c, 0x0a, 0x1a, 0x66, 0x65, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, - 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, - 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, - 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, - 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x17, 0x66, 0x65, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, - 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x22, - 0xb5, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x30, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x61, 0x6c, 0x74, 0x12, 0x31, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0c, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x43, - 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x22, 0x89, 0x02, 0x0a, 0x1a, 0x44, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x32, 0x0a, 0x15, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x61, 0x6c, 0x74, - 0x12, 0x31, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x5f, - 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x13, - 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x64, - 0x61, 0x74, 0x61, 0x22, 0xd7, 0x04, 0x0a, 0x1a, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x56, 0x33, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x61, 0x6c, 0x74, 0x12, 0x31, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0c, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x43, - 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x4c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, - 0x75, 0x6e, 0x64, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, - 0x75, 0x6e, 0x64, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x03, 0x74, 0x69, 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, - 0x74, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, - 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x70, 0x0a, - 0x1c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, - 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, 0x44, 0x41, - 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, - 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x19, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, - 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, - 0x6c, 0x0a, 0x1a, 0x66, 0x65, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, - 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x45, 0x45, 0x5f, 0x44, 0x41, - 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, - 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x17, 0x66, 0x65, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x7c, 0x0a, - 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, - 0x34, 0x0a, 0x06, 0x6c, 0x31, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x05, - 0x6c, 0x31, 0x47, 0x61, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x6c, 0x32, 0x5f, 0x67, 0x61, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, - 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x05, 0x6c, 0x32, 0x47, 0x61, 0x73, 0x22, 0x56, 0x0a, 0x08, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x78, - 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, - 0x69, 0x63, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x63, 0x65, 0x50, 0x65, 0x72, 0x55, - 0x6e, 0x69, 0x74, 0x22, 0x48, 0x0a, 0x07, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x3d, - 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, - 0x65, 0x65, 0x52, 0x09, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x22, 0x37, 0x0a, - 0x09, 0x41, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x49, 0x0a, 0x10, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, - 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6c, 0x31, - 0x5f, 0x67, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x31, 0x47, 0x61, - 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x67, 0x61, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x47, 0x61, - 0x73, 0x22, 0x82, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x19, 0x0a, 0x08, - 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, - 0x6f, 0x6c, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x3d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x5f, 0x64, 0x69, 0x66, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x66, - 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x09, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x22, 0xc6, 0x03, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x44, 0x69, 0x66, 0x66, 0x12, 0x4d, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, - 0x64, 0x69, 0x66, 0x66, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x66, - 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x69, - 0x66, 0x66, 0x73, 0x12, 0x3e, 0x0a, 0x1b, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x19, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x5f, - 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x52, 0x0f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x65, 0x73, 0x12, 0x54, 0x0a, 0x12, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x11, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6c, - 0x61, 0x63, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, - 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, - 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, - 0x6e, 0x63, 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x22, - 0x4c, 0x0a, 0x09, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x44, 0x69, 0x66, 0x66, 0x12, 0x29, 0x0a, 0x10, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x59, 0x0a, - 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x29, - 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, - 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0x4b, 0x0a, 0x10, 0x44, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0x5e, 0x0a, 0x0d, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, - 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0x7d, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x69, 0x66, 0x66, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x52, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x22, 0x38, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x45, - 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0x3c, - 0x0a, 0x0a, 0x4c, 0x31, 0x5f, 0x44, 0x41, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x12, 0x16, 0x0a, 0x12, - 0x4c, 0x31, 0x5f, 0x44, 0x41, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4c, 0x4c, 0x44, 0x41, 0x54, 0x41, - 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4c, 0x4f, 0x42, 0x10, 0x02, 0x2a, 0x54, 0x0a, 0x1a, - 0x46, 0x45, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, - 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x12, 0x26, 0x0a, 0x22, 0x46, 0x45, - 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x49, 0x4c, - 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x31, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x32, - 0x10, 0x02, 0x2a, 0x79, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x12, 0x1c, 0x0a, 0x18, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, - 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x4e, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x01, - 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x43, 0x4c, 0x41, 0x52, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, - 0x06, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x50, - 0x4c, 0x4f, 0x59, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x04, 0x12, 0x0e, 0x0a, - 0x0a, 0x4c, 0x31, 0x5f, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x52, 0x10, 0x05, 0x2a, 0x6d, 0x0a, - 0x10, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x1c, 0x0a, 0x18, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, - 0x19, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x45, 0x44, 0x10, 0x02, 0x42, 0xfb, 0x01, 0x0a, - 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x65, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, - 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2d, 0x66, 0x6f, 0x75, 0x6e, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, - 0x70, 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x53, 0x53, 0x54, 0xaa, 0x02, 0x13, 0x53, 0x66, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, - 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x53, 0x66, 0x5c, 0x53, - 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x1f, 0x53, 0x66, 0x5c, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x5c, 0x54, 0x79, - 0x70, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x16, 0x53, 0x66, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, - 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_sf_starknet_type_v1_block_proto_rawDescOnce sync.Once - file_sf_starknet_type_v1_block_proto_rawDescData = file_sf_starknet_type_v1_block_proto_rawDesc -) - -func file_sf_starknet_type_v1_block_proto_rawDescGZIP() []byte { - file_sf_starknet_type_v1_block_proto_rawDescOnce.Do(func() { - file_sf_starknet_type_v1_block_proto_rawDescData = protoimpl.X.CompressGZIP(file_sf_starknet_type_v1_block_proto_rawDescData) - }) - return file_sf_starknet_type_v1_block_proto_rawDescData -} - -var file_sf_starknet_type_v1_block_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_sf_starknet_type_v1_block_proto_msgTypes = make([]protoimpl.MessageInfo, 31) -var file_sf_starknet_type_v1_block_proto_goTypes = []interface{}{ - (L1_DA_MODE)(0), // 0: sf.starknet.type.v1.L1_DA_MODE - (FEE_DATA_AVAILABILITY_MODE)(0), // 1: sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE - (TRANSACTION_TYPE)(0), // 2: sf.starknet.type.v1.TRANSACTION_TYPE - (EXECUTION_STATUS)(0), // 3: sf.starknet.type.v1.EXECUTION_STATUS - (*Block)(nil), // 4: sf.starknet.type.v1.Block - (*ResourcePrice)(nil), // 5: sf.starknet.type.v1.ResourcePrice - (*TransactionWithReceipt)(nil), // 6: sf.starknet.type.v1.TransactionWithReceipt - (*TransactionReceipt)(nil), // 7: sf.starknet.type.v1.TransactionReceipt - (*MessagesSent)(nil), // 8: sf.starknet.type.v1.MessagesSent - (*Event)(nil), // 9: sf.starknet.type.v1.Event - (*ExecutionResources)(nil), // 10: sf.starknet.type.v1.ExecutionResources - (*InvokeTransactionV0)(nil), // 11: sf.starknet.type.v1.InvokeTransactionV0 - (*InvokeTransactionV1)(nil), // 12: sf.starknet.type.v1.InvokeTransactionV1 - (*InvokeTransactionV3)(nil), // 13: sf.starknet.type.v1.InvokeTransactionV3 - (*L1HandlerTransaction)(nil), // 14: sf.starknet.type.v1.L1HandlerTransaction - (*DeclareTransactionV0)(nil), // 15: sf.starknet.type.v1.DeclareTransactionV0 - (*DeclareTransactionV1)(nil), // 16: sf.starknet.type.v1.DeclareTransactionV1 - (*DeclareTransactionV2)(nil), // 17: sf.starknet.type.v1.DeclareTransactionV2 - (*DeclareTransactionV3)(nil), // 18: sf.starknet.type.v1.DeclareTransactionV3 - (*DeployTransactionV0)(nil), // 19: sf.starknet.type.v1.DeployTransactionV0 - (*DeployAccountTransactionV1)(nil), // 20: sf.starknet.type.v1.DeployAccountTransactionV1 - (*DeployAccountTransactionV3)(nil), // 21: sf.starknet.type.v1.DeployAccountTransactionV3 - (*ResourceBounds)(nil), // 22: sf.starknet.type.v1.ResourceBounds - (*Resource)(nil), // 23: sf.starknet.type.v1.Resource - (*Receipt)(nil), // 24: sf.starknet.type.v1.Receipt - (*ActualFee)(nil), // 25: sf.starknet.type.v1.ActualFee - (*DataAvailability)(nil), // 26: sf.starknet.type.v1.DataAvailability - (*StateUpdate)(nil), // 27: sf.starknet.type.v1.StateUpdate - (*StateDiff)(nil), // 28: sf.starknet.type.v1.StateDiff - (*NonceDiff)(nil), // 29: sf.starknet.type.v1.NonceDiff - (*ReplacedClass)(nil), // 30: sf.starknet.type.v1.ReplacedClass - (*DeployedContract)(nil), // 31: sf.starknet.type.v1.DeployedContract - (*DeclaredClass)(nil), // 32: sf.starknet.type.v1.DeclaredClass - (*ContractStorageDiff)(nil), // 33: sf.starknet.type.v1.ContractStorageDiff - (*StorageEntries)(nil), // 34: sf.starknet.type.v1.StorageEntries -} -var file_sf_starknet_type_v1_block_proto_depIdxs = []int32{ - 5, // 0: sf.starknet.type.v1.Block.l1_gas_price:type_name -> sf.starknet.type.v1.ResourcePrice - 5, // 1: sf.starknet.type.v1.Block.l1_data_gas_price:type_name -> sf.starknet.type.v1.ResourcePrice - 0, // 2: sf.starknet.type.v1.Block.l1_da_mode:type_name -> sf.starknet.type.v1.L1_DA_MODE - 6, // 3: sf.starknet.type.v1.Block.transactions:type_name -> sf.starknet.type.v1.TransactionWithReceipt - 27, // 4: sf.starknet.type.v1.Block.state_update:type_name -> sf.starknet.type.v1.StateUpdate - 11, // 5: sf.starknet.type.v1.TransactionWithReceipt.invoke_transaction_v0:type_name -> sf.starknet.type.v1.InvokeTransactionV0 - 12, // 6: sf.starknet.type.v1.TransactionWithReceipt.invoke_transaction_v1:type_name -> sf.starknet.type.v1.InvokeTransactionV1 - 13, // 7: sf.starknet.type.v1.TransactionWithReceipt.invoke_transaction_v3:type_name -> sf.starknet.type.v1.InvokeTransactionV3 - 14, // 8: sf.starknet.type.v1.TransactionWithReceipt.l1_handler_transaction:type_name -> sf.starknet.type.v1.L1HandlerTransaction - 15, // 9: sf.starknet.type.v1.TransactionWithReceipt.declare_transaction_v0:type_name -> sf.starknet.type.v1.DeclareTransactionV0 - 16, // 10: sf.starknet.type.v1.TransactionWithReceipt.declare_transaction_v1:type_name -> sf.starknet.type.v1.DeclareTransactionV1 - 17, // 11: sf.starknet.type.v1.TransactionWithReceipt.declare_transaction_v2:type_name -> sf.starknet.type.v1.DeclareTransactionV2 - 18, // 12: sf.starknet.type.v1.TransactionWithReceipt.declare_transaction_v3:type_name -> sf.starknet.type.v1.DeclareTransactionV3 - 19, // 13: sf.starknet.type.v1.TransactionWithReceipt.deploy_transaction_v0:type_name -> sf.starknet.type.v1.DeployTransactionV0 - 20, // 14: sf.starknet.type.v1.TransactionWithReceipt.deploy_account_transaction_v1:type_name -> sf.starknet.type.v1.DeployAccountTransactionV1 - 21, // 15: sf.starknet.type.v1.TransactionWithReceipt.deploy_account_transaction_v3:type_name -> sf.starknet.type.v1.DeployAccountTransactionV3 - 7, // 16: sf.starknet.type.v1.TransactionWithReceipt.receipt:type_name -> sf.starknet.type.v1.TransactionReceipt - 25, // 17: sf.starknet.type.v1.TransactionReceipt.actual_fee:type_name -> sf.starknet.type.v1.ActualFee - 3, // 18: sf.starknet.type.v1.TransactionReceipt.execution_status:type_name -> sf.starknet.type.v1.EXECUTION_STATUS - 2, // 19: sf.starknet.type.v1.TransactionReceipt.type:type_name -> sf.starknet.type.v1.TRANSACTION_TYPE - 8, // 20: sf.starknet.type.v1.TransactionReceipt.messages_sent:type_name -> sf.starknet.type.v1.MessagesSent - 9, // 21: sf.starknet.type.v1.TransactionReceipt.events:type_name -> sf.starknet.type.v1.Event - 10, // 22: sf.starknet.type.v1.TransactionReceipt.execution_resources:type_name -> sf.starknet.type.v1.ExecutionResources - 26, // 23: sf.starknet.type.v1.ExecutionResources.data_availability:type_name -> sf.starknet.type.v1.DataAvailability - 22, // 24: sf.starknet.type.v1.InvokeTransactionV3.resource_bounds:type_name -> sf.starknet.type.v1.ResourceBounds - 1, // 25: sf.starknet.type.v1.InvokeTransactionV3.nonce_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE - 1, // 26: sf.starknet.type.v1.InvokeTransactionV3.fee_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE - 22, // 27: sf.starknet.type.v1.DeclareTransactionV3.resource_bounds:type_name -> sf.starknet.type.v1.ResourceBounds - 1, // 28: sf.starknet.type.v1.DeclareTransactionV3.nonce_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE - 1, // 29: sf.starknet.type.v1.DeclareTransactionV3.fee_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE - 22, // 30: sf.starknet.type.v1.DeployAccountTransactionV3.resource_bounds:type_name -> sf.starknet.type.v1.ResourceBounds - 1, // 31: sf.starknet.type.v1.DeployAccountTransactionV3.nonce_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE - 1, // 32: sf.starknet.type.v1.DeployAccountTransactionV3.fee_data_availability_mode:type_name -> sf.starknet.type.v1.FEE_DATA_AVAILABILITY_MODE - 23, // 33: sf.starknet.type.v1.ResourceBounds.l1_gas:type_name -> sf.starknet.type.v1.Resource - 23, // 34: sf.starknet.type.v1.ResourceBounds.l2_gas:type_name -> sf.starknet.type.v1.Resource - 25, // 35: sf.starknet.type.v1.Receipt.actual_fee:type_name -> sf.starknet.type.v1.ActualFee - 28, // 36: sf.starknet.type.v1.StateUpdate.state_diff:type_name -> sf.starknet.type.v1.StateDiff - 33, // 37: sf.starknet.type.v1.StateDiff.storage_diffs:type_name -> sf.starknet.type.v1.ContractStorageDiff - 32, // 38: sf.starknet.type.v1.StateDiff.declared_classes:type_name -> sf.starknet.type.v1.DeclaredClass - 31, // 39: sf.starknet.type.v1.StateDiff.deployed_contracts:type_name -> sf.starknet.type.v1.DeployedContract - 30, // 40: sf.starknet.type.v1.StateDiff.replaced_classes:type_name -> sf.starknet.type.v1.ReplacedClass - 29, // 41: sf.starknet.type.v1.StateDiff.nonces:type_name -> sf.starknet.type.v1.NonceDiff - 34, // 42: sf.starknet.type.v1.ContractStorageDiff.storage_entries:type_name -> sf.starknet.type.v1.StorageEntries - 43, // [43:43] is the sub-list for method output_type - 43, // [43:43] is the sub-list for method input_type - 43, // [43:43] is the sub-list for extension type_name - 43, // [43:43] is the sub-list for extension extendee - 0, // [0:43] is the sub-list for field type_name -} - -func init() { file_sf_starknet_type_v1_block_proto_init() } -func file_sf_starknet_type_v1_block_proto_init() { - if File_sf_starknet_type_v1_block_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_sf_starknet_type_v1_block_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Block); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourcePrice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransactionWithReceipt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransactionReceipt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessagesSent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecutionResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InvokeTransactionV0); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InvokeTransactionV1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InvokeTransactionV3); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*L1HandlerTransaction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeclareTransactionV0); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeclareTransactionV1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeclareTransactionV2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeclareTransactionV3); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployTransactionV0); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployAccountTransactionV1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployAccountTransactionV3); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceBounds); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Receipt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActualFee); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataAvailability); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateUpdate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateDiff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NonceDiff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReplacedClass); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployedContract); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeclaredClass); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContractStorageDiff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StorageEntries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_sf_starknet_type_v1_block_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*TransactionWithReceipt_InvokeTransactionV0)(nil), - (*TransactionWithReceipt_InvokeTransactionV1)(nil), - (*TransactionWithReceipt_InvokeTransactionV3)(nil), - (*TransactionWithReceipt_L1HandlerTransaction)(nil), - (*TransactionWithReceipt_DeclareTransactionV0)(nil), - (*TransactionWithReceipt_DeclareTransactionV1)(nil), - (*TransactionWithReceipt_DeclareTransactionV2)(nil), - (*TransactionWithReceipt_DeclareTransactionV3)(nil), - (*TransactionWithReceipt_DeployTransactionV0)(nil), - (*TransactionWithReceipt_DeployAccountTransactionV1)(nil), - (*TransactionWithReceipt_DeployAccountTransactionV3)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_sf_starknet_type_v1_block_proto_rawDesc, - NumEnums: 4, - NumMessages: 31, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_sf_starknet_type_v1_block_proto_goTypes, - DependencyIndexes: file_sf_starknet_type_v1_block_proto_depIdxs, - EnumInfos: file_sf_starknet_type_v1_block_proto_enumTypes, - MessageInfos: file_sf_starknet_type_v1_block_proto_msgTypes, - }.Build() - File_sf_starknet_type_v1_block_proto = out.File - file_sf_starknet_type_v1_block_proto_rawDesc = nil - file_sf_starknet_type_v1_block_proto_goTypes = nil - file_sf_starknet_type_v1_block_proto_depIdxs = nil -} diff --git a/starket-common/pb/sf/starknet/type/v1/block_vtproto.pb.go b/starket-common/pb/sf/starknet/type/v1/block_vtproto.pb.go deleted file mode 100644 index 62ea601..0000000 --- a/starket-common/pb/sf/starknet/type/v1/block_vtproto.pb.go +++ /dev/null @@ -1,22205 +0,0 @@ -// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.6.0 -// source: sf/starknet/type/v1/block.proto - -package typev1 - -import ( - fmt "fmt" - protohelpers "github.com/planetscale/vtprotobuf/protohelpers" - proto "google.golang.org/protobuf/proto" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - unsafe "unsafe" -) - -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) -) - -func (m *Block) CloneVT() *Block { - if m == nil { - return (*Block)(nil) - } - r := new(Block) - r.BlockNumber = m.BlockNumber - r.Timestamp = m.Timestamp - r.L1GasPrice = m.L1GasPrice.CloneVT() - r.L1DataGasPrice = m.L1DataGasPrice.CloneVT() - r.L1DaMode = m.L1DaMode - r.StarknetVersion = m.StarknetVersion - r.StateUpdate = m.StateUpdate.CloneVT() - if rhs := m.BlockHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.BlockHash = tmpBytes - } - if rhs := m.ParentHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ParentHash = tmpBytes - } - if rhs := m.NewRoot; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.NewRoot = tmpBytes - } - if rhs := m.SequencerAddress; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.SequencerAddress = tmpBytes - } - if rhs := m.Transactions; rhs != nil { - tmpContainer := make([]*TransactionWithReceipt, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Transactions = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Block) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *ResourcePrice) CloneVT() *ResourcePrice { - if m == nil { - return (*ResourcePrice)(nil) - } - r := new(ResourcePrice) - if rhs := m.PriceInFri; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.PriceInFri = tmpBytes - } - if rhs := m.PriceInWei; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.PriceInWei = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *ResourcePrice) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *TransactionWithReceipt) CloneVT() *TransactionWithReceipt { - if m == nil { - return (*TransactionWithReceipt)(nil) - } - r := new(TransactionWithReceipt) - r.Receipt = m.Receipt.CloneVT() - if m.Transaction != nil { - r.Transaction = m.Transaction.(interface { - CloneVT() isTransactionWithReceipt_Transaction - }).CloneVT() - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *TransactionWithReceipt) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *TransactionWithReceipt_InvokeTransactionV0) CloneVT() isTransactionWithReceipt_Transaction { - if m == nil { - return (*TransactionWithReceipt_InvokeTransactionV0)(nil) - } - r := new(TransactionWithReceipt_InvokeTransactionV0) - r.InvokeTransactionV0 = m.InvokeTransactionV0.CloneVT() - return r -} - -func (m *TransactionWithReceipt_InvokeTransactionV1) CloneVT() isTransactionWithReceipt_Transaction { - if m == nil { - return (*TransactionWithReceipt_InvokeTransactionV1)(nil) - } - r := new(TransactionWithReceipt_InvokeTransactionV1) - r.InvokeTransactionV1 = m.InvokeTransactionV1.CloneVT() - return r -} - -func (m *TransactionWithReceipt_InvokeTransactionV3) CloneVT() isTransactionWithReceipt_Transaction { - if m == nil { - return (*TransactionWithReceipt_InvokeTransactionV3)(nil) - } - r := new(TransactionWithReceipt_InvokeTransactionV3) - r.InvokeTransactionV3 = m.InvokeTransactionV3.CloneVT() - return r -} - -func (m *TransactionWithReceipt_L1HandlerTransaction) CloneVT() isTransactionWithReceipt_Transaction { - if m == nil { - return (*TransactionWithReceipt_L1HandlerTransaction)(nil) - } - r := new(TransactionWithReceipt_L1HandlerTransaction) - r.L1HandlerTransaction = m.L1HandlerTransaction.CloneVT() - return r -} - -func (m *TransactionWithReceipt_DeclareTransactionV0) CloneVT() isTransactionWithReceipt_Transaction { - if m == nil { - return (*TransactionWithReceipt_DeclareTransactionV0)(nil) - } - r := new(TransactionWithReceipt_DeclareTransactionV0) - r.DeclareTransactionV0 = m.DeclareTransactionV0.CloneVT() - return r -} - -func (m *TransactionWithReceipt_DeclareTransactionV1) CloneVT() isTransactionWithReceipt_Transaction { - if m == nil { - return (*TransactionWithReceipt_DeclareTransactionV1)(nil) - } - r := new(TransactionWithReceipt_DeclareTransactionV1) - r.DeclareTransactionV1 = m.DeclareTransactionV1.CloneVT() - return r -} - -func (m *TransactionWithReceipt_DeclareTransactionV2) CloneVT() isTransactionWithReceipt_Transaction { - if m == nil { - return (*TransactionWithReceipt_DeclareTransactionV2)(nil) - } - r := new(TransactionWithReceipt_DeclareTransactionV2) - r.DeclareTransactionV2 = m.DeclareTransactionV2.CloneVT() - return r -} - -func (m *TransactionWithReceipt_DeclareTransactionV3) CloneVT() isTransactionWithReceipt_Transaction { - if m == nil { - return (*TransactionWithReceipt_DeclareTransactionV3)(nil) - } - r := new(TransactionWithReceipt_DeclareTransactionV3) - r.DeclareTransactionV3 = m.DeclareTransactionV3.CloneVT() - return r -} - -func (m *TransactionWithReceipt_DeployTransactionV0) CloneVT() isTransactionWithReceipt_Transaction { - if m == nil { - return (*TransactionWithReceipt_DeployTransactionV0)(nil) - } - r := new(TransactionWithReceipt_DeployTransactionV0) - r.DeployTransactionV0 = m.DeployTransactionV0.CloneVT() - return r -} - -func (m *TransactionWithReceipt_DeployAccountTransactionV1) CloneVT() isTransactionWithReceipt_Transaction { - if m == nil { - return (*TransactionWithReceipt_DeployAccountTransactionV1)(nil) - } - r := new(TransactionWithReceipt_DeployAccountTransactionV1) - r.DeployAccountTransactionV1 = m.DeployAccountTransactionV1.CloneVT() - return r -} - -func (m *TransactionWithReceipt_DeployAccountTransactionV3) CloneVT() isTransactionWithReceipt_Transaction { - if m == nil { - return (*TransactionWithReceipt_DeployAccountTransactionV3)(nil) - } - r := new(TransactionWithReceipt_DeployAccountTransactionV3) - r.DeployAccountTransactionV3 = m.DeployAccountTransactionV3.CloneVT() - return r -} - -func (m *TransactionReceipt) CloneVT() *TransactionReceipt { - if m == nil { - return (*TransactionReceipt)(nil) - } - r := new(TransactionReceipt) - r.ActualFee = m.ActualFee.CloneVT() - r.ExecutionStatus = m.ExecutionStatus - r.RevertReason = m.RevertReason - r.Type = m.Type - r.MessageHash = m.MessageHash - r.ExecutionResources = m.ExecutionResources.CloneVT() - if rhs := m.TransactionHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.TransactionHash = tmpBytes - } - if rhs := m.MessagesSent; rhs != nil { - tmpContainer := make([]*MessagesSent, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.MessagesSent = tmpContainer - } - if rhs := m.Events; rhs != nil { - tmpContainer := make([]*Event, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Events = tmpContainer - } - if rhs := m.ContractAddress; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ContractAddress = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *TransactionReceipt) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *MessagesSent) CloneVT() *MessagesSent { - if m == nil { - return (*MessagesSent)(nil) - } - r := new(MessagesSent) - if rhs := m.FromAddress; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.FromAddress = tmpBytes - } - if rhs := m.ToAddress; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ToAddress = tmpBytes - } - if rhs := m.Payload; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Payload = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *MessagesSent) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Event) CloneVT() *Event { - if m == nil { - return (*Event)(nil) - } - r := new(Event) - if rhs := m.FromAddress; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.FromAddress = tmpBytes - } - if rhs := m.Keys; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Keys = tmpContainer - } - if rhs := m.Data; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Data = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Event) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *ExecutionResources) CloneVT() *ExecutionResources { - if m == nil { - return (*ExecutionResources)(nil) - } - r := new(ExecutionResources) - r.Steps = m.Steps - r.MemoryHoles = m.MemoryHoles - r.RangeCheckBuiltinApplications = m.RangeCheckBuiltinApplications - r.PedersenBuiltinApplications = m.PedersenBuiltinApplications - r.PoseidonBuiltinApplications = m.PoseidonBuiltinApplications - r.EcOpBuiltinApplications = m.EcOpBuiltinApplications - r.EcdsaBuiltinApplications = m.EcdsaBuiltinApplications - r.BitwiseBuiltinApplications = m.BitwiseBuiltinApplications - r.KeccakBuiltinApplications = m.KeccakBuiltinApplications - r.SegmentArenaBuiltin = m.SegmentArenaBuiltin - r.DataAvailability = m.DataAvailability.CloneVT() - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *ExecutionResources) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *InvokeTransactionV0) CloneVT() *InvokeTransactionV0 { - if m == nil { - return (*InvokeTransactionV0)(nil) - } - r := new(InvokeTransactionV0) - r.Version = m.Version - if rhs := m.MaxFee; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.MaxFee = tmpBytes - } - if rhs := m.Signature; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Signature = tmpContainer - } - if rhs := m.ContractAddress; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ContractAddress = tmpBytes - } - if rhs := m.EntryPointSelector; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.EntryPointSelector = tmpBytes - } - if rhs := m.Calldata; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Calldata = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *InvokeTransactionV0) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *InvokeTransactionV1) CloneVT() *InvokeTransactionV1 { - if m == nil { - return (*InvokeTransactionV1)(nil) - } - r := new(InvokeTransactionV1) - r.Version = m.Version - if rhs := m.MaxFee; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.MaxFee = tmpBytes - } - if rhs := m.Signature; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Signature = tmpContainer - } - if rhs := m.Nonce; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Nonce = tmpBytes - } - if rhs := m.SenderAddress; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.SenderAddress = tmpBytes - } - if rhs := m.Calldata; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Calldata = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *InvokeTransactionV1) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *InvokeTransactionV3) CloneVT() *InvokeTransactionV3 { - if m == nil { - return (*InvokeTransactionV3)(nil) - } - r := new(InvokeTransactionV3) - r.Version = m.Version - r.ResourceBounds = m.ResourceBounds.CloneVT() - r.NonceDataAvailabilityMode = m.NonceDataAvailabilityMode - r.FeeDataAvailabilityMode = m.FeeDataAvailabilityMode - if rhs := m.SenderAddress; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.SenderAddress = tmpBytes - } - if rhs := m.Calldata; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Calldata = tmpContainer - } - if rhs := m.Signature; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Signature = tmpContainer - } - if rhs := m.Nonce; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Nonce = tmpBytes - } - if rhs := m.Tip; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Tip = tmpBytes - } - if rhs := m.PaymasterData; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.PaymasterData = tmpContainer - } - if rhs := m.AccountDeploymentData; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.AccountDeploymentData = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *InvokeTransactionV3) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *L1HandlerTransaction) CloneVT() *L1HandlerTransaction { - if m == nil { - return (*L1HandlerTransaction)(nil) - } - r := new(L1HandlerTransaction) - r.Version = m.Version - r.Nonce = m.Nonce - if rhs := m.ContractAddress; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ContractAddress = tmpBytes - } - if rhs := m.EntryPointSelector; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.EntryPointSelector = tmpBytes - } - if rhs := m.Calldata; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Calldata = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *L1HandlerTransaction) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *DeclareTransactionV0) CloneVT() *DeclareTransactionV0 { - if m == nil { - return (*DeclareTransactionV0)(nil) - } - r := new(DeclareTransactionV0) - r.Version = m.Version - if rhs := m.SenderAddress; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.SenderAddress = tmpBytes - } - if rhs := m.MaxFee; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.MaxFee = tmpBytes - } - if rhs := m.Signature; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Signature = tmpContainer - } - if rhs := m.ClassHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ClassHash = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *DeclareTransactionV0) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *DeclareTransactionV1) CloneVT() *DeclareTransactionV1 { - if m == nil { - return (*DeclareTransactionV1)(nil) - } - r := new(DeclareTransactionV1) - r.Version = m.Version - if rhs := m.SenderAddress; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.SenderAddress = tmpBytes - } - if rhs := m.MaxFee; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.MaxFee = tmpBytes - } - if rhs := m.Signature; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Signature = tmpContainer - } - if rhs := m.Nonce; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Nonce = tmpBytes - } - if rhs := m.ClassHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ClassHash = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *DeclareTransactionV1) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *DeclareTransactionV2) CloneVT() *DeclareTransactionV2 { - if m == nil { - return (*DeclareTransactionV2)(nil) - } - r := new(DeclareTransactionV2) - r.Version = m.Version - if rhs := m.SenderAddress; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.SenderAddress = tmpBytes - } - if rhs := m.CompiledClassHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.CompiledClassHash = tmpBytes - } - if rhs := m.MaxFee; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.MaxFee = tmpBytes - } - if rhs := m.Signature; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Signature = tmpContainer - } - if rhs := m.Nonce; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Nonce = tmpBytes - } - if rhs := m.ClassHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ClassHash = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *DeclareTransactionV2) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *DeclareTransactionV3) CloneVT() *DeclareTransactionV3 { - if m == nil { - return (*DeclareTransactionV3)(nil) - } - r := new(DeclareTransactionV3) - r.Version = m.Version - r.ResourceBounds = m.ResourceBounds.CloneVT() - r.NonceDataAvailabilityMode = m.NonceDataAvailabilityMode - r.FeeDataAvailabilityMode = m.FeeDataAvailabilityMode - if rhs := m.SenderAddress; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.SenderAddress = tmpBytes - } - if rhs := m.CompiledClassHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.CompiledClassHash = tmpBytes - } - if rhs := m.Signature; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Signature = tmpContainer - } - if rhs := m.Nonce; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Nonce = tmpBytes - } - if rhs := m.ClassHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ClassHash = tmpBytes - } - if rhs := m.Tip; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Tip = tmpBytes - } - if rhs := m.PaymasterData; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.PaymasterData = tmpContainer - } - if rhs := m.AccountDeploymentData; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.AccountDeploymentData = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *DeclareTransactionV3) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *DeployTransactionV0) CloneVT() *DeployTransactionV0 { - if m == nil { - return (*DeployTransactionV0)(nil) - } - r := new(DeployTransactionV0) - r.Version = m.Version - if rhs := m.ClassHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ClassHash = tmpBytes - } - if rhs := m.ContractAddressSalt; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ContractAddressSalt = tmpBytes - } - if rhs := m.ConstructorCalldata; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.ConstructorCalldata = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *DeployTransactionV0) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *DeployAccountTransactionV1) CloneVT() *DeployAccountTransactionV1 { - if m == nil { - return (*DeployAccountTransactionV1)(nil) - } - r := new(DeployAccountTransactionV1) - r.Version = m.Version - if rhs := m.MaxFee; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.MaxFee = tmpBytes - } - if rhs := m.Signature; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Signature = tmpContainer - } - if rhs := m.Nonce; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Nonce = tmpBytes - } - if rhs := m.ClassHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ClassHash = tmpBytes - } - if rhs := m.ContractAddressSalt; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ContractAddressSalt = tmpBytes - } - if rhs := m.ConstructorCalldata; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.ConstructorCalldata = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *DeployAccountTransactionV1) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *DeployAccountTransactionV3) CloneVT() *DeployAccountTransactionV3 { - if m == nil { - return (*DeployAccountTransactionV3)(nil) - } - r := new(DeployAccountTransactionV3) - r.Version = m.Version - r.ResourceBounds = m.ResourceBounds.CloneVT() - r.NonceDataAvailabilityMode = m.NonceDataAvailabilityMode - r.FeeDataAvailabilityMode = m.FeeDataAvailabilityMode - if rhs := m.Signature; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.Signature = tmpContainer - } - if rhs := m.Nonce; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Nonce = tmpBytes - } - if rhs := m.ContractAddressSalt; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ContractAddressSalt = tmpBytes - } - if rhs := m.ConstructorCalldata; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.ConstructorCalldata = tmpContainer - } - if rhs := m.ClassHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ClassHash = tmpBytes - } - if rhs := m.Tip; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Tip = tmpBytes - } - if rhs := m.PaymasterData; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.PaymasterData = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *DeployAccountTransactionV3) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *ResourceBounds) CloneVT() *ResourceBounds { - if m == nil { - return (*ResourceBounds)(nil) - } - r := new(ResourceBounds) - r.L1Gas = m.L1Gas.CloneVT() - r.L2Gas = m.L2Gas.CloneVT() - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *ResourceBounds) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Resource) CloneVT() *Resource { - if m == nil { - return (*Resource)(nil) - } - r := new(Resource) - r.MaxAmount = m.MaxAmount - r.MaxPricePerUnit = m.MaxPricePerUnit - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Resource) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Receipt) CloneVT() *Receipt { - if m == nil { - return (*Receipt)(nil) - } - r := new(Receipt) - r.ActualFee = m.ActualFee.CloneVT() - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Receipt) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *ActualFee) CloneVT() *ActualFee { - if m == nil { - return (*ActualFee)(nil) - } - r := new(ActualFee) - r.Unit = m.Unit - if rhs := m.Amount; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Amount = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *ActualFee) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *DataAvailability) CloneVT() *DataAvailability { - if m == nil { - return (*DataAvailability)(nil) - } - r := new(DataAvailability) - r.L1Gas = m.L1Gas - r.L1DataGas = m.L1DataGas - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *DataAvailability) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *StateUpdate) CloneVT() *StateUpdate { - if m == nil { - return (*StateUpdate)(nil) - } - r := new(StateUpdate) - r.StateDiff = m.StateDiff.CloneVT() - if rhs := m.NewRoot; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.NewRoot = tmpBytes - } - if rhs := m.OldRoot; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.OldRoot = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *StateUpdate) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *StateDiff) CloneVT() *StateDiff { - if m == nil { - return (*StateDiff)(nil) - } - r := new(StateDiff) - if rhs := m.StorageDiffs; rhs != nil { - tmpContainer := make([]*ContractStorageDiff, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.StorageDiffs = tmpContainer - } - if rhs := m.DeprecatedDeclaredClasses; rhs != nil { - tmpContainer := make([][]byte, len(rhs)) - for k, v := range rhs { - tmpBytes := make([]byte, len(v)) - copy(tmpBytes, v) - tmpContainer[k] = tmpBytes - } - r.DeprecatedDeclaredClasses = tmpContainer - } - if rhs := m.DeclaredClasses; rhs != nil { - tmpContainer := make([]*DeclaredClass, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.DeclaredClasses = tmpContainer - } - if rhs := m.DeployedContracts; rhs != nil { - tmpContainer := make([]*DeployedContract, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.DeployedContracts = tmpContainer - } - if rhs := m.ReplacedClasses; rhs != nil { - tmpContainer := make([]*ReplacedClass, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.ReplacedClasses = tmpContainer - } - if rhs := m.Nonces; rhs != nil { - tmpContainer := make([]*NonceDiff, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Nonces = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *StateDiff) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *NonceDiff) CloneVT() *NonceDiff { - if m == nil { - return (*NonceDiff)(nil) - } - r := new(NonceDiff) - if rhs := m.ContractAddress; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ContractAddress = tmpBytes - } - if rhs := m.Nonce; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Nonce = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *NonceDiff) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *ReplacedClass) CloneVT() *ReplacedClass { - if m == nil { - return (*ReplacedClass)(nil) - } - r := new(ReplacedClass) - if rhs := m.ContractAddress; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ContractAddress = tmpBytes - } - if rhs := m.ClassHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ClassHash = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *ReplacedClass) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *DeployedContract) CloneVT() *DeployedContract { - if m == nil { - return (*DeployedContract)(nil) - } - r := new(DeployedContract) - if rhs := m.Address; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Address = tmpBytes - } - if rhs := m.ClassHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ClassHash = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *DeployedContract) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *DeclaredClass) CloneVT() *DeclaredClass { - if m == nil { - return (*DeclaredClass)(nil) - } - r := new(DeclaredClass) - if rhs := m.ClassHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.ClassHash = tmpBytes - } - if rhs := m.CompiledClassHash; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.CompiledClassHash = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *DeclaredClass) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *ContractStorageDiff) CloneVT() *ContractStorageDiff { - if m == nil { - return (*ContractStorageDiff)(nil) - } - r := new(ContractStorageDiff) - if rhs := m.Address; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Address = tmpBytes - } - if rhs := m.StorageEntries; rhs != nil { - tmpContainer := make([]*StorageEntries, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.StorageEntries = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *ContractStorageDiff) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *StorageEntries) CloneVT() *StorageEntries { - if m == nil { - return (*StorageEntries)(nil) - } - r := new(StorageEntries) - if rhs := m.Key; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Key = tmpBytes - } - if rhs := m.Value; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Value = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *StorageEntries) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (this *Block) EqualVT(that *Block) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.BlockHash) != string(that.BlockHash) { - return false - } - if string(this.ParentHash) != string(that.ParentHash) { - return false - } - if this.BlockNumber != that.BlockNumber { - return false - } - if string(this.NewRoot) != string(that.NewRoot) { - return false - } - if this.Timestamp != that.Timestamp { - return false - } - if string(this.SequencerAddress) != string(that.SequencerAddress) { - return false - } - if !this.L1GasPrice.EqualVT(that.L1GasPrice) { - return false - } - if !this.L1DataGasPrice.EqualVT(that.L1DataGasPrice) { - return false - } - if this.L1DaMode != that.L1DaMode { - return false - } - if this.StarknetVersion != that.StarknetVersion { - return false - } - if len(this.Transactions) != len(that.Transactions) { - return false - } - for i, vx := range this.Transactions { - vy := that.Transactions[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &TransactionWithReceipt{} - } - if q == nil { - q = &TransactionWithReceipt{} - } - if !p.EqualVT(q) { - return false - } - } - } - if !this.StateUpdate.EqualVT(that.StateUpdate) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Block) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Block) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *ResourcePrice) EqualVT(that *ResourcePrice) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.PriceInFri) != string(that.PriceInFri) { - return false - } - if string(this.PriceInWei) != string(that.PriceInWei) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *ResourcePrice) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*ResourcePrice) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *TransactionWithReceipt) EqualVT(that *TransactionWithReceipt) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Transaction == nil && that.Transaction != nil { - return false - } else if this.Transaction != nil { - if that.Transaction == nil { - return false - } - if !this.Transaction.(interface { - EqualVT(isTransactionWithReceipt_Transaction) bool - }).EqualVT(that.Transaction) { - return false - } - } - if !this.Receipt.EqualVT(that.Receipt) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *TransactionWithReceipt) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*TransactionWithReceipt) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *TransactionWithReceipt_InvokeTransactionV0) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { - that, ok := thatIface.(*TransactionWithReceipt_InvokeTransactionV0) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.InvokeTransactionV0, that.InvokeTransactionV0; p != q { - if p == nil { - p = &InvokeTransactionV0{} - } - if q == nil { - q = &InvokeTransactionV0{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *TransactionWithReceipt_InvokeTransactionV1) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { - that, ok := thatIface.(*TransactionWithReceipt_InvokeTransactionV1) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.InvokeTransactionV1, that.InvokeTransactionV1; p != q { - if p == nil { - p = &InvokeTransactionV1{} - } - if q == nil { - q = &InvokeTransactionV1{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *TransactionWithReceipt_InvokeTransactionV3) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { - that, ok := thatIface.(*TransactionWithReceipt_InvokeTransactionV3) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.InvokeTransactionV3, that.InvokeTransactionV3; p != q { - if p == nil { - p = &InvokeTransactionV3{} - } - if q == nil { - q = &InvokeTransactionV3{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *TransactionWithReceipt_L1HandlerTransaction) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { - that, ok := thatIface.(*TransactionWithReceipt_L1HandlerTransaction) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.L1HandlerTransaction, that.L1HandlerTransaction; p != q { - if p == nil { - p = &L1HandlerTransaction{} - } - if q == nil { - q = &L1HandlerTransaction{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *TransactionWithReceipt_DeclareTransactionV0) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { - that, ok := thatIface.(*TransactionWithReceipt_DeclareTransactionV0) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.DeclareTransactionV0, that.DeclareTransactionV0; p != q { - if p == nil { - p = &DeclareTransactionV0{} - } - if q == nil { - q = &DeclareTransactionV0{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *TransactionWithReceipt_DeclareTransactionV1) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { - that, ok := thatIface.(*TransactionWithReceipt_DeclareTransactionV1) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.DeclareTransactionV1, that.DeclareTransactionV1; p != q { - if p == nil { - p = &DeclareTransactionV1{} - } - if q == nil { - q = &DeclareTransactionV1{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *TransactionWithReceipt_DeclareTransactionV2) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { - that, ok := thatIface.(*TransactionWithReceipt_DeclareTransactionV2) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.DeclareTransactionV2, that.DeclareTransactionV2; p != q { - if p == nil { - p = &DeclareTransactionV2{} - } - if q == nil { - q = &DeclareTransactionV2{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *TransactionWithReceipt_DeclareTransactionV3) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { - that, ok := thatIface.(*TransactionWithReceipt_DeclareTransactionV3) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.DeclareTransactionV3, that.DeclareTransactionV3; p != q { - if p == nil { - p = &DeclareTransactionV3{} - } - if q == nil { - q = &DeclareTransactionV3{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *TransactionWithReceipt_DeployTransactionV0) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { - that, ok := thatIface.(*TransactionWithReceipt_DeployTransactionV0) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.DeployTransactionV0, that.DeployTransactionV0; p != q { - if p == nil { - p = &DeployTransactionV0{} - } - if q == nil { - q = &DeployTransactionV0{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *TransactionWithReceipt_DeployAccountTransactionV1) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { - that, ok := thatIface.(*TransactionWithReceipt_DeployAccountTransactionV1) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.DeployAccountTransactionV1, that.DeployAccountTransactionV1; p != q { - if p == nil { - p = &DeployAccountTransactionV1{} - } - if q == nil { - q = &DeployAccountTransactionV1{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *TransactionWithReceipt_DeployAccountTransactionV3) EqualVT(thatIface isTransactionWithReceipt_Transaction) bool { - that, ok := thatIface.(*TransactionWithReceipt_DeployAccountTransactionV3) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.DeployAccountTransactionV3, that.DeployAccountTransactionV3; p != q { - if p == nil { - p = &DeployAccountTransactionV3{} - } - if q == nil { - q = &DeployAccountTransactionV3{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *TransactionReceipt) EqualVT(that *TransactionReceipt) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.TransactionHash) != string(that.TransactionHash) { - return false - } - if !this.ActualFee.EqualVT(that.ActualFee) { - return false - } - if this.ExecutionStatus != that.ExecutionStatus { - return false - } - if this.RevertReason != that.RevertReason { - return false - } - if this.Type != that.Type { - return false - } - if this.MessageHash != that.MessageHash { - return false - } - if len(this.MessagesSent) != len(that.MessagesSent) { - return false - } - for i, vx := range this.MessagesSent { - vy := that.MessagesSent[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &MessagesSent{} - } - if q == nil { - q = &MessagesSent{} - } - if !p.EqualVT(q) { - return false - } - } - } - if len(this.Events) != len(that.Events) { - return false - } - for i, vx := range this.Events { - vy := that.Events[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &Event{} - } - if q == nil { - q = &Event{} - } - if !p.EqualVT(q) { - return false - } - } - } - if !this.ExecutionResources.EqualVT(that.ExecutionResources) { - return false - } - if string(this.ContractAddress) != string(that.ContractAddress) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *TransactionReceipt) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*TransactionReceipt) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *MessagesSent) EqualVT(that *MessagesSent) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.FromAddress) != string(that.FromAddress) { - return false - } - if string(this.ToAddress) != string(that.ToAddress) { - return false - } - if len(this.Payload) != len(that.Payload) { - return false - } - for i, vx := range this.Payload { - vy := that.Payload[i] - if string(vx) != string(vy) { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *MessagesSent) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*MessagesSent) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *Event) EqualVT(that *Event) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.FromAddress) != string(that.FromAddress) { - return false - } - if len(this.Keys) != len(that.Keys) { - return false - } - for i, vx := range this.Keys { - vy := that.Keys[i] - if string(vx) != string(vy) { - return false - } - } - if len(this.Data) != len(that.Data) { - return false - } - for i, vx := range this.Data { - vy := that.Data[i] - if string(vx) != string(vy) { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Event) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Event) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *ExecutionResources) EqualVT(that *ExecutionResources) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Steps != that.Steps { - return false - } - if this.MemoryHoles != that.MemoryHoles { - return false - } - if this.RangeCheckBuiltinApplications != that.RangeCheckBuiltinApplications { - return false - } - if this.PedersenBuiltinApplications != that.PedersenBuiltinApplications { - return false - } - if this.PoseidonBuiltinApplications != that.PoseidonBuiltinApplications { - return false - } - if this.EcOpBuiltinApplications != that.EcOpBuiltinApplications { - return false - } - if this.EcdsaBuiltinApplications != that.EcdsaBuiltinApplications { - return false - } - if this.BitwiseBuiltinApplications != that.BitwiseBuiltinApplications { - return false - } - if this.KeccakBuiltinApplications != that.KeccakBuiltinApplications { - return false - } - if this.SegmentArenaBuiltin != that.SegmentArenaBuiltin { - return false - } - if !this.DataAvailability.EqualVT(that.DataAvailability) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *ExecutionResources) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*ExecutionResources) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *InvokeTransactionV0) EqualVT(that *InvokeTransactionV0) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.MaxFee) != string(that.MaxFee) { - return false - } - if this.Version != that.Version { - return false - } - if len(this.Signature) != len(that.Signature) { - return false - } - for i, vx := range this.Signature { - vy := that.Signature[i] - if string(vx) != string(vy) { - return false - } - } - if string(this.ContractAddress) != string(that.ContractAddress) { - return false - } - if string(this.EntryPointSelector) != string(that.EntryPointSelector) { - return false - } - if len(this.Calldata) != len(that.Calldata) { - return false - } - for i, vx := range this.Calldata { - vy := that.Calldata[i] - if string(vx) != string(vy) { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *InvokeTransactionV0) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*InvokeTransactionV0) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *InvokeTransactionV1) EqualVT(that *InvokeTransactionV1) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.MaxFee) != string(that.MaxFee) { - return false - } - if this.Version != that.Version { - return false - } - if len(this.Signature) != len(that.Signature) { - return false - } - for i, vx := range this.Signature { - vy := that.Signature[i] - if string(vx) != string(vy) { - return false - } - } - if string(this.Nonce) != string(that.Nonce) { - return false - } - if string(this.SenderAddress) != string(that.SenderAddress) { - return false - } - if len(this.Calldata) != len(that.Calldata) { - return false - } - for i, vx := range this.Calldata { - vy := that.Calldata[i] - if string(vx) != string(vy) { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *InvokeTransactionV1) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*InvokeTransactionV1) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *InvokeTransactionV3) EqualVT(that *InvokeTransactionV3) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.SenderAddress) != string(that.SenderAddress) { - return false - } - if len(this.Calldata) != len(that.Calldata) { - return false - } - for i, vx := range this.Calldata { - vy := that.Calldata[i] - if string(vx) != string(vy) { - return false - } - } - if this.Version != that.Version { - return false - } - if len(this.Signature) != len(that.Signature) { - return false - } - for i, vx := range this.Signature { - vy := that.Signature[i] - if string(vx) != string(vy) { - return false - } - } - if string(this.Nonce) != string(that.Nonce) { - return false - } - if !this.ResourceBounds.EqualVT(that.ResourceBounds) { - return false - } - if string(this.Tip) != string(that.Tip) { - return false - } - if len(this.PaymasterData) != len(that.PaymasterData) { - return false - } - for i, vx := range this.PaymasterData { - vy := that.PaymasterData[i] - if string(vx) != string(vy) { - return false - } - } - if len(this.AccountDeploymentData) != len(that.AccountDeploymentData) { - return false - } - for i, vx := range this.AccountDeploymentData { - vy := that.AccountDeploymentData[i] - if string(vx) != string(vy) { - return false - } - } - if this.NonceDataAvailabilityMode != that.NonceDataAvailabilityMode { - return false - } - if this.FeeDataAvailabilityMode != that.FeeDataAvailabilityMode { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *InvokeTransactionV3) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*InvokeTransactionV3) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *L1HandlerTransaction) EqualVT(that *L1HandlerTransaction) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Version != that.Version { - return false - } - if this.Nonce != that.Nonce { - return false - } - if string(this.ContractAddress) != string(that.ContractAddress) { - return false - } - if string(this.EntryPointSelector) != string(that.EntryPointSelector) { - return false - } - if len(this.Calldata) != len(that.Calldata) { - return false - } - for i, vx := range this.Calldata { - vy := that.Calldata[i] - if string(vx) != string(vy) { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *L1HandlerTransaction) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*L1HandlerTransaction) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *DeclareTransactionV0) EqualVT(that *DeclareTransactionV0) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.SenderAddress) != string(that.SenderAddress) { - return false - } - if string(this.MaxFee) != string(that.MaxFee) { - return false - } - if this.Version != that.Version { - return false - } - if len(this.Signature) != len(that.Signature) { - return false - } - for i, vx := range this.Signature { - vy := that.Signature[i] - if string(vx) != string(vy) { - return false - } - } - if string(this.ClassHash) != string(that.ClassHash) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *DeclareTransactionV0) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*DeclareTransactionV0) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *DeclareTransactionV1) EqualVT(that *DeclareTransactionV1) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.SenderAddress) != string(that.SenderAddress) { - return false - } - if string(this.MaxFee) != string(that.MaxFee) { - return false - } - if this.Version != that.Version { - return false - } - if len(this.Signature) != len(that.Signature) { - return false - } - for i, vx := range this.Signature { - vy := that.Signature[i] - if string(vx) != string(vy) { - return false - } - } - if string(this.Nonce) != string(that.Nonce) { - return false - } - if string(this.ClassHash) != string(that.ClassHash) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *DeclareTransactionV1) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*DeclareTransactionV1) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *DeclareTransactionV2) EqualVT(that *DeclareTransactionV2) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.SenderAddress) != string(that.SenderAddress) { - return false - } - if string(this.CompiledClassHash) != string(that.CompiledClassHash) { - return false - } - if string(this.MaxFee) != string(that.MaxFee) { - return false - } - if this.Version != that.Version { - return false - } - if len(this.Signature) != len(that.Signature) { - return false - } - for i, vx := range this.Signature { - vy := that.Signature[i] - if string(vx) != string(vy) { - return false - } - } - if string(this.Nonce) != string(that.Nonce) { - return false - } - if string(this.ClassHash) != string(that.ClassHash) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *DeclareTransactionV2) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*DeclareTransactionV2) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *DeclareTransactionV3) EqualVT(that *DeclareTransactionV3) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.SenderAddress) != string(that.SenderAddress) { - return false - } - if string(this.CompiledClassHash) != string(that.CompiledClassHash) { - return false - } - if this.Version != that.Version { - return false - } - if len(this.Signature) != len(that.Signature) { - return false - } - for i, vx := range this.Signature { - vy := that.Signature[i] - if string(vx) != string(vy) { - return false - } - } - if string(this.Nonce) != string(that.Nonce) { - return false - } - if string(this.ClassHash) != string(that.ClassHash) { - return false - } - if !this.ResourceBounds.EqualVT(that.ResourceBounds) { - return false - } - if string(this.Tip) != string(that.Tip) { - return false - } - if len(this.PaymasterData) != len(that.PaymasterData) { - return false - } - for i, vx := range this.PaymasterData { - vy := that.PaymasterData[i] - if string(vx) != string(vy) { - return false - } - } - if len(this.AccountDeploymentData) != len(that.AccountDeploymentData) { - return false - } - for i, vx := range this.AccountDeploymentData { - vy := that.AccountDeploymentData[i] - if string(vx) != string(vy) { - return false - } - } - if this.NonceDataAvailabilityMode != that.NonceDataAvailabilityMode { - return false - } - if this.FeeDataAvailabilityMode != that.FeeDataAvailabilityMode { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *DeclareTransactionV3) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*DeclareTransactionV3) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *DeployTransactionV0) EqualVT(that *DeployTransactionV0) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.ClassHash) != string(that.ClassHash) { - return false - } - if this.Version != that.Version { - return false - } - if string(this.ContractAddressSalt) != string(that.ContractAddressSalt) { - return false - } - if len(this.ConstructorCalldata) != len(that.ConstructorCalldata) { - return false - } - for i, vx := range this.ConstructorCalldata { - vy := that.ConstructorCalldata[i] - if string(vx) != string(vy) { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *DeployTransactionV0) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*DeployTransactionV0) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *DeployAccountTransactionV1) EqualVT(that *DeployAccountTransactionV1) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.MaxFee) != string(that.MaxFee) { - return false - } - if this.Version != that.Version { - return false - } - if len(this.Signature) != len(that.Signature) { - return false - } - for i, vx := range this.Signature { - vy := that.Signature[i] - if string(vx) != string(vy) { - return false - } - } - if string(this.Nonce) != string(that.Nonce) { - return false - } - if string(this.ClassHash) != string(that.ClassHash) { - return false - } - if string(this.ContractAddressSalt) != string(that.ContractAddressSalt) { - return false - } - if len(this.ConstructorCalldata) != len(that.ConstructorCalldata) { - return false - } - for i, vx := range this.ConstructorCalldata { - vy := that.ConstructorCalldata[i] - if string(vx) != string(vy) { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *DeployAccountTransactionV1) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*DeployAccountTransactionV1) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *DeployAccountTransactionV3) EqualVT(that *DeployAccountTransactionV3) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Version != that.Version { - return false - } - if len(this.Signature) != len(that.Signature) { - return false - } - for i, vx := range this.Signature { - vy := that.Signature[i] - if string(vx) != string(vy) { - return false - } - } - if string(this.Nonce) != string(that.Nonce) { - return false - } - if string(this.ContractAddressSalt) != string(that.ContractAddressSalt) { - return false - } - if len(this.ConstructorCalldata) != len(that.ConstructorCalldata) { - return false - } - for i, vx := range this.ConstructorCalldata { - vy := that.ConstructorCalldata[i] - if string(vx) != string(vy) { - return false - } - } - if string(this.ClassHash) != string(that.ClassHash) { - return false - } - if !this.ResourceBounds.EqualVT(that.ResourceBounds) { - return false - } - if string(this.Tip) != string(that.Tip) { - return false - } - if len(this.PaymasterData) != len(that.PaymasterData) { - return false - } - for i, vx := range this.PaymasterData { - vy := that.PaymasterData[i] - if string(vx) != string(vy) { - return false - } - } - if this.NonceDataAvailabilityMode != that.NonceDataAvailabilityMode { - return false - } - if this.FeeDataAvailabilityMode != that.FeeDataAvailabilityMode { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *DeployAccountTransactionV3) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*DeployAccountTransactionV3) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *ResourceBounds) EqualVT(that *ResourceBounds) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if !this.L1Gas.EqualVT(that.L1Gas) { - return false - } - if !this.L2Gas.EqualVT(that.L2Gas) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *ResourceBounds) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*ResourceBounds) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *Resource) EqualVT(that *Resource) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.MaxAmount != that.MaxAmount { - return false - } - if this.MaxPricePerUnit != that.MaxPricePerUnit { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Resource) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Resource) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *Receipt) EqualVT(that *Receipt) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if !this.ActualFee.EqualVT(that.ActualFee) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Receipt) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Receipt) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *ActualFee) EqualVT(that *ActualFee) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.Amount) != string(that.Amount) { - return false - } - if this.Unit != that.Unit { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *ActualFee) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*ActualFee) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *DataAvailability) EqualVT(that *DataAvailability) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.L1Gas != that.L1Gas { - return false - } - if this.L1DataGas != that.L1DataGas { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *DataAvailability) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*DataAvailability) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *StateUpdate) EqualVT(that *StateUpdate) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.OldRoot) != string(that.OldRoot) { - return false - } - if string(this.NewRoot) != string(that.NewRoot) { - return false - } - if !this.StateDiff.EqualVT(that.StateDiff) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *StateUpdate) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*StateUpdate) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *StateDiff) EqualVT(that *StateDiff) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if len(this.StorageDiffs) != len(that.StorageDiffs) { - return false - } - for i, vx := range this.StorageDiffs { - vy := that.StorageDiffs[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &ContractStorageDiff{} - } - if q == nil { - q = &ContractStorageDiff{} - } - if !p.EqualVT(q) { - return false - } - } - } - if len(this.DeprecatedDeclaredClasses) != len(that.DeprecatedDeclaredClasses) { - return false - } - for i, vx := range this.DeprecatedDeclaredClasses { - vy := that.DeprecatedDeclaredClasses[i] - if string(vx) != string(vy) { - return false - } - } - if len(this.DeclaredClasses) != len(that.DeclaredClasses) { - return false - } - for i, vx := range this.DeclaredClasses { - vy := that.DeclaredClasses[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &DeclaredClass{} - } - if q == nil { - q = &DeclaredClass{} - } - if !p.EqualVT(q) { - return false - } - } - } - if len(this.DeployedContracts) != len(that.DeployedContracts) { - return false - } - for i, vx := range this.DeployedContracts { - vy := that.DeployedContracts[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &DeployedContract{} - } - if q == nil { - q = &DeployedContract{} - } - if !p.EqualVT(q) { - return false - } - } - } - if len(this.ReplacedClasses) != len(that.ReplacedClasses) { - return false - } - for i, vx := range this.ReplacedClasses { - vy := that.ReplacedClasses[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &ReplacedClass{} - } - if q == nil { - q = &ReplacedClass{} - } - if !p.EqualVT(q) { - return false - } - } - } - if len(this.Nonces) != len(that.Nonces) { - return false - } - for i, vx := range this.Nonces { - vy := that.Nonces[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &NonceDiff{} - } - if q == nil { - q = &NonceDiff{} - } - if !p.EqualVT(q) { - return false - } - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *StateDiff) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*StateDiff) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *NonceDiff) EqualVT(that *NonceDiff) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.ContractAddress) != string(that.ContractAddress) { - return false - } - if string(this.Nonce) != string(that.Nonce) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *NonceDiff) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*NonceDiff) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *ReplacedClass) EqualVT(that *ReplacedClass) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.ContractAddress) != string(that.ContractAddress) { - return false - } - if string(this.ClassHash) != string(that.ClassHash) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *ReplacedClass) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*ReplacedClass) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *DeployedContract) EqualVT(that *DeployedContract) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.Address) != string(that.Address) { - return false - } - if string(this.ClassHash) != string(that.ClassHash) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *DeployedContract) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*DeployedContract) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *DeclaredClass) EqualVT(that *DeclaredClass) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.ClassHash) != string(that.ClassHash) { - return false - } - if string(this.CompiledClassHash) != string(that.CompiledClassHash) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *DeclaredClass) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*DeclaredClass) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *ContractStorageDiff) EqualVT(that *ContractStorageDiff) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.Address) != string(that.Address) { - return false - } - if len(this.StorageEntries) != len(that.StorageEntries) { - return false - } - for i, vx := range this.StorageEntries { - vy := that.StorageEntries[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &StorageEntries{} - } - if q == nil { - q = &StorageEntries{} - } - if !p.EqualVT(q) { - return false - } - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *ContractStorageDiff) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*ContractStorageDiff) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *StorageEntries) EqualVT(that *StorageEntries) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if string(this.Key) != string(that.Key) { - return false - } - if string(this.Value) != string(that.Value) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *StorageEntries) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*StorageEntries) - if !ok { - return false - } - return this.EqualVT(that) -} -func (m *Block) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Block) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Block) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.StateUpdate != nil { - size, err := m.StateUpdate.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x62 - } - if len(m.Transactions) > 0 { - for iNdEx := len(m.Transactions) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Transactions[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x5a - } - } - if len(m.StarknetVersion) > 0 { - i -= len(m.StarknetVersion) - copy(dAtA[i:], m.StarknetVersion) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StarknetVersion))) - i-- - dAtA[i] = 0x52 - } - if m.L1DaMode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1DaMode)) - i-- - dAtA[i] = 0x48 - } - if m.L1DataGasPrice != nil { - size, err := m.L1DataGasPrice.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x42 - } - if m.L1GasPrice != nil { - size, err := m.L1GasPrice.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x3a - } - if len(m.SequencerAddress) > 0 { - i -= len(m.SequencerAddress) - copy(dAtA[i:], m.SequencerAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SequencerAddress))) - i-- - dAtA[i] = 0x32 - } - if m.Timestamp != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x28 - } - if len(m.NewRoot) > 0 { - i -= len(m.NewRoot) - copy(dAtA[i:], m.NewRoot) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NewRoot))) - i-- - dAtA[i] = 0x22 - } - if m.BlockNumber != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.BlockNumber)) - i-- - dAtA[i] = 0x18 - } - if len(m.ParentHash) > 0 { - i -= len(m.ParentHash) - copy(dAtA[i:], m.ParentHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.BlockHash) > 0 { - i -= len(m.BlockHash) - copy(dAtA[i:], m.BlockHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.BlockHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ResourcePrice) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourcePrice) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ResourcePrice) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.PriceInWei) > 0 { - i -= len(m.PriceInWei) - copy(dAtA[i:], m.PriceInWei) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PriceInWei))) - i-- - dAtA[i] = 0x12 - } - if len(m.PriceInFri) > 0 { - i -= len(m.PriceInFri) - copy(dAtA[i:], m.PriceInFri) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PriceInFri))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionWithReceipt) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TransactionWithReceipt) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TransactionWithReceipt) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if vtmsg, ok := m.Transaction.(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if m.Receipt != nil { - size, err := m.Receipt.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x62 - } - return len(dAtA) - i, nil -} - -func (m *TransactionWithReceipt_InvokeTransactionV0) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TransactionWithReceipt_InvokeTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.InvokeTransactionV0 != nil { - size, err := m.InvokeTransactionV0.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_InvokeTransactionV1) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TransactionWithReceipt_InvokeTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.InvokeTransactionV1 != nil { - size, err := m.InvokeTransactionV1.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_InvokeTransactionV3) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TransactionWithReceipt_InvokeTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.InvokeTransactionV3 != nil { - size, err := m.InvokeTransactionV3.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_L1HandlerTransaction) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TransactionWithReceipt_L1HandlerTransaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.L1HandlerTransaction != nil { - size, err := m.L1HandlerTransaction.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_DeclareTransactionV0) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TransactionWithReceipt_DeclareTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeclareTransactionV0 != nil { - size, err := m.DeclareTransactionV0.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_DeclareTransactionV1) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TransactionWithReceipt_DeclareTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeclareTransactionV1 != nil { - size, err := m.DeclareTransactionV1.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_DeclareTransactionV2) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TransactionWithReceipt_DeclareTransactionV2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeclareTransactionV2 != nil { - size, err := m.DeclareTransactionV2.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x3a - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_DeclareTransactionV3) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TransactionWithReceipt_DeclareTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeclareTransactionV3 != nil { - size, err := m.DeclareTransactionV3.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x42 - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_DeployTransactionV0) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TransactionWithReceipt_DeployTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeployTransactionV0 != nil { - size, err := m.DeployTransactionV0.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x4a - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_DeployAccountTransactionV1) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TransactionWithReceipt_DeployAccountTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeployAccountTransactionV1 != nil { - size, err := m.DeployAccountTransactionV1.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x52 - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_DeployAccountTransactionV3) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TransactionWithReceipt_DeployAccountTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeployAccountTransactionV3 != nil { - size, err := m.DeployAccountTransactionV3.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x5a - } - return len(dAtA) - i, nil -} -func (m *TransactionReceipt) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TransactionReceipt) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TransactionReceipt) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ContractAddress) > 0 { - i -= len(m.ContractAddress) - copy(dAtA[i:], m.ContractAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) - i-- - dAtA[i] = 0x52 - } - if m.ExecutionResources != nil { - size, err := m.ExecutionResources.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x4a - } - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Events[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x42 - } - } - if len(m.MessagesSent) > 0 { - for iNdEx := len(m.MessagesSent) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.MessagesSent[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x3a - } - } - if len(m.MessageHash) > 0 { - i -= len(m.MessageHash) - copy(dAtA[i:], m.MessageHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MessageHash))) - i-- - dAtA[i] = 0x32 - } - if m.Type != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x28 - } - if len(m.RevertReason) > 0 { - i -= len(m.RevertReason) - copy(dAtA[i:], m.RevertReason) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RevertReason))) - i-- - dAtA[i] = 0x22 - } - if m.ExecutionStatus != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ExecutionStatus)) - i-- - dAtA[i] = 0x18 - } - if m.ActualFee != nil { - size, err := m.ActualFee.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if len(m.TransactionHash) > 0 { - i -= len(m.TransactionHash) - copy(dAtA[i:], m.TransactionHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TransactionHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MessagesSent) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MessagesSent) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *MessagesSent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Payload) > 0 { - for iNdEx := len(m.Payload) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Payload[iNdEx]) - copy(dAtA[i:], m.Payload[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.ToAddress) > 0 { - i -= len(m.ToAddress) - copy(dAtA[i:], m.ToAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ToAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.FromAddress) > 0 { - i -= len(m.FromAddress) - copy(dAtA[i:], m.FromAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FromAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Event) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Event) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Event) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Data) > 0 { - for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Data[iNdEx]) - copy(dAtA[i:], m.Data[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Keys) > 0 { - for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Keys[iNdEx]) - copy(dAtA[i:], m.Keys[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Keys[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.FromAddress) > 0 { - i -= len(m.FromAddress) - copy(dAtA[i:], m.FromAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FromAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ExecutionResources) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExecutionResources) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ExecutionResources) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.DataAvailability != nil { - size, err := m.DataAvailability.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x5a - } - if m.SegmentArenaBuiltin != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SegmentArenaBuiltin)) - i-- - dAtA[i] = 0x50 - } - if m.KeccakBuiltinApplications != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.KeccakBuiltinApplications)) - i-- - dAtA[i] = 0x48 - } - if m.BitwiseBuiltinApplications != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.BitwiseBuiltinApplications)) - i-- - dAtA[i] = 0x40 - } - if m.EcdsaBuiltinApplications != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.EcdsaBuiltinApplications)) - i-- - dAtA[i] = 0x38 - } - if m.EcOpBuiltinApplications != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.EcOpBuiltinApplications)) - i-- - dAtA[i] = 0x30 - } - if m.PoseidonBuiltinApplications != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PoseidonBuiltinApplications)) - i-- - dAtA[i] = 0x28 - } - if m.PedersenBuiltinApplications != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PedersenBuiltinApplications)) - i-- - dAtA[i] = 0x20 - } - if m.RangeCheckBuiltinApplications != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RangeCheckBuiltinApplications)) - i-- - dAtA[i] = 0x18 - } - if m.MemoryHoles != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MemoryHoles)) - i-- - dAtA[i] = 0x10 - } - if m.Steps != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Steps)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *InvokeTransactionV0) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InvokeTransactionV0) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *InvokeTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Calldata) > 0 { - for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Calldata[iNdEx]) - copy(dAtA[i:], m.Calldata[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.EntryPointSelector) > 0 { - i -= len(m.EntryPointSelector) - copy(dAtA[i:], m.EntryPointSelector) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EntryPointSelector))) - i-- - dAtA[i] = 0x32 - } - if len(m.ContractAddress) > 0 { - i -= len(m.ContractAddress) - copy(dAtA[i:], m.ContractAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) - i-- - dAtA[i] = 0x2a - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x1a - } - if len(m.MaxFee) > 0 { - i -= len(m.MaxFee) - copy(dAtA[i:], m.MaxFee) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *InvokeTransactionV1) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InvokeTransactionV1) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *InvokeTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Calldata) > 0 { - for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Calldata[iNdEx]) - copy(dAtA[i:], m.Calldata[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) - i-- - dAtA[i] = 0x2a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x22 - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if len(m.MaxFee) > 0 { - i -= len(m.MaxFee) - copy(dAtA[i:], m.MaxFee) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *InvokeTransactionV3) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InvokeTransactionV3) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *InvokeTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.FeeDataAvailabilityMode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) - i-- - dAtA[i] = 0x60 - } - if m.NonceDataAvailabilityMode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) - i-- - dAtA[i] = 0x58 - } - if len(m.AccountDeploymentData) > 0 { - for iNdEx := len(m.AccountDeploymentData) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AccountDeploymentData[iNdEx]) - copy(dAtA[i:], m.AccountDeploymentData[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountDeploymentData[iNdEx]))) - i-- - dAtA[i] = 0x52 - } - } - if len(m.PaymasterData) > 0 { - for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PaymasterData[iNdEx]) - copy(dAtA[i:], m.PaymasterData[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if len(m.Tip) > 0 { - i -= len(m.Tip) - copy(dAtA[i:], m.Tip) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) - i-- - dAtA[i] = 0x42 - } - if m.ResourceBounds != nil { - size, err := m.ResourceBounds.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x3a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x32 - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - } - if len(m.Calldata) > 0 { - for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Calldata[iNdEx]) - copy(dAtA[i:], m.Calldata[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *L1HandlerTransaction) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *L1HandlerTransaction) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *L1HandlerTransaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Calldata) > 0 { - for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Calldata[iNdEx]) - copy(dAtA[i:], m.Calldata[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.EntryPointSelector) > 0 { - i -= len(m.EntryPointSelector) - copy(dAtA[i:], m.EntryPointSelector) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EntryPointSelector))) - i-- - dAtA[i] = 0x2a - } - if len(m.ContractAddress) > 0 { - i -= len(m.ContractAddress) - copy(dAtA[i:], m.ContractAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x1a - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeclareTransactionV0) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeclareTransactionV0) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DeclareTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x32 - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - } - if len(m.MaxFee) > 0 { - i -= len(m.MaxFee) - copy(dAtA[i:], m.MaxFee) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) - i-- - dAtA[i] = 0x1a - } - if len(m.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *DeclareTransactionV1) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeclareTransactionV1) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DeclareTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x3a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x32 - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - } - if len(m.MaxFee) > 0 { - i -= len(m.MaxFee) - copy(dAtA[i:], m.MaxFee) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) - i-- - dAtA[i] = 0x1a - } - if len(m.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *DeclareTransactionV2) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeclareTransactionV2) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DeclareTransactionV2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x3a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x32 - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - } - if len(m.MaxFee) > 0 { - i -= len(m.MaxFee) - copy(dAtA[i:], m.MaxFee) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) - i-- - dAtA[i] = 0x1a - } - if len(m.CompiledClassHash) > 0 { - i -= len(m.CompiledClassHash) - copy(dAtA[i:], m.CompiledClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeclareTransactionV3) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeclareTransactionV3) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DeclareTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.FeeDataAvailabilityMode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) - i-- - dAtA[i] = 0x68 - } - if m.NonceDataAvailabilityMode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) - i-- - dAtA[i] = 0x60 - } - if len(m.AccountDeploymentData) > 0 { - for iNdEx := len(m.AccountDeploymentData) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AccountDeploymentData[iNdEx]) - copy(dAtA[i:], m.AccountDeploymentData[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountDeploymentData[iNdEx]))) - i-- - dAtA[i] = 0x5a - } - } - if len(m.PaymasterData) > 0 { - for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PaymasterData[iNdEx]) - copy(dAtA[i:], m.PaymasterData[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) - i-- - dAtA[i] = 0x52 - } - } - if len(m.Tip) > 0 { - i -= len(m.Tip) - copy(dAtA[i:], m.Tip) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) - i-- - dAtA[i] = 0x4a - } - if m.ResourceBounds != nil { - size, err := m.ResourceBounds.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x42 - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x3a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x32 - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - } - if len(m.CompiledClassHash) > 0 { - i -= len(m.CompiledClassHash) - copy(dAtA[i:], m.CompiledClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) - i-- - dAtA[i] = 0x1a - } - if len(m.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *DeployTransactionV0) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeployTransactionV0) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DeployTransactionV0) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ConstructorCalldata) > 0 { - for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ConstructorCalldata[iNdEx]) - copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.ContractAddressSalt) > 0 { - i -= len(m.ContractAddressSalt) - copy(dAtA[i:], m.ContractAddressSalt) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) - i-- - dAtA[i] = 0x1a - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeployAccountTransactionV1) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeployAccountTransactionV1) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DeployAccountTransactionV1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ConstructorCalldata) > 0 { - for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ConstructorCalldata[iNdEx]) - copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.ContractAddressSalt) > 0 { - i -= len(m.ContractAddressSalt) - copy(dAtA[i:], m.ContractAddressSalt) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) - i-- - dAtA[i] = 0x32 - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x2a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x22 - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if len(m.MaxFee) > 0 { - i -= len(m.MaxFee) - copy(dAtA[i:], m.MaxFee) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeployAccountTransactionV3) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeployAccountTransactionV3) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DeployAccountTransactionV3) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.FeeDataAvailabilityMode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) - i-- - dAtA[i] = 0x60 - } - if m.NonceDataAvailabilityMode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) - i-- - dAtA[i] = 0x58 - } - if len(m.PaymasterData) > 0 { - for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PaymasterData[iNdEx]) - copy(dAtA[i:], m.PaymasterData[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if len(m.Tip) > 0 { - i -= len(m.Tip) - copy(dAtA[i:], m.Tip) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) - i-- - dAtA[i] = 0x42 - } - if m.ResourceBounds != nil { - size, err := m.ResourceBounds.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x3a - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x32 - } - if len(m.ConstructorCalldata) > 0 { - for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ConstructorCalldata[iNdEx]) - copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.ContractAddressSalt) > 0 { - i -= len(m.ContractAddressSalt) - copy(dAtA[i:], m.ContractAddressSalt) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) - i-- - dAtA[i] = 0x22 - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x1a - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ResourceBounds) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceBounds) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ResourceBounds) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.L2Gas != nil { - size, err := m.L2Gas.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if m.L1Gas != nil { - size, err := m.L1Gas.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Resource) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Resource) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Resource) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.MaxPricePerUnit) > 0 { - i -= len(m.MaxPricePerUnit) - copy(dAtA[i:], m.MaxPricePerUnit) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxPricePerUnit))) - i-- - dAtA[i] = 0x12 - } - if len(m.MaxAmount) > 0 { - i -= len(m.MaxAmount) - copy(dAtA[i:], m.MaxAmount) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxAmount))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Receipt) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Receipt) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Receipt) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.ActualFee != nil { - size, err := m.ActualFee.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ActualFee) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ActualFee) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ActualFee) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Unit) > 0 { - i -= len(m.Unit) - copy(dAtA[i:], m.Unit) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Unit))) - i-- - dAtA[i] = 0x12 - } - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Amount))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DataAvailability) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DataAvailability) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DataAvailability) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.L1DataGas != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1DataGas)) - i-- - dAtA[i] = 0x10 - } - if m.L1Gas != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1Gas)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *StateUpdate) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StateUpdate) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *StateUpdate) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.StateDiff != nil { - size, err := m.StateDiff.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - if len(m.NewRoot) > 0 { - i -= len(m.NewRoot) - copy(dAtA[i:], m.NewRoot) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NewRoot))) - i-- - dAtA[i] = 0x12 - } - if len(m.OldRoot) > 0 { - i -= len(m.OldRoot) - copy(dAtA[i:], m.OldRoot) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OldRoot))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StateDiff) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StateDiff) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *StateDiff) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Nonces) > 0 { - for iNdEx := len(m.Nonces) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Nonces[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - } - if len(m.ReplacedClasses) > 0 { - for iNdEx := len(m.ReplacedClasses) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.ReplacedClasses[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.DeployedContracts) > 0 { - for iNdEx := len(m.DeployedContracts) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.DeployedContracts[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.DeclaredClasses) > 0 { - for iNdEx := len(m.DeclaredClasses) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.DeclaredClasses[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.DeprecatedDeclaredClasses) > 0 { - for iNdEx := len(m.DeprecatedDeclaredClasses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DeprecatedDeclaredClasses[iNdEx]) - copy(dAtA[i:], m.DeprecatedDeclaredClasses[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeprecatedDeclaredClasses[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.StorageDiffs) > 0 { - for iNdEx := len(m.StorageDiffs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.StorageDiffs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *NonceDiff) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NonceDiff) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *NonceDiff) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x12 - } - if len(m.ContractAddress) > 0 { - i -= len(m.ContractAddress) - copy(dAtA[i:], m.ContractAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ReplacedClass) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ReplacedClass) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ReplacedClass) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.ContractAddress) > 0 { - i -= len(m.ContractAddress) - copy(dAtA[i:], m.ContractAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeployedContract) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeployedContract) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DeployedContract) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeclaredClass) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeclaredClass) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DeclaredClass) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.CompiledClassHash) > 0 { - i -= len(m.CompiledClassHash) - copy(dAtA[i:], m.CompiledClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ContractStorageDiff) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContractStorageDiff) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ContractStorageDiff) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.StorageEntries) > 0 { - for iNdEx := len(m.StorageEntries) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.StorageEntries[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StorageEntries) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StorageEntries) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *StorageEntries) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Block) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Block) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Block) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.StateUpdate != nil { - size, err := m.StateUpdate.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x62 - } - if len(m.Transactions) > 0 { - for iNdEx := len(m.Transactions) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Transactions[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x5a - } - } - if len(m.StarknetVersion) > 0 { - i -= len(m.StarknetVersion) - copy(dAtA[i:], m.StarknetVersion) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StarknetVersion))) - i-- - dAtA[i] = 0x52 - } - if m.L1DaMode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1DaMode)) - i-- - dAtA[i] = 0x48 - } - if m.L1DataGasPrice != nil { - size, err := m.L1DataGasPrice.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x42 - } - if m.L1GasPrice != nil { - size, err := m.L1GasPrice.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x3a - } - if len(m.SequencerAddress) > 0 { - i -= len(m.SequencerAddress) - copy(dAtA[i:], m.SequencerAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SequencerAddress))) - i-- - dAtA[i] = 0x32 - } - if m.Timestamp != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x28 - } - if len(m.NewRoot) > 0 { - i -= len(m.NewRoot) - copy(dAtA[i:], m.NewRoot) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NewRoot))) - i-- - dAtA[i] = 0x22 - } - if m.BlockNumber != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.BlockNumber)) - i-- - dAtA[i] = 0x18 - } - if len(m.ParentHash) > 0 { - i -= len(m.ParentHash) - copy(dAtA[i:], m.ParentHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.BlockHash) > 0 { - i -= len(m.BlockHash) - copy(dAtA[i:], m.BlockHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.BlockHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ResourcePrice) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourcePrice) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *ResourcePrice) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.PriceInWei) > 0 { - i -= len(m.PriceInWei) - copy(dAtA[i:], m.PriceInWei) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PriceInWei))) - i-- - dAtA[i] = 0x12 - } - if len(m.PriceInFri) > 0 { - i -= len(m.PriceInFri) - copy(dAtA[i:], m.PriceInFri) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PriceInFri))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionWithReceipt) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TransactionWithReceipt) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *TransactionWithReceipt) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Receipt != nil { - size, err := m.Receipt.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x62 - } - if msg, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV3); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV1); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.Transaction.(*TransactionWithReceipt_DeployTransactionV0); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV3); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV2); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV1); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV0); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.Transaction.(*TransactionWithReceipt_L1HandlerTransaction); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV3); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV1); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV0); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - return len(dAtA) - i, nil -} - -func (m *TransactionWithReceipt_InvokeTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *TransactionWithReceipt_InvokeTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.InvokeTransactionV0 != nil { - size, err := m.InvokeTransactionV0.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_InvokeTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *TransactionWithReceipt_InvokeTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.InvokeTransactionV1 != nil { - size, err := m.InvokeTransactionV1.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_InvokeTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *TransactionWithReceipt_InvokeTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.InvokeTransactionV3 != nil { - size, err := m.InvokeTransactionV3.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_L1HandlerTransaction) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *TransactionWithReceipt_L1HandlerTransaction) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.L1HandlerTransaction != nil { - size, err := m.L1HandlerTransaction.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_DeclareTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *TransactionWithReceipt_DeclareTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeclareTransactionV0 != nil { - size, err := m.DeclareTransactionV0.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_DeclareTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *TransactionWithReceipt_DeclareTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeclareTransactionV1 != nil { - size, err := m.DeclareTransactionV1.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_DeclareTransactionV2) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *TransactionWithReceipt_DeclareTransactionV2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeclareTransactionV2 != nil { - size, err := m.DeclareTransactionV2.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x3a - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_DeclareTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *TransactionWithReceipt_DeclareTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeclareTransactionV3 != nil { - size, err := m.DeclareTransactionV3.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x42 - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_DeployTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *TransactionWithReceipt_DeployTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeployTransactionV0 != nil { - size, err := m.DeployTransactionV0.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x4a - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_DeployAccountTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *TransactionWithReceipt_DeployAccountTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeployAccountTransactionV1 != nil { - size, err := m.DeployAccountTransactionV1.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x52 - } - return len(dAtA) - i, nil -} -func (m *TransactionWithReceipt_DeployAccountTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *TransactionWithReceipt_DeployAccountTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeployAccountTransactionV3 != nil { - size, err := m.DeployAccountTransactionV3.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x5a - } - return len(dAtA) - i, nil -} -func (m *TransactionReceipt) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TransactionReceipt) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *TransactionReceipt) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ContractAddress) > 0 { - i -= len(m.ContractAddress) - copy(dAtA[i:], m.ContractAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) - i-- - dAtA[i] = 0x52 - } - if m.ExecutionResources != nil { - size, err := m.ExecutionResources.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x4a - } - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Events[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x42 - } - } - if len(m.MessagesSent) > 0 { - for iNdEx := len(m.MessagesSent) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.MessagesSent[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x3a - } - } - if len(m.MessageHash) > 0 { - i -= len(m.MessageHash) - copy(dAtA[i:], m.MessageHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MessageHash))) - i-- - dAtA[i] = 0x32 - } - if m.Type != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x28 - } - if len(m.RevertReason) > 0 { - i -= len(m.RevertReason) - copy(dAtA[i:], m.RevertReason) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RevertReason))) - i-- - dAtA[i] = 0x22 - } - if m.ExecutionStatus != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ExecutionStatus)) - i-- - dAtA[i] = 0x18 - } - if m.ActualFee != nil { - size, err := m.ActualFee.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if len(m.TransactionHash) > 0 { - i -= len(m.TransactionHash) - copy(dAtA[i:], m.TransactionHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TransactionHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MessagesSent) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MessagesSent) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *MessagesSent) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Payload) > 0 { - for iNdEx := len(m.Payload) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Payload[iNdEx]) - copy(dAtA[i:], m.Payload[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Payload[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.ToAddress) > 0 { - i -= len(m.ToAddress) - copy(dAtA[i:], m.ToAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ToAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.FromAddress) > 0 { - i -= len(m.FromAddress) - copy(dAtA[i:], m.FromAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FromAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Event) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Event) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Event) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Data) > 0 { - for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Data[iNdEx]) - copy(dAtA[i:], m.Data[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Keys) > 0 { - for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Keys[iNdEx]) - copy(dAtA[i:], m.Keys[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Keys[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.FromAddress) > 0 { - i -= len(m.FromAddress) - copy(dAtA[i:], m.FromAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FromAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ExecutionResources) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExecutionResources) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *ExecutionResources) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.DataAvailability != nil { - size, err := m.DataAvailability.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x5a - } - if m.SegmentArenaBuiltin != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SegmentArenaBuiltin)) - i-- - dAtA[i] = 0x50 - } - if m.KeccakBuiltinApplications != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.KeccakBuiltinApplications)) - i-- - dAtA[i] = 0x48 - } - if m.BitwiseBuiltinApplications != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.BitwiseBuiltinApplications)) - i-- - dAtA[i] = 0x40 - } - if m.EcdsaBuiltinApplications != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.EcdsaBuiltinApplications)) - i-- - dAtA[i] = 0x38 - } - if m.EcOpBuiltinApplications != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.EcOpBuiltinApplications)) - i-- - dAtA[i] = 0x30 - } - if m.PoseidonBuiltinApplications != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PoseidonBuiltinApplications)) - i-- - dAtA[i] = 0x28 - } - if m.PedersenBuiltinApplications != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PedersenBuiltinApplications)) - i-- - dAtA[i] = 0x20 - } - if m.RangeCheckBuiltinApplications != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RangeCheckBuiltinApplications)) - i-- - dAtA[i] = 0x18 - } - if m.MemoryHoles != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MemoryHoles)) - i-- - dAtA[i] = 0x10 - } - if m.Steps != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Steps)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *InvokeTransactionV0) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InvokeTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *InvokeTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Calldata) > 0 { - for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Calldata[iNdEx]) - copy(dAtA[i:], m.Calldata[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.EntryPointSelector) > 0 { - i -= len(m.EntryPointSelector) - copy(dAtA[i:], m.EntryPointSelector) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EntryPointSelector))) - i-- - dAtA[i] = 0x32 - } - if len(m.ContractAddress) > 0 { - i -= len(m.ContractAddress) - copy(dAtA[i:], m.ContractAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) - i-- - dAtA[i] = 0x2a - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x1a - } - if len(m.MaxFee) > 0 { - i -= len(m.MaxFee) - copy(dAtA[i:], m.MaxFee) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *InvokeTransactionV1) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InvokeTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *InvokeTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Calldata) > 0 { - for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Calldata[iNdEx]) - copy(dAtA[i:], m.Calldata[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) - i-- - dAtA[i] = 0x2a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x22 - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if len(m.MaxFee) > 0 { - i -= len(m.MaxFee) - copy(dAtA[i:], m.MaxFee) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *InvokeTransactionV3) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InvokeTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *InvokeTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.FeeDataAvailabilityMode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) - i-- - dAtA[i] = 0x60 - } - if m.NonceDataAvailabilityMode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) - i-- - dAtA[i] = 0x58 - } - if len(m.AccountDeploymentData) > 0 { - for iNdEx := len(m.AccountDeploymentData) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AccountDeploymentData[iNdEx]) - copy(dAtA[i:], m.AccountDeploymentData[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountDeploymentData[iNdEx]))) - i-- - dAtA[i] = 0x52 - } - } - if len(m.PaymasterData) > 0 { - for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PaymasterData[iNdEx]) - copy(dAtA[i:], m.PaymasterData[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if len(m.Tip) > 0 { - i -= len(m.Tip) - copy(dAtA[i:], m.Tip) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) - i-- - dAtA[i] = 0x42 - } - if m.ResourceBounds != nil { - size, err := m.ResourceBounds.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x3a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x32 - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - } - if len(m.Calldata) > 0 { - for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Calldata[iNdEx]) - copy(dAtA[i:], m.Calldata[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *L1HandlerTransaction) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *L1HandlerTransaction) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *L1HandlerTransaction) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Calldata) > 0 { - for iNdEx := len(m.Calldata) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Calldata[iNdEx]) - copy(dAtA[i:], m.Calldata[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Calldata[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.EntryPointSelector) > 0 { - i -= len(m.EntryPointSelector) - copy(dAtA[i:], m.EntryPointSelector) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EntryPointSelector))) - i-- - dAtA[i] = 0x2a - } - if len(m.ContractAddress) > 0 { - i -= len(m.ContractAddress) - copy(dAtA[i:], m.ContractAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x1a - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeclareTransactionV0) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeclareTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *DeclareTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x32 - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - } - if len(m.MaxFee) > 0 { - i -= len(m.MaxFee) - copy(dAtA[i:], m.MaxFee) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) - i-- - dAtA[i] = 0x1a - } - if len(m.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *DeclareTransactionV1) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeclareTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *DeclareTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x3a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x32 - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - } - if len(m.MaxFee) > 0 { - i -= len(m.MaxFee) - copy(dAtA[i:], m.MaxFee) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) - i-- - dAtA[i] = 0x1a - } - if len(m.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *DeclareTransactionV2) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeclareTransactionV2) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *DeclareTransactionV2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x3a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x32 - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - } - if len(m.MaxFee) > 0 { - i -= len(m.MaxFee) - copy(dAtA[i:], m.MaxFee) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) - i-- - dAtA[i] = 0x1a - } - if len(m.CompiledClassHash) > 0 { - i -= len(m.CompiledClassHash) - copy(dAtA[i:], m.CompiledClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeclareTransactionV3) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeclareTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *DeclareTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.FeeDataAvailabilityMode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) - i-- - dAtA[i] = 0x68 - } - if m.NonceDataAvailabilityMode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) - i-- - dAtA[i] = 0x60 - } - if len(m.AccountDeploymentData) > 0 { - for iNdEx := len(m.AccountDeploymentData) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AccountDeploymentData[iNdEx]) - copy(dAtA[i:], m.AccountDeploymentData[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountDeploymentData[iNdEx]))) - i-- - dAtA[i] = 0x5a - } - } - if len(m.PaymasterData) > 0 { - for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PaymasterData[iNdEx]) - copy(dAtA[i:], m.PaymasterData[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) - i-- - dAtA[i] = 0x52 - } - } - if len(m.Tip) > 0 { - i -= len(m.Tip) - copy(dAtA[i:], m.Tip) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) - i-- - dAtA[i] = 0x4a - } - if m.ResourceBounds != nil { - size, err := m.ResourceBounds.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x42 - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x3a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x32 - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - } - if len(m.CompiledClassHash) > 0 { - i -= len(m.CompiledClassHash) - copy(dAtA[i:], m.CompiledClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) - i-- - dAtA[i] = 0x1a - } - if len(m.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SenderAddress))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *DeployTransactionV0) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeployTransactionV0) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *DeployTransactionV0) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ConstructorCalldata) > 0 { - for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ConstructorCalldata[iNdEx]) - copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.ContractAddressSalt) > 0 { - i -= len(m.ContractAddressSalt) - copy(dAtA[i:], m.ContractAddressSalt) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) - i-- - dAtA[i] = 0x1a - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeployAccountTransactionV1) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeployAccountTransactionV1) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *DeployAccountTransactionV1) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ConstructorCalldata) > 0 { - for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ConstructorCalldata[iNdEx]) - copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.ContractAddressSalt) > 0 { - i -= len(m.ContractAddressSalt) - copy(dAtA[i:], m.ContractAddressSalt) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) - i-- - dAtA[i] = 0x32 - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x2a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x22 - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if len(m.MaxFee) > 0 { - i -= len(m.MaxFee) - copy(dAtA[i:], m.MaxFee) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxFee))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeployAccountTransactionV3) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeployAccountTransactionV3) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *DeployAccountTransactionV3) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.FeeDataAvailabilityMode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FeeDataAvailabilityMode)) - i-- - dAtA[i] = 0x60 - } - if m.NonceDataAvailabilityMode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NonceDataAvailabilityMode)) - i-- - dAtA[i] = 0x58 - } - if len(m.PaymasterData) > 0 { - for iNdEx := len(m.PaymasterData) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PaymasterData[iNdEx]) - copy(dAtA[i:], m.PaymasterData[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PaymasterData[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if len(m.Tip) > 0 { - i -= len(m.Tip) - copy(dAtA[i:], m.Tip) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tip))) - i-- - dAtA[i] = 0x42 - } - if m.ResourceBounds != nil { - size, err := m.ResourceBounds.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x3a - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x32 - } - if len(m.ConstructorCalldata) > 0 { - for iNdEx := len(m.ConstructorCalldata) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ConstructorCalldata[iNdEx]) - copy(dAtA[i:], m.ConstructorCalldata[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ConstructorCalldata[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.ContractAddressSalt) > 0 { - i -= len(m.ContractAddressSalt) - copy(dAtA[i:], m.ContractAddressSalt) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddressSalt))) - i-- - dAtA[i] = 0x22 - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x1a - } - if len(m.Signature) > 0 { - for iNdEx := len(m.Signature) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signature[iNdEx]) - copy(dAtA[i:], m.Signature[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Signature[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ResourceBounds) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceBounds) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *ResourceBounds) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.L2Gas != nil { - size, err := m.L2Gas.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if m.L1Gas != nil { - size, err := m.L1Gas.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Resource) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Resource) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Resource) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.MaxPricePerUnit) > 0 { - i -= len(m.MaxPricePerUnit) - copy(dAtA[i:], m.MaxPricePerUnit) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxPricePerUnit))) - i-- - dAtA[i] = 0x12 - } - if len(m.MaxAmount) > 0 { - i -= len(m.MaxAmount) - copy(dAtA[i:], m.MaxAmount) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MaxAmount))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Receipt) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Receipt) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Receipt) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.ActualFee != nil { - size, err := m.ActualFee.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ActualFee) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ActualFee) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *ActualFee) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Unit) > 0 { - i -= len(m.Unit) - copy(dAtA[i:], m.Unit) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Unit))) - i-- - dAtA[i] = 0x12 - } - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Amount))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DataAvailability) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DataAvailability) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *DataAvailability) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.L1DataGas != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1DataGas)) - i-- - dAtA[i] = 0x10 - } - if m.L1Gas != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.L1Gas)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *StateUpdate) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StateUpdate) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *StateUpdate) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.StateDiff != nil { - size, err := m.StateDiff.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - if len(m.NewRoot) > 0 { - i -= len(m.NewRoot) - copy(dAtA[i:], m.NewRoot) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NewRoot))) - i-- - dAtA[i] = 0x12 - } - if len(m.OldRoot) > 0 { - i -= len(m.OldRoot) - copy(dAtA[i:], m.OldRoot) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OldRoot))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StateDiff) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StateDiff) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *StateDiff) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Nonces) > 0 { - for iNdEx := len(m.Nonces) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Nonces[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - } - if len(m.ReplacedClasses) > 0 { - for iNdEx := len(m.ReplacedClasses) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.ReplacedClasses[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.DeployedContracts) > 0 { - for iNdEx := len(m.DeployedContracts) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.DeployedContracts[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.DeclaredClasses) > 0 { - for iNdEx := len(m.DeclaredClasses) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.DeclaredClasses[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.DeprecatedDeclaredClasses) > 0 { - for iNdEx := len(m.DeprecatedDeclaredClasses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DeprecatedDeclaredClasses[iNdEx]) - copy(dAtA[i:], m.DeprecatedDeclaredClasses[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DeprecatedDeclaredClasses[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.StorageDiffs) > 0 { - for iNdEx := len(m.StorageDiffs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.StorageDiffs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *NonceDiff) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NonceDiff) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *NonceDiff) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x12 - } - if len(m.ContractAddress) > 0 { - i -= len(m.ContractAddress) - copy(dAtA[i:], m.ContractAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ReplacedClass) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ReplacedClass) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *ReplacedClass) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.ContractAddress) > 0 { - i -= len(m.ContractAddress) - copy(dAtA[i:], m.ContractAddress) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContractAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeployedContract) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeployedContract) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *DeployedContract) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeclaredClass) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeclaredClass) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *DeclaredClass) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.CompiledClassHash) > 0 { - i -= len(m.CompiledClassHash) - copy(dAtA[i:], m.CompiledClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CompiledClassHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.ClassHash) > 0 { - i -= len(m.ClassHash) - copy(dAtA[i:], m.ClassHash) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClassHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ContractStorageDiff) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContractStorageDiff) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *ContractStorageDiff) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.StorageEntries) > 0 { - for iNdEx := len(m.StorageEntries) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.StorageEntries[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StorageEntries) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StorageEntries) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *StorageEntries) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Block) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BlockHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ParentHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.BlockNumber != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.BlockNumber)) - } - l = len(m.NewRoot) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Timestamp != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) - } - l = len(m.SequencerAddress) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.L1GasPrice != nil { - l = m.L1GasPrice.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.L1DataGasPrice != nil { - l = m.L1DataGasPrice.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.L1DaMode != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.L1DaMode)) - } - l = len(m.StarknetVersion) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Transactions) > 0 { - for _, e := range m.Transactions { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if m.StateUpdate != nil { - l = m.StateUpdate.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *ResourcePrice) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PriceInFri) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.PriceInWei) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *TransactionWithReceipt) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if vtmsg, ok := m.Transaction.(interface{ SizeVT() int }); ok { - n += vtmsg.SizeVT() - } - if m.Receipt != nil { - l = m.Receipt.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *TransactionWithReceipt_InvokeTransactionV0) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.InvokeTransactionV0 != nil { - l = m.InvokeTransactionV0.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - return n -} -func (m *TransactionWithReceipt_InvokeTransactionV1) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.InvokeTransactionV1 != nil { - l = m.InvokeTransactionV1.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - return n -} -func (m *TransactionWithReceipt_InvokeTransactionV3) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.InvokeTransactionV3 != nil { - l = m.InvokeTransactionV3.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - return n -} -func (m *TransactionWithReceipt_L1HandlerTransaction) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.L1HandlerTransaction != nil { - l = m.L1HandlerTransaction.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - return n -} -func (m *TransactionWithReceipt_DeclareTransactionV0) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DeclareTransactionV0 != nil { - l = m.DeclareTransactionV0.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - return n -} -func (m *TransactionWithReceipt_DeclareTransactionV1) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DeclareTransactionV1 != nil { - l = m.DeclareTransactionV1.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - return n -} -func (m *TransactionWithReceipt_DeclareTransactionV2) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DeclareTransactionV2 != nil { - l = m.DeclareTransactionV2.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - return n -} -func (m *TransactionWithReceipt_DeclareTransactionV3) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DeclareTransactionV3 != nil { - l = m.DeclareTransactionV3.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - return n -} -func (m *TransactionWithReceipt_DeployTransactionV0) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DeployTransactionV0 != nil { - l = m.DeployTransactionV0.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - return n -} -func (m *TransactionWithReceipt_DeployAccountTransactionV1) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DeployAccountTransactionV1 != nil { - l = m.DeployAccountTransactionV1.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - return n -} -func (m *TransactionWithReceipt_DeployAccountTransactionV3) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DeployAccountTransactionV3 != nil { - l = m.DeployAccountTransactionV3.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - return n -} -func (m *TransactionReceipt) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TransactionHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.ActualFee != nil { - l = m.ActualFee.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.ExecutionStatus != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.ExecutionStatus)) - } - l = len(m.RevertReason) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Type != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Type)) - } - l = len(m.MessageHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.MessagesSent) > 0 { - for _, e := range m.MessagesSent { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if m.ExecutionResources != nil { - l = m.ExecutionResources.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ContractAddress) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *MessagesSent) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FromAddress) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ToAddress) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Payload) > 0 { - for _, b := range m.Payload { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *Event) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FromAddress) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Keys) > 0 { - for _, b := range m.Keys { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Data) > 0 { - for _, b := range m.Data { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *ExecutionResources) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Steps != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Steps)) - } - if m.MemoryHoles != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.MemoryHoles)) - } - if m.RangeCheckBuiltinApplications != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.RangeCheckBuiltinApplications)) - } - if m.PedersenBuiltinApplications != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.PedersenBuiltinApplications)) - } - if m.PoseidonBuiltinApplications != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.PoseidonBuiltinApplications)) - } - if m.EcOpBuiltinApplications != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.EcOpBuiltinApplications)) - } - if m.EcdsaBuiltinApplications != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.EcdsaBuiltinApplications)) - } - if m.BitwiseBuiltinApplications != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.BitwiseBuiltinApplications)) - } - if m.KeccakBuiltinApplications != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.KeccakBuiltinApplications)) - } - if m.SegmentArenaBuiltin != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.SegmentArenaBuiltin)) - } - if m.DataAvailability != nil { - l = m.DataAvailability.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *InvokeTransactionV0) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.MaxFee) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Signature) > 0 { - for _, b := range m.Signature { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.ContractAddress) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.EntryPointSelector) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Calldata) > 0 { - for _, b := range m.Calldata { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *InvokeTransactionV1) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.MaxFee) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Signature) > 0 { - for _, b := range m.Signature { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.SenderAddress) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Calldata) > 0 { - for _, b := range m.Calldata { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *InvokeTransactionV3) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SenderAddress) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Calldata) > 0 { - for _, b := range m.Calldata { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.Version) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Signature) > 0 { - for _, b := range m.Signature { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.ResourceBounds != nil { - l = m.ResourceBounds.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Tip) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.PaymasterData) > 0 { - for _, b := range m.PaymasterData { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.AccountDeploymentData) > 0 { - for _, b := range m.AccountDeploymentData { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if m.NonceDataAvailabilityMode != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.NonceDataAvailabilityMode)) - } - if m.FeeDataAvailabilityMode != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.FeeDataAvailabilityMode)) - } - n += len(m.unknownFields) - return n -} - -func (m *L1HandlerTransaction) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Version) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ContractAddress) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.EntryPointSelector) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Calldata) > 0 { - for _, b := range m.Calldata { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *DeclareTransactionV0) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SenderAddress) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.MaxFee) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Signature) > 0 { - for _, b := range m.Signature { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.ClassHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *DeclareTransactionV1) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SenderAddress) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.MaxFee) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Signature) > 0 { - for _, b := range m.Signature { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ClassHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *DeclareTransactionV2) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SenderAddress) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.CompiledClassHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.MaxFee) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Signature) > 0 { - for _, b := range m.Signature { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ClassHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *DeclareTransactionV3) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SenderAddress) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.CompiledClassHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Signature) > 0 { - for _, b := range m.Signature { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ClassHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.ResourceBounds != nil { - l = m.ResourceBounds.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Tip) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.PaymasterData) > 0 { - for _, b := range m.PaymasterData { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.AccountDeploymentData) > 0 { - for _, b := range m.AccountDeploymentData { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if m.NonceDataAvailabilityMode != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.NonceDataAvailabilityMode)) - } - if m.FeeDataAvailabilityMode != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.FeeDataAvailabilityMode)) - } - n += len(m.unknownFields) - return n -} - -func (m *DeployTransactionV0) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClassHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ContractAddressSalt) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.ConstructorCalldata) > 0 { - for _, b := range m.ConstructorCalldata { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *DeployAccountTransactionV1) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.MaxFee) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Signature) > 0 { - for _, b := range m.Signature { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ClassHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ContractAddressSalt) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.ConstructorCalldata) > 0 { - for _, b := range m.ConstructorCalldata { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *DeployAccountTransactionV3) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Version) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Signature) > 0 { - for _, b := range m.Signature { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ContractAddressSalt) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.ConstructorCalldata) > 0 { - for _, b := range m.ConstructorCalldata { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.ClassHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.ResourceBounds != nil { - l = m.ResourceBounds.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Tip) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.PaymasterData) > 0 { - for _, b := range m.PaymasterData { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if m.NonceDataAvailabilityMode != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.NonceDataAvailabilityMode)) - } - if m.FeeDataAvailabilityMode != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.FeeDataAvailabilityMode)) - } - n += len(m.unknownFields) - return n -} - -func (m *ResourceBounds) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.L1Gas != nil { - l = m.L1Gas.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.L2Gas != nil { - l = m.L2Gas.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Resource) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.MaxAmount) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.MaxPricePerUnit) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Receipt) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ActualFee != nil { - l = m.ActualFee.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *ActualFee) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Amount) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Unit) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *DataAvailability) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.L1Gas != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.L1Gas)) - } - if m.L1DataGas != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.L1DataGas)) - } - n += len(m.unknownFields) - return n -} - -func (m *StateUpdate) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OldRoot) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.NewRoot) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.StateDiff != nil { - l = m.StateDiff.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *StateDiff) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.StorageDiffs) > 0 { - for _, e := range m.StorageDiffs { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.DeprecatedDeclaredClasses) > 0 { - for _, b := range m.DeprecatedDeclaredClasses { - l = len(b) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.DeclaredClasses) > 0 { - for _, e := range m.DeclaredClasses { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.DeployedContracts) > 0 { - for _, e := range m.DeployedContracts { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.ReplacedClasses) > 0 { - for _, e := range m.ReplacedClasses { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Nonces) > 0 { - for _, e := range m.Nonces { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *NonceDiff) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ContractAddress) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *ReplacedClass) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ContractAddress) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ClassHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *DeployedContract) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ClassHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *DeclaredClass) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClassHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.CompiledClassHash) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *ContractStorageDiff) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.StorageEntries) > 0 { - for _, e := range m.StorageEntries { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *StorageEntries) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Block) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Block: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockHash = append(m.BlockHash[:0], dAtA[iNdEx:postIndex]...) - if m.BlockHash == nil { - m.BlockHash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ParentHash = append(m.ParentHash[:0], dAtA[iNdEx:postIndex]...) - if m.ParentHash == nil { - m.ParentHash = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) - } - m.BlockNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NewRoot = append(m.NewRoot[:0], dAtA[iNdEx:postIndex]...) - if m.NewRoot == nil { - m.NewRoot = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SequencerAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SequencerAddress = append(m.SequencerAddress[:0], dAtA[iNdEx:postIndex]...) - if m.SequencerAddress == nil { - m.SequencerAddress = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field L1GasPrice", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.L1GasPrice == nil { - m.L1GasPrice = &ResourcePrice{} - } - if err := m.L1GasPrice.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field L1DataGasPrice", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.L1DataGasPrice == nil { - m.L1DataGasPrice = &ResourcePrice{} - } - if err := m.L1DataGasPrice.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1DaMode", wireType) - } - m.L1DaMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.L1DaMode |= L1_DA_MODE(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StarknetVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StarknetVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Transactions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Transactions = append(m.Transactions, &TransactionWithReceipt{}) - if err := m.Transactions[len(m.Transactions)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StateUpdate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StateUpdate == nil { - m.StateUpdate = &StateUpdate{} - } - if err := m.StateUpdate.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourcePrice) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourcePrice: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourcePrice: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PriceInFri", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PriceInFri = append(m.PriceInFri[:0], dAtA[iNdEx:postIndex]...) - if m.PriceInFri == nil { - m.PriceInFri = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PriceInWei", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PriceInWei = append(m.PriceInWei[:0], dAtA[iNdEx:postIndex]...) - if m.PriceInWei == nil { - m.PriceInWei = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionWithReceipt) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TransactionWithReceipt: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionWithReceipt: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV0", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV0); ok { - if err := oneof.InvokeTransactionV0.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &InvokeTransactionV0{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_InvokeTransactionV0{InvokeTransactionV0: v} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV1); ok { - if err := oneof.InvokeTransactionV1.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &InvokeTransactionV1{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_InvokeTransactionV1{InvokeTransactionV1: v} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV3); ok { - if err := oneof.InvokeTransactionV3.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &InvokeTransactionV3{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_InvokeTransactionV3{InvokeTransactionV3: v} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field L1HandlerTransaction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_L1HandlerTransaction); ok { - if err := oneof.L1HandlerTransaction.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &L1HandlerTransaction{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_L1HandlerTransaction{L1HandlerTransaction: v} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV0", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV0); ok { - if err := oneof.DeclareTransactionV0.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &DeclareTransactionV0{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_DeclareTransactionV0{DeclareTransactionV0: v} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV1); ok { - if err := oneof.DeclareTransactionV1.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &DeclareTransactionV1{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_DeclareTransactionV1{DeclareTransactionV1: v} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV2); ok { - if err := oneof.DeclareTransactionV2.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &DeclareTransactionV2{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_DeclareTransactionV2{DeclareTransactionV2: v} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV3); ok { - if err := oneof.DeclareTransactionV3.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &DeclareTransactionV3{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_DeclareTransactionV3{DeclareTransactionV3: v} - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeployTransactionV0", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployTransactionV0); ok { - if err := oneof.DeployTransactionV0.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &DeployTransactionV0{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_DeployTransactionV0{DeployTransactionV0: v} - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeployAccountTransactionV1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV1); ok { - if err := oneof.DeployAccountTransactionV1.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &DeployAccountTransactionV1{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_DeployAccountTransactionV1{DeployAccountTransactionV1: v} - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeployAccountTransactionV3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV3); ok { - if err := oneof.DeployAccountTransactionV3.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &DeployAccountTransactionV3{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_DeployAccountTransactionV3{DeployAccountTransactionV3: v} - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Receipt == nil { - m.Receipt = &TransactionReceipt{} - } - if err := m.Receipt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionReceipt) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TransactionReceipt: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionReceipt: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransactionHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TransactionHash = append(m.TransactionHash[:0], dAtA[iNdEx:postIndex]...) - if m.TransactionHash == nil { - m.TransactionHash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActualFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ActualFee == nil { - m.ActualFee = &ActualFee{} - } - if err := m.ActualFee.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutionStatus", wireType) - } - m.ExecutionStatus = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExecutionStatus |= EXECUTION_STATUS(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RevertReason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RevertReason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= TRANSACTION_TYPE(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MessageHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MessageHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MessagesSent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MessagesSent = append(m.MessagesSent, &MessagesSent{}) - if err := m.MessagesSent[len(m.MessagesSent)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, &Event{}) - if err := m.Events[len(m.Events)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutionResources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutionResources == nil { - m.ExecutionResources = &ExecutionResources{} - } - if err := m.ExecutionResources.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddress = append(m.ContractAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ContractAddress == nil { - m.ContractAddress = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MessagesSent) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MessagesSent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MessagesSent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) - if m.FromAddress == nil { - m.FromAddress = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ToAddress == nil { - m.ToAddress = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload, make([]byte, postIndex-iNdEx)) - copy(m.Payload[len(m.Payload)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Event) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) - if m.FromAddress == nil { - m.FromAddress = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Keys = append(m.Keys, make([]byte, postIndex-iNdEx)) - copy(m.Keys[len(m.Keys)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data, make([]byte, postIndex-iNdEx)) - copy(m.Data[len(m.Data)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExecutionResources) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExecutionResources: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExecutionResources: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Steps", wireType) - } - m.Steps = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Steps |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemoryHoles", wireType) - } - m.MemoryHoles = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MemoryHoles |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RangeCheckBuiltinApplications", wireType) - } - m.RangeCheckBuiltinApplications = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RangeCheckBuiltinApplications |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PedersenBuiltinApplications", wireType) - } - m.PedersenBuiltinApplications = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PedersenBuiltinApplications |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PoseidonBuiltinApplications", wireType) - } - m.PoseidonBuiltinApplications = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PoseidonBuiltinApplications |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EcOpBuiltinApplications", wireType) - } - m.EcOpBuiltinApplications = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EcOpBuiltinApplications |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EcdsaBuiltinApplications", wireType) - } - m.EcdsaBuiltinApplications = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EcdsaBuiltinApplications |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BitwiseBuiltinApplications", wireType) - } - m.BitwiseBuiltinApplications = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BitwiseBuiltinApplications |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field KeccakBuiltinApplications", wireType) - } - m.KeccakBuiltinApplications = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.KeccakBuiltinApplications |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SegmentArenaBuiltin", wireType) - } - m.SegmentArenaBuiltin = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SegmentArenaBuiltin |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataAvailability", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DataAvailability == nil { - m.DataAvailability = &DataAvailability{} - } - if err := m.DataAvailability.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InvokeTransactionV0) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InvokeTransactionV0: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InvokeTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) - if m.MaxFee == nil { - m.MaxFee = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) - copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddress = append(m.ContractAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ContractAddress == nil { - m.ContractAddress = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EntryPointSelector", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EntryPointSelector = append(m.EntryPointSelector[:0], dAtA[iNdEx:postIndex]...) - if m.EntryPointSelector == nil { - m.EntryPointSelector = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Calldata = append(m.Calldata, make([]byte, postIndex-iNdEx)) - copy(m.Calldata[len(m.Calldata)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InvokeTransactionV1) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InvokeTransactionV1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InvokeTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) - if m.MaxFee == nil { - m.MaxFee = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) - copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) - if m.Nonce == nil { - m.Nonce = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) - if m.SenderAddress == nil { - m.SenderAddress = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Calldata = append(m.Calldata, make([]byte, postIndex-iNdEx)) - copy(m.Calldata[len(m.Calldata)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InvokeTransactionV3) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InvokeTransactionV3: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InvokeTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) - if m.SenderAddress == nil { - m.SenderAddress = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Calldata = append(m.Calldata, make([]byte, postIndex-iNdEx)) - copy(m.Calldata[len(m.Calldata)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) - copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) - if m.Nonce == nil { - m.Nonce = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResourceBounds == nil { - m.ResourceBounds = &ResourceBounds{} - } - if err := m.ResourceBounds.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tip = append(m.Tip[:0], dAtA[iNdEx:postIndex]...) - if m.Tip == nil { - m.Tip = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PaymasterData = append(m.PaymasterData, make([]byte, postIndex-iNdEx)) - copy(m.PaymasterData[len(m.PaymasterData)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountDeploymentData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccountDeploymentData = append(m.AccountDeploymentData, make([]byte, postIndex-iNdEx)) - copy(m.AccountDeploymentData[len(m.AccountDeploymentData)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) - } - m.NonceDataAvailabilityMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) - } - m.FeeDataAvailabilityMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *L1HandlerTransaction) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: L1HandlerTransaction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: L1HandlerTransaction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddress = append(m.ContractAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ContractAddress == nil { - m.ContractAddress = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EntryPointSelector", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EntryPointSelector = append(m.EntryPointSelector[:0], dAtA[iNdEx:postIndex]...) - if m.EntryPointSelector == nil { - m.EntryPointSelector = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Calldata = append(m.Calldata, make([]byte, postIndex-iNdEx)) - copy(m.Calldata[len(m.Calldata)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeclareTransactionV0) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeclareTransactionV0: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeclareTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) - if m.SenderAddress == nil { - m.SenderAddress = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) - if m.MaxFee == nil { - m.MaxFee = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) - copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) - if m.ClassHash == nil { - m.ClassHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeclareTransactionV1) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeclareTransactionV1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeclareTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) - if m.SenderAddress == nil { - m.SenderAddress = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) - if m.MaxFee == nil { - m.MaxFee = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) - copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) - if m.Nonce == nil { - m.Nonce = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) - if m.ClassHash == nil { - m.ClassHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeclareTransactionV2) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeclareTransactionV2: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeclareTransactionV2: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) - if m.SenderAddress == nil { - m.SenderAddress = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CompiledClassHash = append(m.CompiledClassHash[:0], dAtA[iNdEx:postIndex]...) - if m.CompiledClassHash == nil { - m.CompiledClassHash = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) - if m.MaxFee == nil { - m.MaxFee = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) - copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) - if m.Nonce == nil { - m.Nonce = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) - if m.ClassHash == nil { - m.ClassHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeclareTransactionV3) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeclareTransactionV3: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeclareTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SenderAddress = append(m.SenderAddress[:0], dAtA[iNdEx:postIndex]...) - if m.SenderAddress == nil { - m.SenderAddress = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CompiledClassHash = append(m.CompiledClassHash[:0], dAtA[iNdEx:postIndex]...) - if m.CompiledClassHash == nil { - m.CompiledClassHash = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) - copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) - if m.Nonce == nil { - m.Nonce = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) - if m.ClassHash == nil { - m.ClassHash = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResourceBounds == nil { - m.ResourceBounds = &ResourceBounds{} - } - if err := m.ResourceBounds.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tip = append(m.Tip[:0], dAtA[iNdEx:postIndex]...) - if m.Tip == nil { - m.Tip = []byte{} - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PaymasterData = append(m.PaymasterData, make([]byte, postIndex-iNdEx)) - copy(m.PaymasterData[len(m.PaymasterData)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountDeploymentData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccountDeploymentData = append(m.AccountDeploymentData, make([]byte, postIndex-iNdEx)) - copy(m.AccountDeploymentData[len(m.AccountDeploymentData)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) - } - m.NonceDataAvailabilityMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) - } - m.FeeDataAvailabilityMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeployTransactionV0) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeployTransactionV0: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeployTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) - if m.ClassHash == nil { - m.ClassHash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddressSalt = append(m.ContractAddressSalt[:0], dAtA[iNdEx:postIndex]...) - if m.ContractAddressSalt == nil { - m.ContractAddressSalt = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConstructorCalldata = append(m.ConstructorCalldata, make([]byte, postIndex-iNdEx)) - copy(m.ConstructorCalldata[len(m.ConstructorCalldata)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeployAccountTransactionV1) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeployAccountTransactionV1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeployAccountTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxFee = append(m.MaxFee[:0], dAtA[iNdEx:postIndex]...) - if m.MaxFee == nil { - m.MaxFee = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) - copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) - if m.Nonce == nil { - m.Nonce = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) - if m.ClassHash == nil { - m.ClassHash = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddressSalt = append(m.ContractAddressSalt[:0], dAtA[iNdEx:postIndex]...) - if m.ContractAddressSalt == nil { - m.ContractAddressSalt = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConstructorCalldata = append(m.ConstructorCalldata, make([]byte, postIndex-iNdEx)) - copy(m.ConstructorCalldata[len(m.ConstructorCalldata)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeployAccountTransactionV3) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeployAccountTransactionV3: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeployAccountTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, make([]byte, postIndex-iNdEx)) - copy(m.Signature[len(m.Signature)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) - if m.Nonce == nil { - m.Nonce = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddressSalt = append(m.ContractAddressSalt[:0], dAtA[iNdEx:postIndex]...) - if m.ContractAddressSalt == nil { - m.ContractAddressSalt = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConstructorCalldata = append(m.ConstructorCalldata, make([]byte, postIndex-iNdEx)) - copy(m.ConstructorCalldata[len(m.ConstructorCalldata)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) - if m.ClassHash == nil { - m.ClassHash = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResourceBounds == nil { - m.ResourceBounds = &ResourceBounds{} - } - if err := m.ResourceBounds.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tip = append(m.Tip[:0], dAtA[iNdEx:postIndex]...) - if m.Tip == nil { - m.Tip = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PaymasterData = append(m.PaymasterData, make([]byte, postIndex-iNdEx)) - copy(m.PaymasterData[len(m.PaymasterData)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) - } - m.NonceDataAvailabilityMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) - } - m.FeeDataAvailabilityMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceBounds) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceBounds: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceBounds: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field L1Gas", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.L1Gas == nil { - m.L1Gas = &Resource{} - } - if err := m.L1Gas.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field L2Gas", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.L2Gas == nil { - m.L2Gas = &Resource{} - } - if err := m.L2Gas.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Resource) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Resource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxPricePerUnit", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxPricePerUnit = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Receipt) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Receipt: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Receipt: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActualFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ActualFee == nil { - m.ActualFee = &ActualFee{} - } - if err := m.ActualFee.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActualFee) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ActualFee: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActualFee: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Amount = append(m.Amount[:0], dAtA[iNdEx:postIndex]...) - if m.Amount == nil { - m.Amount = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Unit = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DataAvailability) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DataAvailability: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DataAvailability: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1Gas", wireType) - } - m.L1Gas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.L1Gas |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1DataGas", wireType) - } - m.L1DataGas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.L1DataGas |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StateUpdate) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StateUpdate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StateUpdate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OldRoot = append(m.OldRoot[:0], dAtA[iNdEx:postIndex]...) - if m.OldRoot == nil { - m.OldRoot = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NewRoot = append(m.NewRoot[:0], dAtA[iNdEx:postIndex]...) - if m.NewRoot == nil { - m.NewRoot = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StateDiff", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StateDiff == nil { - m.StateDiff = &StateDiff{} - } - if err := m.StateDiff.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StateDiff) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StateDiff: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StateDiff: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageDiffs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StorageDiffs = append(m.StorageDiffs, &ContractStorageDiff{}) - if err := m.StorageDiffs[len(m.StorageDiffs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedDeclaredClasses", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeprecatedDeclaredClasses = append(m.DeprecatedDeclaredClasses, make([]byte, postIndex-iNdEx)) - copy(m.DeprecatedDeclaredClasses[len(m.DeprecatedDeclaredClasses)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeclaredClasses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeclaredClasses = append(m.DeclaredClasses, &DeclaredClass{}) - if err := m.DeclaredClasses[len(m.DeclaredClasses)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeployedContracts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeployedContracts = append(m.DeployedContracts, &DeployedContract{}) - if err := m.DeployedContracts[len(m.DeployedContracts)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReplacedClasses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ReplacedClasses = append(m.ReplacedClasses, &ReplacedClass{}) - if err := m.ReplacedClasses[len(m.ReplacedClasses)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonces", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonces = append(m.Nonces, &NonceDiff{}) - if err := m.Nonces[len(m.Nonces)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NonceDiff) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NonceDiff: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NonceDiff: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddress = append(m.ContractAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ContractAddress == nil { - m.ContractAddress = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) - if m.Nonce == nil { - m.Nonce = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ReplacedClass) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ReplacedClass: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ReplacedClass: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddress = append(m.ContractAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ContractAddress == nil { - m.ContractAddress = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) - if m.ClassHash == nil { - m.ClassHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeployedContract) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeployedContract: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeployedContract: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) - if m.ClassHash == nil { - m.ClassHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeclaredClass) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeclaredClass: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeclaredClass: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = append(m.ClassHash[:0], dAtA[iNdEx:postIndex]...) - if m.ClassHash == nil { - m.ClassHash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CompiledClassHash = append(m.CompiledClassHash[:0], dAtA[iNdEx:postIndex]...) - if m.CompiledClassHash == nil { - m.CompiledClassHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContractStorageDiff) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ContractStorageDiff: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractStorageDiff: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageEntries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StorageEntries = append(m.StorageEntries, &StorageEntries{}) - if err := m.StorageEntries[len(m.StorageEntries)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StorageEntries) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StorageEntries: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StorageEntries: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Block) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Block: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ParentHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) - } - m.BlockNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NewRoot = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SequencerAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SequencerAddress = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field L1GasPrice", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.L1GasPrice == nil { - m.L1GasPrice = &ResourcePrice{} - } - if err := m.L1GasPrice.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field L1DataGasPrice", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.L1DataGasPrice == nil { - m.L1DataGasPrice = &ResourcePrice{} - } - if err := m.L1DataGasPrice.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1DaMode", wireType) - } - m.L1DaMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.L1DaMode |= L1_DA_MODE(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StarknetVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.StarknetVersion = stringValue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Transactions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Transactions = append(m.Transactions, &TransactionWithReceipt{}) - if err := m.Transactions[len(m.Transactions)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StateUpdate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StateUpdate == nil { - m.StateUpdate = &StateUpdate{} - } - if err := m.StateUpdate.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourcePrice) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourcePrice: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourcePrice: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PriceInFri", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PriceInFri = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PriceInWei", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PriceInWei = dAtA[iNdEx:postIndex] - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionWithReceipt) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TransactionWithReceipt: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionWithReceipt: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV0", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV0); ok { - if err := oneof.InvokeTransactionV0.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &InvokeTransactionV0{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_InvokeTransactionV0{InvokeTransactionV0: v} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV1); ok { - if err := oneof.InvokeTransactionV1.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &InvokeTransactionV1{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_InvokeTransactionV1{InvokeTransactionV1: v} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvokeTransactionV3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_InvokeTransactionV3); ok { - if err := oneof.InvokeTransactionV3.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &InvokeTransactionV3{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_InvokeTransactionV3{InvokeTransactionV3: v} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field L1HandlerTransaction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_L1HandlerTransaction); ok { - if err := oneof.L1HandlerTransaction.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &L1HandlerTransaction{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_L1HandlerTransaction{L1HandlerTransaction: v} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV0", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV0); ok { - if err := oneof.DeclareTransactionV0.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &DeclareTransactionV0{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_DeclareTransactionV0{DeclareTransactionV0: v} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV1); ok { - if err := oneof.DeclareTransactionV1.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &DeclareTransactionV1{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_DeclareTransactionV1{DeclareTransactionV1: v} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV2); ok { - if err := oneof.DeclareTransactionV2.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &DeclareTransactionV2{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_DeclareTransactionV2{DeclareTransactionV2: v} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeclareTransactionV3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeclareTransactionV3); ok { - if err := oneof.DeclareTransactionV3.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &DeclareTransactionV3{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_DeclareTransactionV3{DeclareTransactionV3: v} - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeployTransactionV0", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployTransactionV0); ok { - if err := oneof.DeployTransactionV0.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &DeployTransactionV0{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_DeployTransactionV0{DeployTransactionV0: v} - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeployAccountTransactionV1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV1); ok { - if err := oneof.DeployAccountTransactionV1.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &DeployAccountTransactionV1{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_DeployAccountTransactionV1{DeployAccountTransactionV1: v} - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeployAccountTransactionV3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Transaction.(*TransactionWithReceipt_DeployAccountTransactionV3); ok { - if err := oneof.DeployAccountTransactionV3.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &DeployAccountTransactionV3{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Transaction = &TransactionWithReceipt_DeployAccountTransactionV3{DeployAccountTransactionV3: v} - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Receipt == nil { - m.Receipt = &TransactionReceipt{} - } - if err := m.Receipt.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionReceipt) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TransactionReceipt: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionReceipt: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransactionHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TransactionHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActualFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ActualFee == nil { - m.ActualFee = &ActualFee{} - } - if err := m.ActualFee.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutionStatus", wireType) - } - m.ExecutionStatus = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExecutionStatus |= EXECUTION_STATUS(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RevertReason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.RevertReason = stringValue - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= TRANSACTION_TYPE(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MessageHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.MessageHash = stringValue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MessagesSent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MessagesSent = append(m.MessagesSent, &MessagesSent{}) - if err := m.MessagesSent[len(m.MessagesSent)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, &Event{}) - if err := m.Events[len(m.Events)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutionResources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutionResources == nil { - m.ExecutionResources = &ExecutionResources{} - } - if err := m.ExecutionResources.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddress = dAtA[iNdEx:postIndex] - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MessagesSent) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MessagesSent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MessagesSent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FromAddress = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ToAddress = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Event) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FromAddress = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Keys = append(m.Keys, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExecutionResources) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExecutionResources: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExecutionResources: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Steps", wireType) - } - m.Steps = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Steps |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemoryHoles", wireType) - } - m.MemoryHoles = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MemoryHoles |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RangeCheckBuiltinApplications", wireType) - } - m.RangeCheckBuiltinApplications = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RangeCheckBuiltinApplications |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PedersenBuiltinApplications", wireType) - } - m.PedersenBuiltinApplications = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PedersenBuiltinApplications |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PoseidonBuiltinApplications", wireType) - } - m.PoseidonBuiltinApplications = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PoseidonBuiltinApplications |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EcOpBuiltinApplications", wireType) - } - m.EcOpBuiltinApplications = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EcOpBuiltinApplications |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EcdsaBuiltinApplications", wireType) - } - m.EcdsaBuiltinApplications = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EcdsaBuiltinApplications |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BitwiseBuiltinApplications", wireType) - } - m.BitwiseBuiltinApplications = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BitwiseBuiltinApplications |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field KeccakBuiltinApplications", wireType) - } - m.KeccakBuiltinApplications = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.KeccakBuiltinApplications |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SegmentArenaBuiltin", wireType) - } - m.SegmentArenaBuiltin = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SegmentArenaBuiltin |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataAvailability", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DataAvailability == nil { - m.DataAvailability = &DataAvailability{} - } - if err := m.DataAvailability.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InvokeTransactionV0) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InvokeTransactionV0: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InvokeTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxFee = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Version = stringValue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddress = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EntryPointSelector", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EntryPointSelector = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Calldata = append(m.Calldata, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InvokeTransactionV1) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InvokeTransactionV1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InvokeTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxFee = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Version = stringValue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SenderAddress = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Calldata = append(m.Calldata, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InvokeTransactionV3) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InvokeTransactionV3: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InvokeTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SenderAddress = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Calldata = append(m.Calldata, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Version = stringValue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResourceBounds == nil { - m.ResourceBounds = &ResourceBounds{} - } - if err := m.ResourceBounds.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tip = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PaymasterData = append(m.PaymasterData, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountDeploymentData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccountDeploymentData = append(m.AccountDeploymentData, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) - } - m.NonceDataAvailabilityMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) - } - m.FeeDataAvailabilityMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *L1HandlerTransaction) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: L1HandlerTransaction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: L1HandlerTransaction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Version = stringValue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Nonce = stringValue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddress = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EntryPointSelector", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EntryPointSelector = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Calldata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Calldata = append(m.Calldata, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeclareTransactionV0) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeclareTransactionV0: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeclareTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SenderAddress = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxFee = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Version = stringValue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeclareTransactionV1) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeclareTransactionV1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeclareTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SenderAddress = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxFee = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Version = stringValue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeclareTransactionV2) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeclareTransactionV2: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeclareTransactionV2: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SenderAddress = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CompiledClassHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxFee = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Version = stringValue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeclareTransactionV3) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeclareTransactionV3: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeclareTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SenderAddress = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CompiledClassHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Version = stringValue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResourceBounds == nil { - m.ResourceBounds = &ResourceBounds{} - } - if err := m.ResourceBounds.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tip = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PaymasterData = append(m.PaymasterData, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountDeploymentData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccountDeploymentData = append(m.AccountDeploymentData, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) - } - m.NonceDataAvailabilityMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) - } - m.FeeDataAvailabilityMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeployTransactionV0) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeployTransactionV0: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeployTransactionV0: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Version = stringValue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddressSalt = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConstructorCalldata = append(m.ConstructorCalldata, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeployAccountTransactionV1) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeployAccountTransactionV1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeployAccountTransactionV1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxFee", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxFee = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Version = stringValue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddressSalt = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConstructorCalldata = append(m.ConstructorCalldata, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeployAccountTransactionV3) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeployAccountTransactionV3: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeployAccountTransactionV3: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Version = stringValue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddressSalt", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddressSalt = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConstructorCalldata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConstructorCalldata = append(m.ConstructorCalldata, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceBounds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResourceBounds == nil { - m.ResourceBounds = &ResourceBounds{} - } - if err := m.ResourceBounds.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tip = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PaymasterData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PaymasterData = append(m.PaymasterData, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NonceDataAvailabilityMode", wireType) - } - m.NonceDataAvailabilityMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NonceDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeDataAvailabilityMode", wireType) - } - m.FeeDataAvailabilityMode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FeeDataAvailabilityMode |= FEE_DATA_AVAILABILITY_MODE(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceBounds) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceBounds: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceBounds: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field L1Gas", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.L1Gas == nil { - m.L1Gas = &Resource{} - } - if err := m.L1Gas.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field L2Gas", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.L2Gas == nil { - m.L2Gas = &Resource{} - } - if err := m.L2Gas.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Resource) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Resource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.MaxAmount = stringValue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxPricePerUnit", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.MaxPricePerUnit = stringValue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Receipt) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Receipt: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Receipt: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActualFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ActualFee == nil { - m.ActualFee = &ActualFee{} - } - if err := m.ActualFee.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActualFee) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ActualFee: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActualFee: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Amount = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Unit = stringValue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DataAvailability) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DataAvailability: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DataAvailability: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1Gas", wireType) - } - m.L1Gas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.L1Gas |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1DataGas", wireType) - } - m.L1DataGas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.L1DataGas |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StateUpdate) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StateUpdate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StateUpdate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OldRoot = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewRoot", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NewRoot = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StateDiff", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StateDiff == nil { - m.StateDiff = &StateDiff{} - } - if err := m.StateDiff.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StateDiff) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StateDiff: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StateDiff: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageDiffs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StorageDiffs = append(m.StorageDiffs, &ContractStorageDiff{}) - if err := m.StorageDiffs[len(m.StorageDiffs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedDeclaredClasses", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeprecatedDeclaredClasses = append(m.DeprecatedDeclaredClasses, dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeclaredClasses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeclaredClasses = append(m.DeclaredClasses, &DeclaredClass{}) - if err := m.DeclaredClasses[len(m.DeclaredClasses)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeployedContracts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeployedContracts = append(m.DeployedContracts, &DeployedContract{}) - if err := m.DeployedContracts[len(m.DeployedContracts)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReplacedClasses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ReplacedClasses = append(m.ReplacedClasses, &ReplacedClass{}) - if err := m.ReplacedClasses[len(m.ReplacedClasses)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonces", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonces = append(m.Nonces, &NonceDiff{}) - if err := m.Nonces[len(m.Nonces)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NonceDiff) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NonceDiff: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NonceDiff: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddress = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = dAtA[iNdEx:postIndex] - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ReplacedClass) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ReplacedClass: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ReplacedClass: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddress = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeployedContract) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeployedContract: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeployedContract: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeclaredClass) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeclaredClass: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeclaredClass: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompiledClassHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CompiledClassHash = dAtA[iNdEx:postIndex] - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContractStorageDiff) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ContractStorageDiff: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractStorageDiff: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageEntries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StorageEntries = append(m.StorageEntries, &StorageEntries{}) - if err := m.StorageEntries[len(m.StorageEntries)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StorageEntries) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StorageEntries: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StorageEntries: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = dAtA[iNdEx:postIndex] - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = dAtA[iNdEx:postIndex] - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} diff --git a/starket-common/pb/sf/substreams/index/v1/keys.pb.go b/starket-common/pb/sf/substreams/index/v1/keys.pb.go deleted file mode 100644 index 39248e4..0000000 --- a/starket-common/pb/sf/substreams/index/v1/keys.pb.go +++ /dev/null @@ -1,159 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: sf/substreams/index/v1/keys.proto - -package indexv1 - -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) -) - -type Keys struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` -} - -func (x *Keys) Reset() { - *x = Keys{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_substreams_index_v1_keys_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Keys) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Keys) ProtoMessage() {} - -func (x *Keys) ProtoReflect() protoreflect.Message { - mi := &file_sf_substreams_index_v1_keys_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 Keys.ProtoReflect.Descriptor instead. -func (*Keys) Descriptor() ([]byte, []int) { - return file_sf_substreams_index_v1_keys_proto_rawDescGZIP(), []int{0} -} - -func (x *Keys) GetKeys() []string { - if x != nil { - return x.Keys - } - return nil -} - -var File_sf_substreams_index_v1_keys_proto protoreflect.FileDescriptor - -var file_sf_substreams_index_v1_keys_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x73, 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x76, 0x31, 0x22, 0x1a, 0x0a, 0x04, 0x4b, - 0x65, 0x79, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x42, 0x8d, 0x02, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, - 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x4b, 0x65, 0x79, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x69, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, 0x2f, 0x73, 0x75, - 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2d, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x2f, - 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x53, 0x53, 0x49, 0xaa, 0x02, 0x16, 0x53, 0x66, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x16, - 0x53, 0x66, 0x5c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x22, 0x53, 0x66, 0x5c, 0x53, 0x75, 0x62, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x53, 0x66, - 0x3a, 0x3a, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x3a, 0x3a, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_sf_substreams_index_v1_keys_proto_rawDescOnce sync.Once - file_sf_substreams_index_v1_keys_proto_rawDescData = file_sf_substreams_index_v1_keys_proto_rawDesc -) - -func file_sf_substreams_index_v1_keys_proto_rawDescGZIP() []byte { - file_sf_substreams_index_v1_keys_proto_rawDescOnce.Do(func() { - file_sf_substreams_index_v1_keys_proto_rawDescData = protoimpl.X.CompressGZIP(file_sf_substreams_index_v1_keys_proto_rawDescData) - }) - return file_sf_substreams_index_v1_keys_proto_rawDescData -} - -var file_sf_substreams_index_v1_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_sf_substreams_index_v1_keys_proto_goTypes = []interface{}{ - (*Keys)(nil), // 0: sf.substreams.index.v1.Keys -} -var file_sf_substreams_index_v1_keys_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_sf_substreams_index_v1_keys_proto_init() } -func file_sf_substreams_index_v1_keys_proto_init() { - if File_sf_substreams_index_v1_keys_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_sf_substreams_index_v1_keys_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Keys); 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_sf_substreams_index_v1_keys_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_sf_substreams_index_v1_keys_proto_goTypes, - DependencyIndexes: file_sf_substreams_index_v1_keys_proto_depIdxs, - MessageInfos: file_sf_substreams_index_v1_keys_proto_msgTypes, - }.Build() - File_sf_substreams_index_v1_keys_proto = out.File - file_sf_substreams_index_v1_keys_proto_rawDesc = nil - file_sf_substreams_index_v1_keys_proto_goTypes = nil - file_sf_substreams_index_v1_keys_proto_depIdxs = nil -} diff --git a/starket-common/pb/sf/substreams/index/v1/keys_vtproto.pb.go b/starket-common/pb/sf/substreams/index/v1/keys_vtproto.pb.go deleted file mode 100644 index c765d9a..0000000 --- a/starket-common/pb/sf/substreams/index/v1/keys_vtproto.pb.go +++ /dev/null @@ -1,338 +0,0 @@ -// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.6.0 -// source: sf/substreams/index/v1/keys.proto - -package indexv1 - -import ( - fmt "fmt" - protohelpers "github.com/planetscale/vtprotobuf/protohelpers" - proto "google.golang.org/protobuf/proto" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - unsafe "unsafe" -) - -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) -) - -func (m *Keys) CloneVT() *Keys { - if m == nil { - return (*Keys)(nil) - } - r := new(Keys) - if rhs := m.Keys; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Keys = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Keys) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (this *Keys) EqualVT(that *Keys) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if len(this.Keys) != len(that.Keys) { - return false - } - for i, vx := range this.Keys { - vy := that.Keys[i] - if vx != vy { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Keys) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Keys) - if !ok { - return false - } - return this.EqualVT(that) -} -func (m *Keys) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Keys) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Keys) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Keys) > 0 { - for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Keys[iNdEx]) - copy(dAtA[i:], m.Keys[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Keys[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Keys) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Keys) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Keys) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Keys) > 0 { - for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Keys[iNdEx]) - copy(dAtA[i:], m.Keys[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Keys[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Keys) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Keys) > 0 { - for _, s := range m.Keys { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *Keys) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Keys: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Keys: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Keys = append(m.Keys, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Keys) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Keys: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Keys: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Keys = append(m.Keys, stringValue) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} diff --git a/starket-common/pb/sf/substreams/starknet/type/v1/starknet.pb.go b/starket-common/pb/sf/substreams/starknet/type/v1/starknet.pb.go deleted file mode 100644 index b1ce8be..0000000 --- a/starket-common/pb/sf/substreams/starknet/type/v1/starknet.pb.go +++ /dev/null @@ -1,194 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: sf/substreams/starknet/type/v1/starknet.proto - -package typev1 - -import ( - v11 "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/starknet/type/v1" - _ "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/index/v1" - v1 "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/v1" - 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) -) - -type Transactions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Clock *v1.Clock `protobuf:"bytes,1,opt,name=clock,proto3" json:"clock,omitempty"` - TransactionsWithReceipt []*v11.TransactionWithReceipt `protobuf:"bytes,2,rep,name=transactions_with_receipt,json=transactionsWithReceipt,proto3" json:"transactions_with_receipt,omitempty"` -} - -func (x *Transactions) Reset() { - *x = Transactions{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_substreams_starknet_type_v1_starknet_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transactions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transactions) ProtoMessage() {} - -func (x *Transactions) ProtoReflect() protoreflect.Message { - mi := &file_sf_substreams_starknet_type_v1_starknet_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 Transactions.ProtoReflect.Descriptor instead. -func (*Transactions) Descriptor() ([]byte, []int) { - return file_sf_substreams_starknet_type_v1_starknet_proto_rawDescGZIP(), []int{0} -} - -func (x *Transactions) GetClock() *v1.Clock { - if x != nil { - return x.Clock - } - return nil -} - -func (x *Transactions) GetTransactionsWithReceipt() []*v11.TransactionWithReceipt { - if x != nil { - return x.TransactionsWithReceipt - } - return nil -} - -var File_sf_substreams_starknet_type_v1_starknet_proto protoreflect.FileDescriptor - -var file_sf_substreams_starknet_type_v1_starknet_proto_rawDesc = []byte{ - 0x0a, 0x2d, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x1e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x73, - 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x1a, - 0x1f, 0x73, 0x66, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xa6, 0x01, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x67, 0x0a, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, - 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, - 0x74, 0x52, 0x17, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x57, - 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x42, 0xc2, 0x02, 0x0a, 0x22, 0x63, - 0x6f, 0x6d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, - 0x2e, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x31, 0x42, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x70, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, 0x2f, 0x73, 0x75, 0x62, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2d, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x2d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x2f, 0x73, - 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x79, - 0x70, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x53, 0x53, 0x53, 0x54, 0xaa, 0x02, 0x1e, 0x53, 0x66, - 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x72, - 0x6b, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1e, 0x53, - 0x66, 0x5c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x53, 0x74, 0x61, - 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x2a, - 0x53, 0x66, 0x5c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x53, 0x74, - 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x22, 0x53, 0x66, 0x3a, - 0x3a, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x61, - 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_sf_substreams_starknet_type_v1_starknet_proto_rawDescOnce sync.Once - file_sf_substreams_starknet_type_v1_starknet_proto_rawDescData = file_sf_substreams_starknet_type_v1_starknet_proto_rawDesc -) - -func file_sf_substreams_starknet_type_v1_starknet_proto_rawDescGZIP() []byte { - file_sf_substreams_starknet_type_v1_starknet_proto_rawDescOnce.Do(func() { - file_sf_substreams_starknet_type_v1_starknet_proto_rawDescData = protoimpl.X.CompressGZIP(file_sf_substreams_starknet_type_v1_starknet_proto_rawDescData) - }) - return file_sf_substreams_starknet_type_v1_starknet_proto_rawDescData -} - -var file_sf_substreams_starknet_type_v1_starknet_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_sf_substreams_starknet_type_v1_starknet_proto_goTypes = []interface{}{ - (*Transactions)(nil), // 0: sf.substreams.starknet.type.v1.Transactions - (*v1.Clock)(nil), // 1: sf.substreams.v1.Clock - (*v11.TransactionWithReceipt)(nil), // 2: sf.starknet.type.v1.TransactionWithReceipt -} -var file_sf_substreams_starknet_type_v1_starknet_proto_depIdxs = []int32{ - 1, // 0: sf.substreams.starknet.type.v1.Transactions.clock:type_name -> sf.substreams.v1.Clock - 2, // 1: sf.substreams.starknet.type.v1.Transactions.transactions_with_receipt:type_name -> sf.starknet.type.v1.TransactionWithReceipt - 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_sf_substreams_starknet_type_v1_starknet_proto_init() } -func file_sf_substreams_starknet_type_v1_starknet_proto_init() { - if File_sf_substreams_starknet_type_v1_starknet_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_sf_substreams_starknet_type_v1_starknet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Transactions); 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_sf_substreams_starknet_type_v1_starknet_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_sf_substreams_starknet_type_v1_starknet_proto_goTypes, - DependencyIndexes: file_sf_substreams_starknet_type_v1_starknet_proto_depIdxs, - MessageInfos: file_sf_substreams_starknet_type_v1_starknet_proto_msgTypes, - }.Build() - File_sf_substreams_starknet_type_v1_starknet_proto = out.File - file_sf_substreams_starknet_type_v1_starknet_proto_rawDesc = nil - file_sf_substreams_starknet_type_v1_starknet_proto_goTypes = nil - file_sf_substreams_starknet_type_v1_starknet_proto_depIdxs = nil -} diff --git a/starket-common/pb/sf/substreams/starknet/type/v1/starknet_vtproto.pb.go b/starket-common/pb/sf/substreams/starknet/type/v1/starknet_vtproto.pb.go deleted file mode 100644 index 8348422..0000000 --- a/starket-common/pb/sf/substreams/starknet/type/v1/starknet_vtproto.pb.go +++ /dev/null @@ -1,455 +0,0 @@ -// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.6.0 -// source: sf/substreams/starknet/type/v1/starknet.proto - -package typev1 - -import ( - fmt "fmt" - protohelpers "github.com/planetscale/vtprotobuf/protohelpers" - v1 "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/starknet/type/v1" - v11 "github.com/streamingfast/substreams-foundational-modules/starket-common/pb/sf/substreams/v1" - proto "google.golang.org/protobuf/proto" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" -) - -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) -) - -func (m *Transactions) CloneVT() *Transactions { - if m == nil { - return (*Transactions)(nil) - } - r := new(Transactions) - r.Clock = m.Clock.CloneVT() - if rhs := m.TransactionsWithReceipt; rhs != nil { - tmpContainer := make([]*v1.TransactionWithReceipt, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.TransactionsWithReceipt = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Transactions) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (this *Transactions) EqualVT(that *Transactions) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if !this.Clock.EqualVT(that.Clock) { - return false - } - if len(this.TransactionsWithReceipt) != len(that.TransactionsWithReceipt) { - return false - } - for i, vx := range this.TransactionsWithReceipt { - vy := that.TransactionsWithReceipt[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &v1.TransactionWithReceipt{} - } - if q == nil { - q = &v1.TransactionWithReceipt{} - } - if !p.EqualVT(q) { - return false - } - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Transactions) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Transactions) - if !ok { - return false - } - return this.EqualVT(that) -} -func (m *Transactions) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Transactions) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Transactions) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.TransactionsWithReceipt) > 0 { - for iNdEx := len(m.TransactionsWithReceipt) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.TransactionsWithReceipt[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - } - if m.Clock != nil { - size, err := m.Clock.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Transactions) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Transactions) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Transactions) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.TransactionsWithReceipt) > 0 { - for iNdEx := len(m.TransactionsWithReceipt) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.TransactionsWithReceipt[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - } - if m.Clock != nil { - size, err := m.Clock.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Transactions) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Clock != nil { - l = m.Clock.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.TransactionsWithReceipt) > 0 { - for _, e := range m.TransactionsWithReceipt { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *Transactions) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Transactions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Transactions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Clock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Clock == nil { - m.Clock = &v11.Clock{} - } - if err := m.Clock.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransactionsWithReceipt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TransactionsWithReceipt = append(m.TransactionsWithReceipt, &v1.TransactionWithReceipt{}) - if err := m.TransactionsWithReceipt[len(m.TransactionsWithReceipt)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Transactions) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Transactions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Transactions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Clock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Clock == nil { - m.Clock = &v11.Clock{} - } - if err := m.Clock.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransactionsWithReceipt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TransactionsWithReceipt = append(m.TransactionsWithReceipt, &v1.TransactionWithReceipt{}) - if err := m.TransactionsWithReceipt[len(m.TransactionsWithReceipt)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} diff --git a/starket-common/pb/sf/substreams/v1/clock.pb.go b/starket-common/pb/sf/substreams/v1/clock.pb.go deleted file mode 100644 index 0257032..0000000 --- a/starket-common/pb/sf/substreams/v1/clock.pb.go +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: sf/substreams/v1/clock.proto - -package substreamsv1 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - 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) -) - -// Clock is a pointer to a block with added timestamp -type Clock struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Number uint64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` - Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` -} - -func (x *Clock) Reset() { - *x = Clock{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_substreams_v1_clock_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Clock) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Clock) ProtoMessage() {} - -func (x *Clock) ProtoReflect() protoreflect.Message { - mi := &file_sf_substreams_v1_clock_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 Clock.ProtoReflect.Descriptor instead. -func (*Clock) Descriptor() ([]byte, []int) { - return file_sf_substreams_v1_clock_proto_rawDescGZIP(), []int{0} -} - -func (x *Clock) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Clock) GetNumber() uint64 { - if x != nil { - return x.Number - } - return 0 -} - -func (x *Clock) GetTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.Timestamp - } - return nil -} - -// BlockRef is a pointer to a block to which we don't know the timestamp -type BlockRef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Number uint64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` -} - -func (x *BlockRef) Reset() { - *x = BlockRef{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_substreams_v1_clock_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlockRef) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlockRef) ProtoMessage() {} - -func (x *BlockRef) ProtoReflect() protoreflect.Message { - mi := &file_sf_substreams_v1_clock_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 BlockRef.ProtoReflect.Descriptor instead. -func (*BlockRef) Descriptor() ([]byte, []int) { - return file_sf_substreams_v1_clock_proto_rawDescGZIP(), []int{1} -} - -func (x *BlockRef) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *BlockRef) GetNumber() uint64 { - if x != nil { - return x.Number - } - return 0 -} - -var File_sf_substreams_v1_clock_proto protoreflect.FileDescriptor - -var file_sf_substreams_v1_clock_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, - 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, - 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, - 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x69, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x32, 0x0a, 0x08, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x66, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x42, 0xee, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x43, 0x6c, 0x6f, 0x63, 0x6b, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, - 0x74, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2d, 0x66, 0x6f, 0x75, - 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x10, 0x53, 0x66, 0x2e, 0x53, 0x75, 0x62, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x53, 0x66, 0x5c, - 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, - 0x53, 0x66, 0x5c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x53, - 0x66, 0x3a, 0x3a, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_sf_substreams_v1_clock_proto_rawDescOnce sync.Once - file_sf_substreams_v1_clock_proto_rawDescData = file_sf_substreams_v1_clock_proto_rawDesc -) - -func file_sf_substreams_v1_clock_proto_rawDescGZIP() []byte { - file_sf_substreams_v1_clock_proto_rawDescOnce.Do(func() { - file_sf_substreams_v1_clock_proto_rawDescData = protoimpl.X.CompressGZIP(file_sf_substreams_v1_clock_proto_rawDescData) - }) - return file_sf_substreams_v1_clock_proto_rawDescData -} - -var file_sf_substreams_v1_clock_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_sf_substreams_v1_clock_proto_goTypes = []interface{}{ - (*Clock)(nil), // 0: sf.substreams.v1.Clock - (*BlockRef)(nil), // 1: sf.substreams.v1.BlockRef - (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp -} -var file_sf_substreams_v1_clock_proto_depIdxs = []int32{ - 2, // 0: sf.substreams.v1.Clock.timestamp:type_name -> google.protobuf.Timestamp - 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_sf_substreams_v1_clock_proto_init() } -func file_sf_substreams_v1_clock_proto_init() { - if File_sf_substreams_v1_clock_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_sf_substreams_v1_clock_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Clock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_substreams_v1_clock_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockRef); 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_sf_substreams_v1_clock_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_sf_substreams_v1_clock_proto_goTypes, - DependencyIndexes: file_sf_substreams_v1_clock_proto_depIdxs, - MessageInfos: file_sf_substreams_v1_clock_proto_msgTypes, - }.Build() - File_sf_substreams_v1_clock_proto = out.File - file_sf_substreams_v1_clock_proto_rawDesc = nil - file_sf_substreams_v1_clock_proto_goTypes = nil - file_sf_substreams_v1_clock_proto_depIdxs = nil -} diff --git a/starket-common/pb/sf/substreams/v1/clock_vtproto.pb.go b/starket-common/pb/sf/substreams/v1/clock_vtproto.pb.go deleted file mode 100644 index cdacd6c..0000000 --- a/starket-common/pb/sf/substreams/v1/clock_vtproto.pb.go +++ /dev/null @@ -1,834 +0,0 @@ -// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.6.0 -// source: sf/substreams/v1/clock.proto - -package substreamsv1 - -import ( - fmt "fmt" - protohelpers "github.com/planetscale/vtprotobuf/protohelpers" - timestamppb1 "github.com/planetscale/vtprotobuf/types/known/timestamppb" - proto "google.golang.org/protobuf/proto" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - unsafe "unsafe" -) - -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) -) - -func (m *Clock) CloneVT() *Clock { - if m == nil { - return (*Clock)(nil) - } - r := new(Clock) - r.Id = m.Id - r.Number = m.Number - r.Timestamp = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.Timestamp).CloneVT()) - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Clock) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *BlockRef) CloneVT() *BlockRef { - if m == nil { - return (*BlockRef)(nil) - } - r := new(BlockRef) - r.Id = m.Id - r.Number = m.Number - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *BlockRef) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (this *Clock) EqualVT(that *Clock) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Id != that.Id { - return false - } - if this.Number != that.Number { - return false - } - if !(*timestamppb1.Timestamp)(this.Timestamp).EqualVT((*timestamppb1.Timestamp)(that.Timestamp)) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Clock) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Clock) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *BlockRef) EqualVT(that *BlockRef) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Id != that.Id { - return false - } - if this.Number != that.Number { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *BlockRef) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*BlockRef) - if !ok { - return false - } - return this.EqualVT(that) -} -func (m *Clock) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Clock) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Clock) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Timestamp != nil { - size, err := (*timestamppb1.Timestamp)(m.Timestamp).MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - if m.Number != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Number)) - i-- - dAtA[i] = 0x10 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockRef) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockRef) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *BlockRef) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Number != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Number)) - i-- - dAtA[i] = 0x10 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Clock) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Clock) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Clock) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Timestamp != nil { - size, err := (*timestamppb1.Timestamp)(m.Timestamp).MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - if m.Number != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Number)) - i-- - dAtA[i] = 0x10 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockRef) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockRef) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *BlockRef) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Number != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Number)) - i-- - dAtA[i] = 0x10 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Clock) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Number != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Number)) - } - if m.Timestamp != nil { - l = (*timestamppb1.Timestamp)(m.Timestamp).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *BlockRef) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Number != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Number)) - } - n += len(m.unknownFields) - return n -} - -func (m *Clock) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Clock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Clock: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - m.Number = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Number |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Timestamp == nil { - m.Timestamp = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.Timestamp).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockRef) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockRef: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockRef: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - m.Number = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Number |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Clock) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Clock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Clock: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Id = stringValue - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - m.Number = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Number |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Timestamp == nil { - m.Timestamp = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.Timestamp).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockRef) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockRef: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockRef: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Id = stringValue - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - m.Number = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Number |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} diff --git a/starket-common/proto/buf.gen.yaml b/starket-common/proto/buf.gen.yaml deleted file mode 100644 index 165332b..0000000 --- a/starket-common/proto/buf.gen.yaml +++ /dev/null @@ -1,13 +0,0 @@ -version: v1 -managed: - enabled: true - go_package_prefix: - default: github.com/streamingfast/substreams-foundational-modules/starket-common/pb - -plugins: - - plugin: buf.build/protocolbuffers/go:v1.31.0 - out: ../pb - opt: paths=source_relative - - plugin: buf.build/community/planetscale-vtprotobuf:v0.6.0 - out: ../pb - opt: paths=source_relative diff --git a/starket-common/proto/buf.lock b/starket-common/proto/buf.lock deleted file mode 100644 index d2358ec..0000000 --- a/starket-common/proto/buf.lock +++ /dev/null @@ -1,13 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: streamingfast - repository: firehose-starknet - commit: 591503374342443eb9a98cd3883b6ca9 - digest: shake256:21d3702cd6b3be350a1c25d57b66e669caf67dbd49dd205f4b0669d5055ca35a4c95235a05bc1d7175780149f8ad7f164153b446cdc004769d81697b19a72fb7 - - remote: buf.build - owner: streamingfast - repository: substreams - commit: ce84563cf22e4befa55edf53f61af055 - digest: shake256:09af59d53626d932d4960525e37559df71ddc7b4f95b98a4320ef742405217219b8d71c9c11541a1a4b0054cabe15fa2ab8fcb8b781435bab8c65e20d25c1090 diff --git a/starket-common/proto/buf.yaml b/starket-common/proto/buf.yaml deleted file mode 100644 index b0ea8f2..0000000 --- a/starket-common/proto/buf.yaml +++ /dev/null @@ -1,4 +0,0 @@ -version: v1 -deps: - - buf.build/streamingfast/firehose-starknet - - buf.build/streamingfast/substreams \ No newline at end of file diff --git a/starket-common/proto/sf/substreams/starknet/type/v1/starknet.proto b/starket-common/proto/sf/substreams/starknet/type/v1/starknet.proto deleted file mode 100644 index e597a74..0000000 --- a/starket-common/proto/sf/substreams/starknet/type/v1/starknet.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; - -package sf.substreams.starknet.type.v1; - -option go_package = "github.com/streamingfast/substreams-starknet-foundational-modules/starknet-common/pb/sf/substreams-starknet/starknet/v1"; - -import "sf/starknet/type/v1/block.proto"; -import "sf/substreams/index/v1/keys.proto"; -import "sf/substreams/v1/clock.proto"; - -message Transactions { - .sf.substreams.v1.Clock clock = 1; - repeated .sf.starknet.type.v1.TransactionWithReceipt transactions_with_receipt = 2; -} diff --git a/starket-common/sqe/api.go b/starket-common/sqe/api.go deleted file mode 100644 index b793304..0000000 --- a/starket-common/sqe/api.go +++ /dev/null @@ -1,54 +0,0 @@ -package sqe - -import ( - "context" - "fmt" -) - -// FindAllFieldNames returns all used field names in the AST. There -// is **NO** ordering on the elements, i.e. they might not come in the -// same order specified in the AST. -func ExtractAllKeys(expression Expression) (out []string) { - uniqueFieldNames := map[string]bool{} - onExpression := func(_ context.Context, expr Expression) error { - if v, ok := expr.(*KeyTerm); ok { - uniqueFieldNames[v.Value.Value] = true - } - - return nil - } - - visitor := NewDepthFirstVisitor(nil, onExpression) - expression.Visit(context.Background(), visitor) - - i := 0 - out = make([]string, len(uniqueFieldNames)) - for fieldName := range uniqueFieldNames { - out[i] = fieldName - i++ - } - - return -} - -func TransformExpression(expr Expression, transformer FieldTransformer) error { - if transformer == nil { - return nil - } - - onExpression := func(_ context.Context, expr Expression) error { - v, ok := expr.(*KeyTerm) - if !ok { - return nil - } - - if err := transformer.TransformStringLiteral("", v.Value); err != nil { - return fmt.Errorf("key %q transformation failed: %s", v.Value.Value, err) - } - - return nil - } - - visitor := NewDepthFirstVisitor(nil, onExpression) - return expr.Visit(context.Background(), visitor) -} diff --git a/starket-common/sqe/api_test.go b/starket-common/sqe/api_test.go deleted file mode 100644 index 08fdeaa..0000000 --- a/starket-common/sqe/api_test.go +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright 2024 StreamingFast Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package sqe - -import ( - "context" - "fmt" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -// func TestExpressionToBleveQuery(t *testing.T) { -// tests := []struct { -// in string -// expectBleve string -// }{ -// { -// in: "account:eoscanadacom", -// expectBleve: `{"term":"eoscanadacom","field":"account"}`, -// }, -// { -// in: "data.active:true", -// expectBleve: `{"bool":true,"field":"data.active"}`, -// }, -// { -// in: "data.active:false", -// expectBleve: `{"bool":false,"field":"data.active"}`, -// }, -// { -// in: `data.active:"true"`, -// expectBleve: `{"term":"true","field":"data.active"}`, -// }, -// { -// in: "receiver:eoscanadacom account:eoscanadacom", -// expectBleve: `{"conjuncts":[{"term":"eoscanadacom","field":"receiver"},{"term":"eoscanadacom","field":"account"}]}`, -// }, -// { -// in: "account:eoscanadacom receiver:eoscanadacom", -// expectBleve: `{"conjuncts":[{"term":"eoscanadacom","field":"account"},{"term":"eoscanadacom","field":"receiver"}]}`, -// }, -// { -// in: "receiver:eoscanadacom (action:transfer OR action:issue)", -// expectBleve: `{"conjuncts":[{"term":"eoscanadacom","field":"receiver"},{"disjuncts":[{"term":"transfer","field":"action"},{"term":"issue","field":"action"}],"min":1}]}`, -// }, -// { -// in: "receiver:eoscanadacom -(action:transfer OR action:issue)", -// expectBleve: `{"conjuncts":[{"term":"eoscanadacom","field":"receiver"},{"must_not":{"disjuncts":[{"disjuncts":[{"term":"transfer","field":"action"},{"term":"issue","field":"action"}],"min":1}],"min":0}}]}`, -// }, -// { -// in: "-receiver:eoscanadacom (action:transfer OR action:issue)", -// expectBleve: `{"conjuncts":[{"must_not":{"disjuncts":[{"term":"eoscanadacom","field":"receiver"}],"min":0}},{"disjuncts":[{"term":"transfer","field":"action"},{"term":"issue","field":"action"}],"min":1}]}`, -// }, -// { -// in: "-action:patate", -// expectBleve: `{"must_not":{"disjuncts":[{"term":"patate","field":"action"}],"min":0}}`, -// }, -// { -// in: "receiver:eoscanadacom (action:transfer OR action:issue) account:eoscanadacom (data.from:eoscanadacom OR data.to:eoscanadacom)", -// expectBleve: `{ -// "conjuncts": [ -// { "term": "eoscanadacom", "field": "receiver" }, -// { "disjuncts": [ -// { "term": "transfer", "field": "action" }, -// { "term": "issue", "field": "action" } -// ], "min": 1 -// }, -// { "term": "eoscanadacom", "field": "account" }, -// { "disjuncts": [ -// { "term": "eoscanadacom", "field": "data.from" }, -// { "term": "eoscanadacom", "field": "data.to" } -// ], "min": 1 -// } -// ] -// }`, -// }, -// } - -// for idx, test := range tests { -// t.Run(fmt.Sprintf("index %d", idx+1), func(t *testing.T) { -// ast, err := Parse(context.Background(), test.in) -// require.NoError(t, err) - -// res := ExpressionToBleve(ast) - -// cnt, err := json.Marshal(res) -// require.NoError(t, err) -// assert.JSONEq(t, test.expectBleve, string(cnt), "Failed on SQE %q, got %s", test.in, string(cnt)) -// }) -// } -// } - -func TestExtractAllKeys(t *testing.T) { - tests := []struct { - in string - expectedKeys []string - }{ - { - "account", - []string{"account"}, - }, - { - "data.active", - []string{"data.active"}, - }, - { - "data.active", - []string{"data.active"}, - }, - { - `"data.active"`, - []string{"data.active"}, - }, - { - "receiver account", - []string{"receiver", "account"}, - }, - { - "receiver (action || action)", - []string{"receiver", "action"}, - }, - { - "receiver (action || action) account (data.from || data.to)", - []string{"receiver", "action", "account", "data.from", "data.to"}, - }, - } - - for idx, test := range tests { - t.Run(fmt.Sprintf("index %d", idx+1), func(t *testing.T) { - ast, err := Parse(context.Background(), test.in) - require.NoError(t, err) - - actuals := ExtractAllKeys(ast) - assert.ElementsMatch(t, test.expectedKeys, actuals, "Mistmatch for SQE %q", test.in) - }) - } -} diff --git a/starket-common/sqe/bitmap.go b/starket-common/sqe/bitmap.go deleted file mode 100644 index 88d058f..0000000 --- a/starket-common/sqe/bitmap.go +++ /dev/null @@ -1,116 +0,0 @@ -package sqe - -import ( - "fmt" - "math" - - "github.com/RoaringBitmap/roaring/roaring64" -) - -func RoaringBitmapsApply(expr Expression, bitmaps map[string]*roaring64.Bitmap) *roaring64.Bitmap { - out := roaringQuerier{bitmaps: bitmaps}.apply(expr) - if out == nil { - return roaring64.New() - } - return out -} - -type roaringRange struct { - startInclusive uint64 - endExlusive uint64 -} - -type roaringQuerier struct { - bitmaps map[string]*roaring64.Bitmap - - // fullRange is computed once and is the full range of all the "block" - // represented within the bitmaps. This is used to optimize the "not" - // operation by flipping the full range. - // - // It's lazy since most expression will not use it so there is no - // need to compute unless strictly necessary. - fullRange *roaringRange -} - -func (q roaringQuerier) apply(expr Expression) *roaring64.Bitmap { - switch v := expr.(type) { - case *KeyTerm: - if out, ok := q.bitmaps[v.Value.Value]; ok { - return out - } - return roaring64.New() - - case *AndExpression, *OrExpression: - children := v.(HasChildrenExpression).GetChildren() - if len(children) == 0 { - panic(fmt.Errorf("%T expression with no children. this make no sense something is wrong in the parser", v)) - } - - firstChild := children[0] - if len(children) == 1 { - return q.apply(firstChild) - } - - result := q.apply(firstChild).Clone() - - var op func(x2 *roaring64.Bitmap) - switch v.(type) { - case *AndExpression: - op = result.And - case *OrExpression: - op = result.Or - default: - panic(fmt.Errorf("has children expression of type %T is not handled correctly", v)) - } - - for _, child := range children[1:] { - op(q.apply(child)) - } - - return result - - case *ParenthesisExpression: - return q.apply(v.Child) - - case *NotExpression: - roaringRange := q.getRoaringRange() - - result := q.apply(v.Child).Clone() - result.Flip(roaringRange.startInclusive, roaringRange.endExlusive) - - return result - - default: - panic(fmt.Errorf("element of type %T is not handled correctly", v)) - } -} - -func (q roaringQuerier) getRoaringRange() *roaringRange { - if q.fullRange == nil { - var start uint64 = math.MaxUint64 - var end uint64 = 0 - for _, bitmap := range q.bitmaps { - if bitmap.IsEmpty() { - continue - } - - first := bitmap.Minimum() - last := bitmap.Maximum() - - if first < start { - start = first - } - - if last > end { - end = last - } - } - - q.fullRange = &roaringRange{ - startInclusive: start, - endExlusive: end + 1, - } - } - - return q.fullRange -} diff --git a/starket-common/sqe/bitmap_test.go b/starket-common/sqe/bitmap_test.go deleted file mode 100644 index 2d65547..0000000 --- a/starket-common/sqe/bitmap_test.go +++ /dev/null @@ -1,57 +0,0 @@ -package sqe - -import ( - "context" - "strings" - "testing" - - "github.com/RoaringBitmap/roaring/roaring64" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestApplyRoaringBitmap(t *testing.T) { - kv := map[string]*roaring64.Bitmap{ - "bob": roaring64.BitmapOf(1, 2, 3), - "alice": roaring64.BitmapOf(1, 4, 5), - "john": roaring64.BitmapOf(1, 3, 5), - "transfer": roaring64.BitmapOf(1, 3, 5), - "mint": roaring64.BitmapOf(5), - "delegate": roaring64.BitmapOf(4), - } - - // Matrix-based test cases - testCases := []struct { - expr string - operation func() *roaring64.Bitmap - result []uint64 - }{ - { - expr: "bob || alice", - result: []uint64{1, 2, 3, 4, 5}, - }, - { - expr: "bob transfer", - result: []uint64{1, 3}, - }, - { - expr: "(alice || bob) transfer", - result: []uint64{1, 3, 5}, - }, - { - expr: "(alice || bob) (delegate || mint)", - result: []uint64{4, 5}, - }, - } - - // Run test cases - for _, tc := range testCases { - parser, err := NewParser(strings.NewReader(tc.expr)) - require.NoError(t, err) - - expr, err := parser.Parse(context.Background()) - require.NoError(t, err) - - assert.ElementsMatch(t, tc.result, RoaringBitmapsApply(expr, kv).ToArray()) - } -} diff --git a/starket-common/sqe/errors.go b/starket-common/sqe/errors.go deleted file mode 100644 index 52526d3..0000000 --- a/starket-common/sqe/errors.go +++ /dev/null @@ -1,39 +0,0 @@ -package sqe - -import ( - "fmt" - - lex "github.com/alecthomas/participle/lexer" -) - -type ParseError struct { - message string - position lex.Position -} - -func parserError(message string, position lex.Position) *ParseError { - return &ParseError{ - message: message, - position: position, - } -} - -func rangeParserError(message string, start lex.Position, end lex.Position) *ParseError { - return &ParseError{ - message: message, - position: lex.Position{ - Filename: start.Filename, - Offset: start.Offset, - Line: start.Line, - Column: end.Column, - }, - } -} - -func (e *ParseError) Error() string { - if e.position.Line <= 1 { - return fmt.Sprintf("%s at column %d", e.message, e.position.Offset) - } - - return fmt.Sprintf("%s at line %d column %d", e.message, e.position.Line, e.position.Column) -} diff --git a/starket-common/sqe/init_test.go b/starket-common/sqe/init_test.go deleted file mode 100644 index 24d6098..0000000 --- a/starket-common/sqe/init_test.go +++ /dev/null @@ -1,79 +0,0 @@ -package sqe - -import ( - "context" - "fmt" - "io" - "strings" -) - -func expressionToString(expression Expression) string { - builder := &strings.Builder{} - visitor := &TestVisitor{ - writer: builder, - } - - expression.Visit(context.Background(), visitor) - - return builder.String() -} - -type TestVisitor struct { - writer io.Writer -} - -func (v *TestVisitor) Visit_And(ctx context.Context, e *AndExpression) error { - return v.visit_binary(ctx, "<", "&&", ">", e.Children) -} - -func (v *TestVisitor) Visit_Or(ctx context.Context, e *OrExpression) error { - return v.visit_binary(ctx, "[", "||", "]", e.Children) -} - -func (v *TestVisitor) visit_binary(ctx context.Context, opStart, op, opEnd string, children []Expression) error { - v.print(opStart) - - for i, child := range children { - if i != 0 { - v.print(" %s ", op) - } - - child.Visit(ctx, v) - } - v.print(opEnd) - - return nil -} - -func (v *TestVisitor) Visit_Parenthesis(ctx context.Context, e *ParenthesisExpression) error { - v.print("(") - e.Child.Visit(ctx, v) - v.print(")") - - return nil -} - -func (v *TestVisitor) Visit_Not(ctx context.Context, e *NotExpression) error { - v.print("!") - e.Child.Visit(ctx, v) - - return nil -} - -func (v *TestVisitor) Visit_KeyTerm(ctx context.Context, e *KeyTerm) error { - v.printStringLiteral(e.Value) - return nil -} - -func (v *TestVisitor) printStringLiteral(literal *StringLiteral) error { - if literal.QuotingChar != "" { - return v.print("%s%s%s", literal.QuotingChar, literal.Value, literal.QuotingChar) - } - - return v.print(literal.Value) -} - -func (v *TestVisitor) print(message string, args ...interface{}) error { - fmt.Fprintf(v.writer, message, args...) - return nil -} diff --git a/starket-common/sqe/keys.go b/starket-common/sqe/keys.go deleted file mode 100644 index 1c411f8..0000000 --- a/starket-common/sqe/keys.go +++ /dev/null @@ -1,80 +0,0 @@ -package sqe - -import ( - "fmt" -) - -type KeysQuerier struct { - blockKeys map[string]struct{} -} - -func NewFromKeys(keys []string) KeysQuerier { - blockKeys := make(map[string]struct{}, len(keys)) - for _, key := range keys { - blockKeys[key] = struct{}{} - } - return KeysQuerier{blockKeys: blockKeys} -} - -func KeysApply(expr Expression, blockKeys KeysQuerier) bool { - return blockKeys.apply(expr) -} - -func (k KeysQuerier) apply(expr Expression) bool { - switch v := expr.(type) { - case *KeyTerm: - if k.blockKeys == nil { - return false - } - - _, ok := k.blockKeys[v.Value.Value] - return ok - - case *AndExpression, *OrExpression: - children := v.(HasChildrenExpression).GetChildren() - if len(children) == 0 { - panic(fmt.Errorf("%T expression with no children. this make no sense something is wrong in the parser", v)) - } - - firstChild := children[0] - if len(children) == 1 { - return k.apply(firstChild) - } - - result := k.apply(firstChild) - - var op func(bool) - switch v.(type) { - case *AndExpression: - op = func(x bool) { - result = result && x - } - - case *OrExpression: - op = func(x bool) { - result = result || x - } - default: - panic(fmt.Errorf("has children expression of type %T is not handled correctly", v)) - } - - for _, child := range children[1:] { - op(k.apply(child)) - } - - return result - - case *ParenthesisExpression: - return k.apply(v.Child) - - case *NotExpression: - if k.blockKeys == nil { - return false - } - - return !k.apply(v.Child) - - default: - panic(fmt.Errorf("element of type %T is not handled correctly", v)) - } -} diff --git a/starket-common/sqe/keys_test.go b/starket-common/sqe/keys_test.go deleted file mode 100644 index f0af2ea..0000000 --- a/starket-common/sqe/keys_test.go +++ /dev/null @@ -1,70 +0,0 @@ -package sqe - -import ( - "context" - "strings" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestApplyKeys(t *testing.T) { - kv := map[string]struct{}{ - "bob": {}, - "alice": {}, - "etienne": {}, - "charlie": {}, - "delegate": {}, - "mint": {}, - } - - blockKeys := KeysQuerier{blockKeys: kv} - - // Matrix-based test cases - testCases := []struct { - name string - expr string - result bool - }{ - { - name: "Or", - expr: "bob || alice", - result: true, - }, - { - name: "And", - expr: "bob transfer", - result: false, - }, - { - name: "And(Or key)", - expr: "(alice || bob) transfer", - result: false, - }, - { - name: "And(Or Or)", - expr: "(alice || bob) (delegate || mint)", - result: true, - }, - - { - name: "2 And", - expr: "alice john mint", - result: false, - }, - } - - // Run test cases - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - parser, err := NewParser(strings.NewReader(tc.expr)) - require.NoError(t, err) - - expr, err := parser.Parse(context.Background()) - require.NoError(t, err) - - assert.Equal(t, tc.result, blockKeys.apply(expr)) - }) - } -} diff --git a/starket-common/sqe/lexer.go b/starket-common/sqe/lexer.go deleted file mode 100644 index 331cf71..0000000 --- a/starket-common/sqe/lexer.go +++ /dev/null @@ -1,111 +0,0 @@ -package sqe - -import ( - "fmt" - "io" - - lex "github.com/alecthomas/participle/lexer" -) - -type lexer struct { - *lex.PeekingLexer - - symbols map[rune]string -} - -func newLexer(reader io.Reader) (*lexer, error) { - l, err := lexerDefinition.Lex(reader) - if err != nil { - return nil, fmt.Errorf("new lexer: %s", err) - } - - peekingLexer, err := lex.Upgrade(l) - if err != nil { - return nil, fmt.Errorf("peekable lexer: %s", err) - } - - return &lexer{ - PeekingLexer: peekingLexer, - symbols: lex.SymbolsByRune(lexerDefinition), - }, nil -} - -func (l *lexer) skipSpaces() { - for { - token, err := l.Peek(0) - if err != nil || !l.isSpace(token) { - return - } - - l.mustLexNext() - } -} - -func (l *lexer) mustLexNext() lex.Token { - token, err := l.Next() - if err != nil { - panic(err) - } - - return token -} - -func (l *lexer) peekPos() lex.Position { - peek, err := l.Peek(0) - if err != nil { - return lex.Position{Filename: "", Line: 1, Offset: l.PeekingLexer.Length() - 1, Column: l.PeekingLexer.Length()} - } - - return peek.Pos -} - -var lexerDefinition = lex.Must(lex.Regexp( - `(?m)` + - `(?P"|')` + - // `|(?P,)` + - `|(?P\-)` + - `|(?P\|\|)` + - `|(?P&&)` + - `|(?P\()` + - `|(?P\))` + - // `|(?P\[)` + - // `|(?P\])` + - `|(?P[^\s'"\-\(\)][^\s'"\(\)]*)` + - `|(?P\s+)`, -)) - -func (l *lexer) isSpace(t lex.Token) bool { return l.isTokenType(t, "Space") } -func (l *lexer) isQuoting(t lex.Token) bool { return l.isTokenType(t, "Quoting") } - -// func (l *lexer) isColon(t lex.Token) bool { return l.isTokenType(t, "Colon") } -// func (l *lexer) isComma(t lex.Token) bool { return l.isTokenType(t, "Comma") } -func (l *lexer) isNotOperator(t lex.Token) bool { return l.isTokenType(t, "NotOperator") } -func (l *lexer) isOrOperator(t lex.Token) bool { return l.isTokenType(t, "OrOperator") } -func (l *lexer) isAndOperator(t lex.Token) bool { return l.isTokenType(t, "AndOperator") } -func (l *lexer) isLeftParenthesis(t lex.Token) bool { return l.isTokenType(t, "LeftParenthesis") } -func (l *lexer) isRightParenthesis(t lex.Token) bool { return l.isTokenType(t, "RightParenthesis") } - -// func (l *lexer) isLeftSquareBracket(t lex.Token) bool { return l.isTokenType(t, "LeftSquareBracket") } -// func (l *lexer) isRightSquareBracket(t lex.Token) bool { return l.isTokenType(t, "RightSquareBracket") } -func (l *lexer) isName(t lex.Token) bool { return l.isTokenType(t, "Name") } - -func (l *lexer) isTokenType(token lex.Token, expectedType string) bool { - return l.symbols[token.Type] == expectedType -} - -func (l *lexer) isBinaryOperator(t lex.Token) bool { - return l.isAnyTokenType(t, "AndOperator", "OrOperator") -} - -func (l *lexer) isAnyTokenType(token lex.Token, expectedTypes ...string) bool { - for _, expectedType := range expectedTypes { - if l.symbols[token.Type] == expectedType { - return true - } - } - return false -} - -func (l *lexer) getTokenType(token lex.Token) string { - return l.symbols[token.Type] -} diff --git a/starket-common/sqe/lexer_test.go b/starket-common/sqe/lexer_test.go deleted file mode 100644 index 0ab0097..0000000 --- a/starket-common/sqe/lexer_test.go +++ /dev/null @@ -1,57 +0,0 @@ -package sqe - -import ( - "bytes" - "testing" - - lex "github.com/alecthomas/participle/lexer" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestLexer(t *testing.T) { - tests := []struct { - name string - sqe string - tokens []string - }{ - {"minus_followed_by_name", `-token`, []string{"NotOperator", "Name", "EOF"}}, - - {"name_with_inside_minus", `open-token`, []string{"Name", "EOF"}}, - - // {"legacy_and", `AND`, []string{"AndOperator", "EOF"}}, - {"new_and", `&&`, []string{"AndOperator", "EOF"}}, - - // {"legacy_or", `OR`, []string{"OrOperator", "EOF"}}, - {"new_or", `||`, []string{"OrOperator", "EOF"}}, - - {"quoting characters start", `'some "some`, []string{"Quoting", "Name", "Space", "Quoting", "Name", "EOF"}}, - {"quoting characters end", `some' some"`, []string{"Name", "Quoting", "Space", "Name", "Quoting", "EOF"}}, - - // {"square_brackets", `[field, "double quoted"]`, []string{"LeftSquareBracket", "Name", "Comma", "Space", "Quoting", "Name", "Space", "Name", "Quoting", "RightSquareBracket", "EOF"}}, - - {"expresion_with_and", `action && field`, []string{"Name", "Space", "AndOperator", "Space", "Name", "EOF"}}, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - actual := tokensList(t, test.sqe) - - assert.Equal(t, test.tokens, actual) - }) - } -} - -func tokensList(t *testing.T, input string) (out []string) { - lexer, err := newLexer(bytes.NewBufferString(input)) - require.NoError(t, err) - - tokens, err := lex.ConsumeAll(lexer.PeekingLexer) - require.NoError(t, err) - - for _, token := range tokens { - out = append(out, lexer.getTokenType(token)) - } - - return -} diff --git a/starket-common/sqe/optimizer.go b/starket-common/sqe/optimizer.go deleted file mode 100644 index 63f2977..0000000 --- a/starket-common/sqe/optimizer.go +++ /dev/null @@ -1,33 +0,0 @@ -package sqe - -import ( - "context" - "fmt" -) - -func optimizeExpression(ctx context.Context, expr Expression) Expression { - visitor := NewDepthFirstVisitor(nil, func(_ context.Context, expr Expression) error { - v, ok := expr.(*OrExpression) - if !ok { - return nil - } - - newChildren := make([]Expression, 0, len(v.Children)) - for _, child := range v.Children { - if w, ok := child.(*OrExpression); ok { - newChildren = append(newChildren, w.Children...) - } else { - newChildren = append(newChildren, child) - } - } - - v.Children = newChildren - return nil - }) - - if err := expr.Visit(ctx, visitor); err != nil { - panic(fmt.Errorf("optimizer visitor is never expected to return error, something changed: %w", err)) - } - - return expr -} diff --git a/starket-common/sqe/optimizer_test.go b/starket-common/sqe/optimizer_test.go deleted file mode 100644 index 4f6f9ab..0000000 --- a/starket-common/sqe/optimizer_test.go +++ /dev/null @@ -1,120 +0,0 @@ -package sqe - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestOptimizer(t *testing.T) { - tests := []struct { - name string - expr Expression - expected string - }{ - { - "top_or_no_or_children", - orExpr(keyTermExpr("a1"), keyTermExpr("a2")), - `[a1 || a2]`, - }, - { - "top_or_single_or_children", - orExpr(orExpr(keyTermExpr("a1"), keyTermExpr("a2")), keyTermExpr("b2")), - `[a1 || a2 || b2]`, - }, - { - "top_or_multiple_or_children", - orExpr( - orExpr(keyTermExpr("a1"), keyTermExpr("a2")), - orExpr(keyTermExpr("c1"), keyTermExpr("c2")), - ), - `[a1 || a2 || c1 || c2]`, - }, - { - "top_or_mixed_multiple_or_children", - orExpr( - keyTermExpr("before2"), - orExpr(keyTermExpr("a1"), keyTermExpr("a2")), - andExpr(keyTermExpr("middle1"), keyTermExpr("middle2")), - orExpr(keyTermExpr("c1"), keyTermExpr("c2")), - notExpr(keyTermExpr("after3")), - ), - `[before2 || a1 || a2 || || c1 || c2 || !after3]`, - }, - - { - "or_in_not_multiple_or_children", - notExpr( - orExpr( - orExpr(keyTermExpr("a1"), keyTermExpr("a2")), - orExpr(keyTermExpr("c1"), keyTermExpr("c2")), - ), - ), - `![a1 || a2 || c1 || c2]`, - }, - { - "or_in_parens_multiple_or_children", - parensExpr( - orExpr( - orExpr(keyTermExpr("a1"), keyTermExpr("a2")), - orExpr(keyTermExpr("c1"), keyTermExpr("c2")), - ), - ), - `([a1 || a2 || c1 || c2])`, - }, - - { - "multi_level_nested_only_or", - orExpr( - orExpr( - orExpr( - keyTermExpr("l3a1"), - orExpr(keyTermExpr("l4a1"), keyTermExpr("l4a2")), - ), - orExpr( - orExpr(keyTermExpr("l4b1"), keyTermExpr("l4b2")), - keyTermExpr("l3b1"), - ), - orExpr( - orExpr(keyTermExpr("l4c1"), keyTermExpr("l4c2")), - orExpr(keyTermExpr("l4d1"), keyTermExpr("l4d2")), - ), - ), - ), - `[l3a1 || l4a1 || l4a2 || l4b1 || l4b2 || l3b1 || l4c1 || l4c2 || l4d1 || l4d2]`, - }, - - { - "multi_level_nested_mixed_or", - orExpr( - orExpr( - andExpr( - keyTermExpr("l3a1"), - notExpr(orExpr(keyTermExpr("l4a1"), keyTermExpr("l4a2"))), - ), - orExpr( - orExpr(keyTermExpr("l4b1"), keyTermExpr("l4b2")), - keyTermExpr("l3b1"), - ), - orExpr( - orExpr(keyTermExpr("l4c1"), keyTermExpr("l4c2")), - parensExpr(orExpr(keyTermExpr("l4d1"), keyTermExpr("l4d2"))), - ), - ), - andExpr( - keyTermExpr("l2e1"), - orExpr(keyTermExpr("l3f1"), keyTermExpr("l3f2")), - ), - ), - `[ || l4b1 || l4b2 || l3b1 || l4c1 || l4c2 || ([l4d1 || l4d2]) || ]`, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - optimized := optimizeExpression(context.Background(), test.expr) - assert.Equal(t, test.expected, expressionToString(optimized), "Invalid optimization for %q", test.name) - }) - } -} diff --git a/starket-common/sqe/parser.go b/starket-common/sqe/parser.go deleted file mode 100644 index d627170..0000000 --- a/starket-common/sqe/parser.go +++ /dev/null @@ -1,263 +0,0 @@ -package sqe - -import ( - "bytes" - "context" - "fmt" - "io" - "strings" - - lex "github.com/alecthomas/participle/lexer" -) - -// MaxRecursionDeepness is the limit we impose on the number of direct ORs expression. -// It's possible to have more than that, just not in a single successive sequence or `1 or 2 or 3 ...`. -// This is to avoid first a speed problem where parsing start to be -const MaxRecursionDeepness = 2501 - -func Parse(ctx context.Context, input string) (expr Expression, err error) { - parser, err := NewParser(bytes.NewBufferString(input)) - if err != nil { - return nil, fmt.Errorf("new parser: %w", err) - } - - return parser.Parse(ctx) -} - -type Parser struct { - ctx context.Context - l *lexer - - lookForRightParenthesis uint -} - -func NewParser(reader io.Reader) (*Parser, error) { - lexer, err := newLexer(reader) - if err != nil { - return nil, err - } - - return &Parser{ - ctx: context.Background(), - l: lexer, - }, nil -} - -func (p *Parser) Parse(ctx context.Context) (out Expression, err error) { - defer func() { - recoveredErr := recover() - if recoveredErr == nil { - return - } - - switch v := recoveredErr.(type) { - case *ParseError: - err = v - case error: - err = fmt.Errorf("unexpected error occurred while parsing SQE expression: %w", v) - case string, fmt.Stringer: - err = fmt.Errorf("unexpected error occurred while parsing SQE expression: %s", v) - default: - err = fmt.Errorf("unexpected error occurred while parsing SQE expression: %v", v) - } - }() - - rootExpr, err := p.parseExpression(0) - if err != nil { - return nil, err - } - - return optimizeExpression(ctx, rootExpr), nil -} - -func (p *Parser) parseExpression(depth int) (Expression, error) { - if depth >= MaxRecursionDeepness { - // This is a small hack, the panic is trapped at the public API `Parse` method. We do it with a panic - // to avoid the really deep wrapping of error that would happen if we returned right away. A test ensure - // that this behavior works as expected. - panic(parserError("expression is too long, too much ORs or parenthesis expressions", p.l.peekPos())) - } - - left, err := p.parseUnaryExpression(depth) - if err != nil { - return nil, err - } - - for { - p.l.skipSpaces() - next, err := p.l.Peek(0) - if err != nil { - return nil, err - } - - // If we reached end of file, we have finished our job - if next.EOF() { - return left, nil - } - - // If we reached right parenthesis, check if we were expecting one - if p.l.isRightParenthesis(next) { - if p.lookForRightParenthesis == 0 { - return nil, parserError("unexpected right parenthesis, expected right hand side expression or end of input", next.Pos) - } - - // We were expecting one, we finished our job for this part, decrement will be done at parsing site - return left, nil - } - - isImplicitAnd := true - if p.l.isBinaryOperator(next) { - isImplicitAnd = false - p.l.mustLexNext() - p.l.skipSpaces() - } - - // This implements precedence order between `&&` and `||`. A `&&` is parsed with the smallest - // next unit so it takes precedences while `||` parse with the longuest possibility. - parser := p.parseUnaryExpression - depthIncrease := 0 - if p.l.isOrOperator(next) { - parser = p.parseExpression - depthIncrease = 1 - } - - right, err := parser(depth + depthIncrease) - - switch { - case isImplicitAnd || p.l.isAndOperator(next): - if err != nil { - if isImplicitAnd { - return nil, fmt.Errorf("missing expression after implicit 'and' clause: %w", err) - } - - return nil, fmt.Errorf("missing expression after 'and' clause: %w", err) - } - - if v, ok := left.(*AndExpression); ok { - v.Children = append(v.Children, right) - } else { - left = &AndExpression{Children: []Expression{left, right}} - } - - case p.l.isOrOperator(next): - if err != nil { - return nil, fmt.Errorf("missing expression after 'or' clause: %w", err) - } - - // It's impossible to coascle `||` expressions since they are recursive - left = &OrExpression{Children: []Expression{left, right}} - - default: - if err != nil { - return nil, fmt.Errorf("unable to parse right hand side expression: %w", err) - } - - return nil, parserError(fmt.Sprintf("token type %s is not valid binary right hand side expression", p.l.getTokenType(next)), next.Pos) - } - } -} - -func (p *Parser) parseUnaryExpression(depth int) (Expression, error) { - p.l.skipSpaces() - - token, err := p.l.Peek(0) - if err != nil { - return nil, err - } - - if token.EOF() { - return nil, parserError("expected a key term, minus sign or left parenthesis, got end of input", token.Pos) - } - - switch { - case p.l.isName(token) || p.l.isQuoting(token): - return p.parseKeyTerm() - case p.l.isLeftParenthesis(token): - return p.parseParenthesisExpression(depth) - case p.l.isNotOperator(token): - return nil, fmt.Errorf("NOT operator (-) is not supported in the block filter") - default: - return nil, parserError(fmt.Sprintf("expected a key term, minus sign or left parenthesis, got %s", p.l.getTokenType(token)), token.Pos) - } -} - -func (p *Parser) parseParenthesisExpression(depth int) (Expression, error) { - // Consume left parenthesis - openingParenthesis := p.l.mustLexNext() - p.lookForRightParenthesis++ - - child, err := p.parseExpression(depth + 1) - if err != nil { - return nil, fmt.Errorf("invalid expression after opening parenthesis: %w", err) - } - - p.l.skipSpaces() - token, err := p.l.Next() - if err != nil { - return nil, err - } - - if token.EOF() { - return nil, parserError("expecting closing parenthesis, got end of input", openingParenthesis.Pos) - } - - if !p.l.isRightParenthesis(token) { - return nil, parserError(fmt.Sprintf("expecting closing parenthesis after expression, got %s", p.l.getTokenType(token)), token.Pos) - } - - p.lookForRightParenthesis-- - return &ParenthesisExpression{child}, nil -} - -func (p *Parser) parseKeyTerm() (Expression, error) { - token := p.l.mustLexNext() - - var value *StringLiteral - switch { - case p.l.isName(token): - value = &StringLiteral{ - Value: token.String(), - } - case p.l.isQuoting(token): - literal, err := p.parseQuotedString(token) - if err != nil { - return nil, err - } - - value = literal - default: - return nil, parserError(fmt.Sprintf("expecting key term, either a string or quoted string but got %s", p.l.getTokenType(token)), token.Pos) - } - - return &KeyTerm{ - Value: value, - }, nil -} - -func (p *Parser) parseQuotedString(startQuoting lex.Token) (*StringLiteral, error) { - builder := &strings.Builder{} - for { - token, err := p.l.Next() - if err != nil { - return nil, err - } - - if token.EOF() { - return nil, parserError(fmt.Sprintf("expecting closing quoting char %q, got end of input", startQuoting.Value), startQuoting.Pos) - } - - if p.l.isQuoting(token) { - value := builder.String() - if value == "" { - return nil, rangeParserError("an empty string is not valid", startQuoting.Pos, token.Pos) - } - - return &StringLiteral{ - Value: value, - QuotingChar: startQuoting.Value, - }, nil - } - - builder.WriteString(token.Value) - } -} diff --git a/starket-common/sqe/parser_bench_test.go b/starket-common/sqe/parser_bench_test.go deleted file mode 100644 index 9bdde62..0000000 --- a/starket-common/sqe/parser_bench_test.go +++ /dev/null @@ -1,54 +0,0 @@ -package sqe - -import ( - "context" - "strings" - "testing" -) - -func BenchmarkParseExpression(b *testing.B) { - tests := []struct { - name string - sqe string - }{ - {"single term", "action:data"}, - - // Those are kind of standard query that are parsed quite often - {"triple and term", "eosio data specificacct"}, - {"multiple and term", "data data.from: 'action' string"}, - {"multiple and/or term", "data (data.from || data.from) ('action' || expected) 'action' string"}, - - // Some convoluted big ORs list - {"big ORs list 100", buildFromOrToList(100)}, - {"big ORs list 1_000", buildFromOrToList(1000)}, - } - - for _, test := range tests { - b.Run(test.name, func(b *testing.B) { - setupBench(b) - for n := 0; n < b.N; n++ { - _, err := Parse(context.Background(), test.sqe) - if err != nil { - b.Error(err) - b.FailNow() - } - } - }) - } -} - -func buildFromOrToList(count int) string { - var elements []string - - // The count is divided by 2 since we add 2 addresses per iteration - for i := 0; i < count/2; i++ { - elements = append(elements, "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb") - } - - return "(" + strings.Join(elements, " || ") + ")" -} - -func setupBench(b *testing.B) { - b.ReportAllocs() - b.ResetTimer() -} diff --git a/starket-common/sqe/parser_test.go b/starket-common/sqe/parser_test.go deleted file mode 100644 index 55e1e3d..0000000 --- a/starket-common/sqe/parser_test.go +++ /dev/null @@ -1,317 +0,0 @@ -package sqe - -import ( - "context" - "fmt" - "os" - "strings" - "testing" - - lex "github.com/alecthomas/participle/lexer" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -const ValidateOnlyThatItParses = "!__valiateOnlyThatItParses__!" - -func TestParser(t *testing.T) { - tests := []struct { - name string - sqe string - expected string - expectedErr error - }{ - { - "single_key_term", - `transfer`, - `transfer`, - nil, - }, - { - "single_key_term_space_before", - ` transfer`, - `transfer`, - nil, - }, - { - "single_key_term_space_after", - `transfer `, - `transfer`, - nil, - }, - { - "single_key_term_space_both", - ` transfer `, - `transfer`, - nil, - }, - { - "single_key_term_with_dot_in_it", - `some.action`, - `some.action`, - nil, - }, - { - "single_key_term_multi_spaces", - " \t transfer", - `transfer`, - nil, - }, - { - "single_key_term_with_dot", - `data.name`, - `data.name`, - nil, - }, - { - "double_quoted_string", - `"test || value AND other ( 10 )!"`, - `"test || value AND other ( 10 )!"`, - nil, - }, - { - "double_quoted_string_multi_spaces", - ` " test || value AND other ( 10 )!"`, - `" test || value AND other ( 10 )!"`, - nil, - }, - - { - "single_quoted_string", - `'test:value || value AND other ( 10 )!'`, - `'test:value || value AND other ( 10 )!'`, - nil, - }, - { - "single_quoted_string_multi_spaces", - ` ' test:value || value AND other ( 10 )!'`, - `' test:value || value AND other ( 10 )!'`, - nil, - }, - - { - "top_level_single_and_implicit", - `one two`, - "", - nil, - }, - { - "top_level_single_and_implicit_double_quotes", - `"one" two`, - `<"one" && two>`, - nil, - }, - { - "top_level_single_and", - `one && two`, - "", - nil, - }, - { - "top_level_single_and_legacy", - `one && two`, - "", - nil, - }, - - { - "top_level_single_or", - `one || two`, - "[one || two]", - nil, - }, - { - "top_level_single_or_legacy", - `one || two`, - "[one || two]", - nil, - }, - - { - "top_level_parenthesis_single_term", - `(one)`, - `(one)`, - nil, - }, - { - "top_level_parenthesis_and_term", - `(one && two)`, - `()`, - nil, - }, - { - "top_level_parenthesis_and_term_double_quote", - `(one && "two")`, - `()`, - nil, - }, - { - "top_level_parenthesis_or_term", - `(one || two)`, - `([one || two])`, - nil, - }, - { - "top_level_parenthesis_or_term_with_double_quotes", - `( "one" || two)`, - `(["one" || two])`, - nil, - }, - { - "top_level_parenthesis_with_spaces", - ` ( one || two ) `, - `([one || two])`, - nil, - }, - - { - "top_level_multi_and", - `a b c d`, - ``, - nil, - }, - { - "top_level_multi_or", - `a || b || c || d`, - `[a || b || c || d]`, - nil, - }, - - { - "precedence_and_or", - `a b || c`, - `[ || c]`, - nil, - }, - { - "precedence_or_and", - `a || b c`, - `[a || ]`, - nil, - }, - { - "precedence_and_or_and", - `a b || c d`, - `[ || ]`, - nil, - }, - { - "precedence_and_and_or", - `a b c || d`, - `[ || d]`, - nil, - }, - - { - "precedence_parenthesis_and_or_and", - `a (b || c) d`, - ``, - nil, - }, - { - "precedence_parenthesis_and_or", - `a (b || c)`, - ``, - nil, - }, - - { - "ported_big_example", - `"eos" (transfer || issue || matant) from to`, - `<"eos" && ([transfer || issue || matant]) && from && to>`, - nil, - }, - { - "ported_with_newlines", - "(a ||\n b)", - `([a || b])`, - nil, - }, - - { - "depthness_100_ors", - buildFromOrToList(100), - ValidateOnlyThatItParses, - nil, - }, - { - "depthness_1_000_ors", - buildFromOrToList(1000), - ValidateOnlyThatItParses, - nil, - }, - { - "depthness_2_500_ors", - buildFromOrToList(2500), - ValidateOnlyThatItParses, - nil, - }, - - { - "error_missing_expression_after_and", - `a && `, - "", - fmt.Errorf("missing expression after 'and' clause: %w", - &ParseError{"expected a key term, minus sign or left parenthesis, got end of input", pos(1, 5, 6)}, - ), - }, - { - "error_missing_expression_after_or", - `a || `, - "", - fmt.Errorf("missing expression after 'or' clause: %w", &ParseError{"expected a key term, minus sign or left parenthesis, got end of input", pos(1, 5, 6)}), - }, - { - "error_unstarted_right_parenthesis", - `a )`, - "", - &ParseError{"unexpected right parenthesis, expected right hand side expression or end of input", pos(1, 2, 3)}, - }, - { - "error_unclosed_over_left_parenthesis", - `( a`, - "", - &ParseError{"expecting closing parenthesis, got end of input", pos(1, 0, 1)}, - }, - { - "error_deepness_reached", - buildFromOrToList(MaxRecursionDeepness + 1), - "", - &ParseError{"expression is too long, too much ORs or parenthesis expressions", pos(1, 91251, 91252)}, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - if os.Getenv("DEBUG") != "" { - printTokens(t, test.sqe) - } - - parser, err := NewParser(strings.NewReader(test.sqe)) - require.NoError(t, err) - - expression, err := parser.Parse(context.Background()) - require.Equal(t, test.expectedErr, err) - - if test.expectedErr == nil && err == nil && test.expected != ValidateOnlyThatItParses { - assert.Equal(t, test.expected, expressionToString(expression), "Invalid parsing for SEQ %q", test.sqe) - } - }) - } -} - -func pos(line, offset, column int) lex.Position { - return lex.Position{Filename: "", Line: line, Offset: offset, Column: column} -} - -func printTokens(t *testing.T, input string) { - lexer, err := lexerDefinition.Lex(strings.NewReader(input)) - require.NoError(t, err) - - tokens, err := lex.ConsumeAll(lexer) - require.NoError(t, err) - - for _, token := range tokens { - fmt.Print(token.GoString()) - } -} diff --git a/starket-common/sqe/transformer.go b/starket-common/sqe/transformer.go deleted file mode 100644 index 7a94afa..0000000 --- a/starket-common/sqe/transformer.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2024 StreamingFast Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package sqe - -type FieldTransformer interface { - // TransformFieldName receives the field name and allow receiver of the invocation to update its name. The field's - // name is updated if the invocation returns a nil error. - TransformFieldName(field string) (string, error) - - // TransformStringLiteral receives the field name (the updated one from a prior invocation of `TransformFieldName`) - // and a string literal (either a direct one or a sub-element from a `StringList`) and allows transformation of the - // `StringLiteral` value in place. - TransformStringLiteral(field string, value *StringLiteral) error -} - -type noOpTransformer struct{} - -func (noOpTransformer) TransformFieldName(field string) (string, error) { - return field, nil -} - -func (noOpTransformer) TransformStringLiteral(field string, value *StringLiteral) error { - return nil -} - -var NoOpFieldTransformer noOpTransformer diff --git a/starket-common/sqe/traversal.go b/starket-common/sqe/traversal.go deleted file mode 100644 index a6f7c4a..0000000 --- a/starket-common/sqe/traversal.go +++ /dev/null @@ -1,113 +0,0 @@ -package sqe - -import ( - "context" - "errors" -) - -type OnExpression func(ctx context.Context, expr Expression) error - -var ErrStopVisit = errors.New("stop") - -type DepthFirstVisitor struct { - beforeVisit OnExpression - afterVisit OnExpression - stopped bool -} - -func NewDepthFirstVisitor(beforeVisit, afterVisit OnExpression) *DepthFirstVisitor { - return &DepthFirstVisitor{beforeVisit: beforeVisit, afterVisit: afterVisit} -} - -func (v *DepthFirstVisitor) Visit_And(ctx context.Context, e *AndExpression) error { - return v.visit_binary(ctx, e, e.Children) -} - -func (v *DepthFirstVisitor) Visit_Or(ctx context.Context, e *OrExpression) error { - return v.visit_binary(ctx, e, e.Children) -} - -func (v *DepthFirstVisitor) visit_binary(ctx context.Context, parent Expression, children []Expression) error { - if stop, err := v.executeCallback(ctx, parent, v.beforeVisit); stop { - return err - } - - for _, child := range children { - err := child.Visit(ctx, v) - if v.stopped || err != nil { - return err - } - } - - if stop, err := v.executeCallback(ctx, parent, v.afterVisit); stop { - return err - } - - return nil -} - -func (v *DepthFirstVisitor) Visit_Parenthesis(ctx context.Context, e *ParenthesisExpression) error { - if stop, err := v.executeCallback(ctx, e, v.beforeVisit); stop { - return err - } - - if err := e.Child.Visit(ctx, v); err != nil { - return err - } - - if stop, err := v.executeCallback(ctx, e, v.afterVisit); stop { - return err - } - - return nil -} - -func (v *DepthFirstVisitor) Visit_Not(ctx context.Context, e *NotExpression) error { - if stop, err := v.executeCallback(ctx, e, v.beforeVisit); stop { - return err - } - - if err := e.Child.Visit(ctx, v); err != nil { - return err - } - - if stop, err := v.executeCallback(ctx, e, v.afterVisit); stop { - return err - } - - return nil -} - -func (v *DepthFirstVisitor) Visit_KeyTerm(ctx context.Context, e *KeyTerm) error { - if stop, err := v.executeCallback(ctx, e, v.beforeVisit); stop { - return err - } - - if stop, err := v.executeCallback(ctx, e, v.afterVisit); stop { - return err - } - - return nil -} - -func (v *DepthFirstVisitor) executeCallback(ctx context.Context, e Expression, callback OnExpression) (stop bool, err error) { - if callback == nil { - return false, nil - } - - if v.stopped { - return true, nil - } - - if err := callback(ctx, e); err != nil { - if err == ErrStopVisit { - v.stopped = true - return true, nil - } else { - v.stopped = true - return true, err - } - } - - return false, nil -} diff --git a/starket-common/sqe/types.go b/starket-common/sqe/types.go deleted file mode 100644 index 41841db..0000000 --- a/starket-common/sqe/types.go +++ /dev/null @@ -1,111 +0,0 @@ -package sqe - -import ( - "context" - "fmt" -) - -type Visitor interface { - Visit_And(ctx context.Context, expr *AndExpression) error - Visit_Or(ctx context.Context, expr *OrExpression) error - Visit_Parenthesis(ctx context.Context, expr *ParenthesisExpression) error - Visit_Not(ctx context.Context, expr *NotExpression) error - Visit_KeyTerm(ctx context.Context, expr *KeyTerm) error -} - -type Expression interface { - Visit(ctx context.Context, visitor Visitor) error -} - -type HasChildrenExpression interface { - GetChildren() []Expression -} - -type AndExpression struct { - Children []Expression -} - -func andExpr(children ...Expression) *AndExpression { - return &AndExpression{Children: children} -} - -func (e *AndExpression) Visit(ctx context.Context, visitor Visitor) error { - return visitor.Visit_And(ctx, e) -} - -func (e *AndExpression) GetChildren() []Expression { - return e.Children -} - -type OrExpression struct { - Children []Expression -} - -func orExpr(children ...Expression) *OrExpression { - return &OrExpression{Children: children} -} - -func (e *OrExpression) Visit(ctx context.Context, visitor Visitor) error { - return visitor.Visit_Or(ctx, e) -} - -func (e *OrExpression) GetChildren() []Expression { - return e.Children -} - -type ParenthesisExpression struct { - Child Expression -} - -func parensExpr(expr Expression) *ParenthesisExpression { - return &ParenthesisExpression{Child: expr} -} - -func (e *ParenthesisExpression) Visit(ctx context.Context, visitor Visitor) error { - return visitor.Visit_Parenthesis(ctx, e) -} - -type NotExpression struct { - Child Expression -} - -func notExpr(expr Expression) *NotExpression { - return &NotExpression{Child: expr} -} - -func (e *NotExpression) Visit(ctx context.Context, visitor Visitor) error { - return visitor.Visit_Not(ctx, e) -} - -type KeyTerm struct { - Value *StringLiteral -} - -func keyTermExpr(value string) *KeyTerm { - return &KeyTerm{Value: &StringLiteral{Value: value}} -} - -func (e *KeyTerm) Visit(ctx context.Context, visitor Visitor) error { - return visitor.Visit_KeyTerm(ctx, e) -} - -type StringLiteral struct { - Value string - QuotingChar string -} - -func (e *StringLiteral) Literal() string { - return e.Value -} - -func (e *StringLiteral) SetValue(value string) { - e.Value = value -} - -func (e *StringLiteral) String() string { - if e.QuotingChar != "" { - return fmt.Sprintf("%s%s%s", e.QuotingChar, e.Value, e.QuotingChar) - } - - return e.Value -} diff --git a/starket-common/substreams.yaml b/starket-common/substreams.yaml deleted file mode 100644 index e88d9fe..0000000 --- a/starket-common/substreams.yaml +++ /dev/null @@ -1,59 +0,0 @@ -specVersion: v0.1.0 -package: - name: starknet_foundational - version: v0.1.2 - -protobuf: - files: - - starknet.proto - importPaths: - - ./proto/sf/substreams/starknet/type/v1 - -imports: - starknet: /Users/cbillett/devel/sf/substreams-starknet/starknet-v0.1.2.spkg - -binaries: - default: - type: wasip1/tinygo-v1 # wasm/rust-v1 - file: ./wasm.wasm - -network: starknet - -modules: - - name: all_transactions - kind: map - initialBlock: 0 - inputs: - - source: sf.starknet.type.v1.Block - output: - type: proto:sf.substreams.starknet.type.v1.Transactions - doc: | - `all_transaction` reads from the `sf.starknet.type.v1.Block` source and outputs a list of all transactions in the block. - - - name: index_transactions - kind: blockIndex - inputs: - - map: all_transactions - output: - type: proto:sf.substreams.index.v1.Keys - doc: | - `index_events` sets the keys corresponding to all event 'types' and 'attribute keys' in the block - - - name: filtered_transactions - kind: map - blockFilter: - module: index_transactions - query: - params: true - inputs: - - params: string - - map: all_transactions - output: - type: proto:sf.substreams.starknet.type.v1.Transactions - doc: | - `filtered_transactions` reads from `all_transactions` and applies a filter on keys, - only outputting the transactions that match the filter. - Example usage: `(tx:class_hash:0x0000000 && rc:type:0)` - -params: - filtered_transactions: "(rc:execution_status:1)" From 16f41313cc52e5b01e1cef7ea713be9245d8cd12 Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Tue, 16 Jul 2024 12:36:30 -0400 Subject: [PATCH 19/23] remove old files 2 --- starket-common/.idea/workspace.xml | 56 ------------------------------ 1 file changed, 56 deletions(-) delete mode 100644 starket-common/.idea/workspace.xml diff --git a/starket-common/.idea/workspace.xml b/starket-common/.idea/workspace.xml deleted file mode 100644 index 4b86796..0000000 --- a/starket-common/.idea/workspace.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - true - - \ No newline at end of file From 5c2b4f12d4134172bc3bda2e8e93bc1b182b62ae Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Wed, 17 Jul 2024 14:57:11 -0400 Subject: [PATCH 20/23] code cleanup --- starknet-common/generated.go | 138 ++++++++++++++++++----------------- starknet-common/index.go | 11 +++ starknet-common/main.go | 25 +++---- starknet-common/main_test.go | 2 + 4 files changed, 94 insertions(+), 82 deletions(-) create mode 100644 starknet-common/index.go diff --git a/starknet-common/generated.go b/starknet-common/generated.go index 6947933..03e9b0c 100644 --- a/starknet-common/generated.go +++ b/starknet-common/generated.go @@ -4,6 +4,7 @@ package main import ( "fmt" + "os" "reflect" "unsafe" @@ -16,117 +17,112 @@ import ( // Dans WASI: _start func main() {} -////export db_get_i64 -//func _db_get_i64(code, scope, key uint64) []byte {} +func panic(a any) { + os.Exit(2) //fail-safe so we know someone call panic +} //export output -func _output(ptr, len int32) {} +func _output(ptr, len int32) //go:wasm-module logger //export println -func _log(ptr int32, len int32) {} +func _log(ptr int32, len int32) + +// Log a line to the Substreams engine +func Logf(message string, args ...any) { + _log(stringToPtr(fmt.Sprintf(message, args...))) +} // Output the serialized protobuf byte array to the Substreams engine func output(out []byte) { _output(byteArrayToPtr(out)) } -// Log a line to the Substreams engine -func Logf(message string, args ...any) { - _log(stringToPtr(fmt.Sprintf(message, args...))) +type OutputError struct { + msg string +} + +func (o OutputError) Error() string { + return o.msg +} + +func outputVT(out vtMessage) error { + if out == nil || reflect.ValueOf(out).IsNil() { + return nil + } + b, err := out.MarshalVT() + if err != nil { + return fmt.Errorf("marshalling output: %w", err) + } + if len(b) == 0 { + return nil + } + output(b) + return nil } //export all_transactions func _all_transactions(blockPtr, blockLen int32) (retval int32) { - defer func() { - if r := recover(); r != nil { - Logf("%#v", r) - retval = 1 - } - }() - - a := ptrToString(blockPtr, blockLen) - b := []byte(a) - dest := &pbstarknet.Block{} - if err := dest.UnmarshalVT(b); err != nil { - Logf("failed unmarshal: %s", err) + block := &pbstarknet.Block{} + if err := unmarshalVT(blockPtr, blockLen, block); err != nil { + Logf("failed unmarshal block: %s", err) return 1 } - ret, err := AllTransactions(dest) + output, err := AllTransactions(block) if err != nil { - panic(fmt.Errorf("map_extrinsics failed: %w", err)) + Logf("executing all_transactions: %s", err) + return 1 } - if ret != nil { - cnt, err := ret.MarshalVT() - if err != nil { - panic(fmt.Errorf("marshal output: %w", err)) - } - output(cnt) + + if err := outputVT(output); err != nil { + Logf("outputing vt message: %s", err) + return 1 } + return 0 } //export index_transactions func _index_transactions(ptr, len int32) (retval int32) { - defer func() { - if r := recover(); r != nil { - Logf("%#v", r) - retval = 1 - } - }() - - a := ptrToString(int32(ptr), int32(len)) - b := []byte(a) - dest := &v1.Transactions{} - if err := dest.UnmarshalVT(b); err != nil { - Logf("failed unmarshal: %s", err) + transactions := &v1.Transactions{} + if err := unmarshalVT(ptr, len, transactions); err != nil { + Logf("unmarshalling transactions: %s", err) return 1 } - ret, err := IndexTransaction(dest) + output, err := IndexTransactions(transactions) if err != nil { - panic(fmt.Errorf("map_extrinsics failed: %w", err)) + Logf("executing index_transactions: %s", err) + return 1 + } - if ret != nil { - cnt, err := ret.MarshalVT() - if err != nil { - panic(fmt.Errorf("marshal output: %w", err)) - } - output(cnt) + if err := outputVT(output); err != nil { + Logf("outputing vt message: %s", err) + return 1 } return 0 } //export filtered_transactions func _filtered_transactions(queryPtr, queryLen int32, transactionsPtr, transactionsLen int32) (ret int32) { - defer func() { - if r := recover(); r != nil { - Logf("%#v", r) - ret = 1 - } - }() - query := ptrToString(queryPtr, queryLen) - txsData := ptrToBytes(transactionsPtr, transactionsLen) - txs := &v1.Transactions{} - if err := txs.UnmarshalVT(txsData); err != nil { - Logf("failed unmarshal: %s", err) + txs := &v1.Transactions{} + if err := unmarshalVT(transactionsPtr, transactionsLen, txs); err != nil { + Logf("failed unmarshal transactions: %s", err) return 1 } - out, err := FilteredTransactions(query, txs) + output, err := FilteredTransactions(query, txs) if err != nil { - panic(fmt.Errorf("map_extrinsics failed: %w", err)) + Logf("calling filtered_transactions: %s", err) + return 1 } - if out != nil { - cnt, err := out.MarshalVT() - if err != nil { - panic(fmt.Errorf("marshal output: %w", err)) - } - output(cnt) + if err := outputVT(output); err != nil { + Logf("outputing vt message: %s", err) + return 1 } return 0 } @@ -168,3 +164,13 @@ func byteArrayToPtr(buf []byte) (int32, int32) { unsafePtr := uintptr(unsafe.Pointer(ptr)) return int32(unsafePtr), int32(len(buf)) } + +type vtMessage interface { + MarshalVT() ([]byte, error) + UnmarshalVT([]byte) error +} + +func unmarshalVT(prt, len int32, dest vtMessage) error { + b := ptrToBytes(prt, len) + return dest.UnmarshalVT(b) +} diff --git a/starknet-common/index.go b/starknet-common/index.go new file mode 100644 index 0000000..9e5d2a8 --- /dev/null +++ b/starknet-common/index.go @@ -0,0 +1,11 @@ +package main + +import pbindex "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/substreams/index/v1" + +type Index struct { + Keys *pbindex.Keys +} + +func (i *Index) AddKey(key string) { + i.Keys.Keys = append(i.Keys.Keys, key) +} diff --git a/starknet-common/main.go b/starknet-common/main.go index ef300d2..11e7ecd 100644 --- a/starknet-common/main.go +++ b/starknet-common/main.go @@ -5,13 +5,12 @@ import ( "fmt" "time" - "github.com/streamingfast/substreams-foundational-modules/starknet-common/sqe" - "github.com/NethermindEth/juno/core/felt" pbstarknet "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/starknet/type/v1" pbindex "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/substreams/index/v1" v1 "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/substreams/starknet/type/v1" pbsubstreams "github.com/streamingfast/substreams-foundational-modules/starknet-common/pb/sf/substreams/v1" + "github.com/streamingfast/substreams-foundational-modules/starknet-common/sqe" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -25,6 +24,7 @@ func AllTransactions(block *pbstarknet.Block) (*v1.Transactions, error) { transactions := &v1.Transactions{ Clock: clock, } + for _, tx := range block.Transactions { transactions.TransactionsWithReceipt = append(transactions.TransactionsWithReceipt, tx) } @@ -32,8 +32,9 @@ func AllTransactions(block *pbstarknet.Block) (*v1.Transactions, error) { return transactions, nil } -func IndexTransaction(transactions *v1.Transactions) (*pbindex.Keys, error) { +func IndexTransactions(transactions *v1.Transactions) (*pbindex.Keys, error) { keys := &pbindex.Keys{} + for _, tx := range transactions.TransactionsWithReceipt { idx, err := indexForTransactionsWithReceipt(tx) if err != nil { @@ -41,6 +42,7 @@ func IndexTransaction(transactions *v1.Transactions) (*pbindex.Keys, error) { } keys.Keys = append(keys.Keys, idx.Keys.Keys...) } + return keys, nil } @@ -130,7 +132,7 @@ func indexForTransactionsWithReceipt(transaction *pbstarknet.TransactionWithRece } func FilteredTransactions(query string, transactions *v1.Transactions) (*v1.Transactions, error) { - filtered := &v1.Transactions{ + filteredTransactions := &v1.Transactions{ Clock: transactions.Clock, } @@ -145,16 +147,15 @@ func FilteredTransactions(query string, transactions *v1.Transactions) (*v1.Tran return nil, fmt.Errorf("applying query: %w", err) } if match { - filtered.TransactionsWithReceipt = append(filtered.TransactionsWithReceipt, tx) + filteredTransactions.TransactionsWithReceipt = append(filteredTransactions.TransactionsWithReceipt, tx) } - } - if len(filtered.TransactionsWithReceipt) == 0 { + if len(filteredTransactions.TransactionsWithReceipt) == 0 { return &v1.Transactions{}, nil } - return filtered, nil + return filteredTransactions, nil } func applyQuery(keys *pbindex.Keys, query string) (bool, error) { @@ -167,14 +168,6 @@ func applyQuery(keys *pbindex.Keys, query string) (bool, error) { return sqe.KeysApply(q, keyQuerier), nil } -type Index struct { - Keys *pbindex.Keys -} - -func (i *Index) AddKey(key string) { - i.Keys.Keys = append(i.Keys.Keys, key) -} - func stringToIndexKey(prefix, str string) string { return fmt.Sprintf("%s:%s", prefix, str) } diff --git a/starknet-common/main_test.go b/starknet-common/main_test.go index b3733c8..b169456 100644 --- a/starknet-common/main_test.go +++ b/starknet-common/main_test.go @@ -1,3 +1,5 @@ +//go:build !tinygo && !wasip1 + package main import ( From e8d7dfb8d95686092ea965b1d47bf54c9ee0437a Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Thu, 18 Jul 2024 09:49:17 -0400 Subject: [PATCH 21/23] remove event keys from index --- starknet-common/main.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/starknet-common/main.go b/starknet-common/main.go index 11e7ecd..a465724 100644 --- a/starknet-common/main.go +++ b/starknet-common/main.go @@ -123,9 +123,6 @@ func indexForTransactionsWithReceipt(transaction *pbstarknet.TransactionWithRece for _, e := range receipt.Events { index.AddKey(feltToIndexKey("ev:from_address", e.FromAddress)) - for _, key := range e.Keys { - index.AddKey(feltToIndexKey("ev:key", key)) - } } return index, nil From 8a9f2fd2f62636edfa8deb4f851f127db5cbc3eb Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Thu, 18 Jul 2024 09:50:40 -0400 Subject: [PATCH 22/23] bump version --- starknet-common/substreams.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starknet-common/substreams.yaml b/starknet-common/substreams.yaml index e88d9fe..270f7e0 100644 --- a/starknet-common/substreams.yaml +++ b/starknet-common/substreams.yaml @@ -1,7 +1,7 @@ specVersion: v0.1.0 package: name: starknet_foundational - version: v0.1.2 + version: v0.1.3 protobuf: files: From 9afa70faf455a2a35ed537d34c064e431ddc9c0b Mon Sep 17 00:00:00 2001 From: Eduard Voiculescu Date: Wed, 24 Jul 2024 19:19:10 -0400 Subject: [PATCH 23/23] updating vara common module --- vara-common/gen.go | 4 +- vara-common/go.mod | 16 +- vara-common/go.sum | 34 +- vara-common/main.go | 67 +- vara-common/pb/block.pb.go | 750 +++--- vara-common/pb/block_vtproto.pb.go | 3498 +++++++++++----------------- vara-common/proto/block.proto | 61 +- vara-common/proto/extrinsics.proto | 95 - vara-common/substreams.yaml | 8 +- 9 files changed, 1682 insertions(+), 2851 deletions(-) delete mode 100644 vara-common/proto/extrinsics.proto diff --git a/vara-common/gen.go b/vara-common/gen.go index 534bde3..c5aa903 100644 --- a/vara-common/gen.go +++ b/vara-common/gen.go @@ -5,7 +5,7 @@ import ( "reflect" "unsafe" - pbgear "github.com/streamingfast/tinygo-test/pb" + pbgear "github.com/streamingfast/firehose-gear/pb/sf/gear/type/v1" ) //go:generate substreams protogen ./substreams.yaml --with-tinygo-maps // creates genre substreams.gen.go @@ -50,7 +50,7 @@ func _map_extrinsics(blockPtr, blockLen uint32) (retval uint32) { return 1 } - ret, err := map_extrinsics(dest) + ret, err := map_decoded_block(dest) if err != nil { panic(fmt.Errorf("map_extrinsics failed: %w", err)) } diff --git a/vara-common/go.mod b/vara-common/go.mod index 1e00d9c..ed5d39e 100644 --- a/vara-common/go.mod +++ b/vara-common/go.mod @@ -1,31 +1,35 @@ -module github.com/streamingfast/tinygo-test +module github.com/streamingfast/substreams-foundational-modules/vara-common go 1.22.0 require ( - github.com/centrifuge/go-substrate-rpc-client v1.1.0 github.com/centrifuge/go-substrate-rpc-client/v4 v4.2.1 github.com/planetscale/vtprotobuf v0.6.0 google.golang.org/protobuf v1.33.0 ) +require ( + github.com/holiman/uint256 v1.2.4 // indirect + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect +) + require ( github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/base58 v1.0.4 // indirect github.com/decred/dcrd/crypto/blake256 v1.0.0 // indirect - github.com/ethereum/go-ethereum v1.10.20 // indirect - github.com/go-stack/stack v1.8.1 // indirect + github.com/ethereum/go-ethereum v1.13.8 // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b // indirect github.com/pierrec/xxHash v0.1.5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/streamingfast/firehose-gear v0.0.0-20240724224743-65ed39c779b8 github.com/stretchr/objx v0.5.0 // indirect github.com/stretchr/testify v1.8.4 // indirect github.com/vedhavyas/go-subkey/v2 v2.0.0 // indirect - golang.org/x/crypto v0.7.0 // indirect - golang.org/x/sys v0.11.0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/sys v0.20.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/vara-common/go.sum b/vara-common/go.sum index d823574..08bead7 100644 --- a/vara-common/go.sum +++ b/vara-common/go.sum @@ -18,21 +18,21 @@ github.com/decred/base58 v1.0.4 h1:QJC6B0E0rXOPA8U/kw2rP+qiRJsUaE2Er+pYb3siUeA= github.com/decred/base58 v1.0.4/go.mod h1:jJswKPEdvpFpvf7dsDvFZyLT22xZ9lWqEByX38oGd9E= github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= -github.com/ethereum/go-ethereum v1.10.20 h1:75IW830ClSS40yrQC1ZCMZCt5I+zU16oqId2SiQwdQ4= -github.com/ethereum/go-ethereum v1.10.20/go.mod h1:LWUN82TCHGpxB3En5HVmLLzPD7YSrEUFmFfN1nKkVN0= -github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= -github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= +github.com/ethereum/go-ethereum v1.13.8 h1:1od+thJel3tM52ZUNQwvpYOeRHlbkVFZ5S8fhi0Lgsg= +github.com/ethereum/go-ethereum v1.13.8/go.mod h1:sc48XYQxCzH3fG9BcrXCOOgQk2JfZzNAmIKnceogzsA= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= +github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= +github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b h1:QrHweqAtyJ9EwCaGHBu1fghwxIPiopAHV06JlXrMHjk= github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b/go.mod h1:xxLb2ip6sSUts3g1irPVHyk/DGslwQsNOo9I7smJfNU= @@ -42,6 +42,8 @@ github.com/planetscale/vtprotobuf v0.6.0 h1:nBeETjudeJ5ZgBHUz1fVHvbqUKnYOXNhsIEa github.com/planetscale/vtprotobuf v0.6.0/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/streamingfast/firehose-gear v0.0.0-20240724224743-65ed39c779b8 h1:E8bjQd+zWB2Fww6mU6YeFY58EdxgKoSfC1YNzDIyOCc= +github.com/streamingfast/firehose-gear v0.0.0-20240724224743-65ed39c779b8/go.mod h1:by7C9HkbIzvwkfT1ymS8xbwtlWGEImumQW/c0q9UzoQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= @@ -57,16 +59,16 @@ github.com/vedhavyas/go-subkey/v2 v2.0.0/go.mod h1:95aZ+XDCWAUUynjlmi7BtPExjXgXx golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= diff --git a/vara-common/main.go b/vara-common/main.go index 75dfa3c..c555e6f 100644 --- a/vara-common/main.go +++ b/vara-common/main.go @@ -1,57 +1,42 @@ package main import ( + "bytes" "fmt" "github.com/centrifuge/go-substrate-rpc-client/v4/registry" - pbgear "github.com/streamingfast/tinygo-test/pb" + "github.com/centrifuge/go-substrate-rpc-client/v4/scale" + "github.com/centrifuge/go-substrate-rpc-client/v4/types" + pbgear "github.com/streamingfast/firehose-gear/pb/sf/gear/type/v1" ) -func map_extrinsics(block *pbgear.Block) (*pbgear.ParsedExtrinsics, error) { - parsedExtrinsics, err := convertExtrinsics(block.Extrinsics) - if err != nil { - return nil, fmt.Errorf("failed to convert extrinsics: %w", err) - } - - return &pbgear.ParsedExtrinsics{ - BlockHash: block.Hash, - Extrinsics: parsedExtrinsics, - }, nil +// this will actually return a decodedBlock containing all the decoded calls and events +func map_decoded_block(block *pbgear.Block) (*pbgear.Block, error) { + return nil, nil } -func convertExtrinsics(extrinsics []*pbgear.Extrinsic) ([]*pbgear.ParsedExtrinsic, error) { - gearExtrinsics := make([]*pbgear.ParsedExtrinsic, 0, len(extrinsics)) - for _, extrinsic := range extrinsics { - callFields, err := convertDecodedFields(extrinsic) - if err != nil { - return nil, fmt.Errorf("failed to convert decoded fields: %w", err) - } - _ = callFields - // gearExtrinsics = append(gearExtrinsics, &pbgear.ParsedExtrinsic{ - // Name: extrinsic.Name, - // CallFields: callFields, - // CallIndex: convertCallIndex(extrinsic.CallIndex), - // Version: uint32(extrinsic.Version), - // Signature: convertExtrinsicsSignature(extrinsic.Signature), - // }) +func decodeCallExtrinsics(callRegistry registry.CallRegistry, extrinsic *pbgear.Extrinsic) (registry.DecodedFields, error) { + callIndex := extrinsic.Method.CallIndex + args := extrinsic.Method.Args + + callDecoder, ok := callRegistry[convertCallIndex(callIndex)] + if ok != true { + return nil, fmt.Errorf("failed to get call decoder") } - return gearExtrinsics, nil -} + decoder := scale.NewDecoder(bytes.NewReader(args)) -func convertDecodedFields(extrinsic *pbgear.Extrinsic) (*pbgear.ParsedExtrinsic, error) { - return &pbgear.ParsedExtrinsic{ - Name: "", - CallFields: , - CallIndex: , - Version: extrinsic.Version, - Signature: convertSignature(extrinsic.Signature), - }, nil + callFields, err := callDecoder.Decode(decoder) + if err != nil { + return nil, fmt.Errorf("failed to decode call: %w", err) + } + + return callFields, nil } -func convertSignature(signature *pbgear.ExtrinsicSignature) *pbgear.ParsedExtrinsicSignature { - return &pbgear.ParsedExtrinsicSignature{ - Signer: signature.Signer, - Signature: signature.Signature, +func convertCallIndex(ci *pbgear.CallIndex) types.CallIndex { + return types.CallIndex{ + SectionIndex: uint8(ci.SectionIndex), + MethodIndex: uint8(ci.MethodIndex), } -} \ No newline at end of file +} diff --git a/vara-common/pb/block.pb.go b/vara-common/pb/block.pb.go index ca9d014..1b04093 100644 --- a/vara-common/pb/block.pb.go +++ b/vara-common/pb/block.pb.go @@ -26,7 +26,7 @@ type Block struct { unknownFields protoimpl.UnknownFields Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` - Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` Header *Header `protobuf:"bytes,3,opt,name=header,proto3" json:"header,omitempty"` Extrinsics []*Extrinsic `protobuf:"bytes,4,rep,name=extrinsics,proto3" json:"extrinsics,omitempty"` Events []*Event `protobuf:"bytes,5,rep,name=events,proto3" json:"events,omitempty"` @@ -73,11 +73,11 @@ func (x *Block) GetNumber() uint64 { return 0 } -func (x *Block) GetHash() string { +func (x *Block) GetHash() []byte { if x != nil { return x.Hash } - return "" + return nil } func (x *Block) GetHeader() *Header { @@ -121,11 +121,13 @@ type Header struct { unknownFields protoimpl.UnknownFields // [32]byte - ParentHash string `protobuf:"bytes,1,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` + ParentHash []byte `protobuf:"bytes,1,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` // [32]byte - StateRoot string `protobuf:"bytes,2,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` + StateRoot []byte `protobuf:"bytes,2,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` // [32]byte - ExtrinsicsRoot string `protobuf:"bytes,3,opt,name=extrinsics_root,json=extrinsicsRoot,proto3" json:"extrinsics_root,omitempty"` + ExtrinsicsRoot []byte `protobuf:"bytes,3,opt,name=extrinsics_root,json=extrinsicsRoot,proto3" json:"extrinsics_root,omitempty"` + SpecVersion uint32 `protobuf:"varint,4,opt,name=spec_version,json=specVersion,proto3" json:"spec_version,omitempty"` + UpdatedMetadata []byte `protobuf:"bytes,5,opt,name=updated_metadata,json=updatedMetadata,proto3" json:"updated_metadata,omitempty"` } func (x *Header) Reset() { @@ -160,25 +162,39 @@ func (*Header) Descriptor() ([]byte, []int) { return file_block_proto_rawDescGZIP(), []int{1} } -func (x *Header) GetParentHash() string { +func (x *Header) GetParentHash() []byte { if x != nil { return x.ParentHash } - return "" + return nil } -func (x *Header) GetStateRoot() string { +func (x *Header) GetStateRoot() []byte { if x != nil { return x.StateRoot } - return "" + return nil } -func (x *Header) GetExtrinsicsRoot() string { +func (x *Header) GetExtrinsicsRoot() []byte { if x != nil { return x.ExtrinsicsRoot } - return "" + return nil +} + +func (x *Header) GetSpecVersion() uint32 { + if x != nil { + return x.SpecVersion + } + return 0 +} + +func (x *Header) GetUpdatedMetadata() []byte { + if x != nil { + return x.UpdatedMetadata + } + return nil } type DigestItem struct { @@ -236,11 +252,11 @@ func (m *DigestItem) GetItem() isDigestItem_Item { return nil } -func (x *DigestItem) GetAsChangesTrieRoot() string { +func (x *DigestItem) GetAsChangesTrieRoot() []byte { if x, ok := x.GetItem().(*DigestItem_AsChangesTrieRoot); ok { return x.AsChangesTrieRoot } - return "" + return nil } func (x *DigestItem) GetAsPreRuntime() *PreRuntime { @@ -284,7 +300,7 @@ type isDigestItem_Item interface { type DigestItem_AsChangesTrieRoot struct { // [32]byte - AsChangesTrieRoot string `protobuf:"bytes,1,opt,name=as_changes_trie_root,json=asChangesTrieRoot,proto3,oneof"` + AsChangesTrieRoot []byte `protobuf:"bytes,1,opt,name=as_changes_trie_root,json=asChangesTrieRoot,proto3,oneof"` } type DigestItem_AsPreRuntime struct { @@ -690,18 +706,16 @@ type MultiAddress struct { IsId bool `protobuf:"varint,1,opt,name=is_id,json=isId,proto3" json:"is_id,omitempty"` // [32]byte - AsId string `protobuf:"bytes,2,opt,name=as_id,json=asId,proto3" json:"as_id,omitempty"` - IsIndex bool `protobuf:"varint,3,opt,name=is_index,json=isIndex,proto3" json:"is_index,omitempty"` - AsIndex uint32 `protobuf:"varint,4,opt,name=as_index,json=asIndex,proto3" json:"as_index,omitempty"` - IsRaw bool `protobuf:"varint,5,opt,name=is_raw,json=isRaw,proto3" json:"is_raw,omitempty"` - // []byte - AsRaw string `protobuf:"bytes,6,opt,name=as_raw,json=asRaw,proto3" json:"as_raw,omitempty"` + AsId []byte `protobuf:"bytes,2,opt,name=as_id,json=asId,proto3" json:"as_id,omitempty"` + IsIndex bool `protobuf:"varint,3,opt,name=is_index,json=isIndex,proto3" json:"is_index,omitempty"` + AsIndex uint32 `protobuf:"varint,4,opt,name=as_index,json=asIndex,proto3" json:"as_index,omitempty"` + IsRaw bool `protobuf:"varint,5,opt,name=is_raw,json=isRaw,proto3" json:"is_raw,omitempty"` + AsRaw []byte `protobuf:"bytes,6,opt,name=as_raw,json=asRaw,proto3" json:"as_raw,omitempty"` IsAddress_32 bool `protobuf:"varint,7,opt,name=is_address_32,json=isAddress32,proto3" json:"is_address_32,omitempty"` - // []byte - AsAddress_32 string `protobuf:"bytes,8,opt,name=as_address_32,json=asAddress32,proto3" json:"as_address_32,omitempty"` + AsAddress_32 []byte `protobuf:"bytes,8,opt,name=as_address_32,json=asAddress32,proto3" json:"as_address_32,omitempty"` IsAddress_20 bool `protobuf:"varint,9,opt,name=is_address_20,json=isAddress20,proto3" json:"is_address_20,omitempty"` // [20]byte - AsAddress_20 string `protobuf:"bytes,10,opt,name=as_address_20,json=asAddress20,proto3" json:"as_address_20,omitempty"` + AsAddress_20 []byte `protobuf:"bytes,10,opt,name=as_address_20,json=asAddress20,proto3" json:"as_address_20,omitempty"` } func (x *MultiAddress) Reset() { @@ -743,11 +757,11 @@ func (x *MultiAddress) GetIsId() bool { return false } -func (x *MultiAddress) GetAsId() string { +func (x *MultiAddress) GetAsId() []byte { if x != nil { return x.AsId } - return "" + return nil } func (x *MultiAddress) GetIsIndex() bool { @@ -771,11 +785,11 @@ func (x *MultiAddress) GetIsRaw() bool { return false } -func (x *MultiAddress) GetAsRaw() string { +func (x *MultiAddress) GetAsRaw() []byte { if x != nil { return x.AsRaw } - return "" + return nil } func (x *MultiAddress) GetIsAddress_32() bool { @@ -785,11 +799,11 @@ func (x *MultiAddress) GetIsAddress_32() bool { return false } -func (x *MultiAddress) GetAsAddress_32() string { +func (x *MultiAddress) GetAsAddress_32() []byte { if x != nil { return x.AsAddress_32 } - return "" + return nil } func (x *MultiAddress) GetIsAddress_20() bool { @@ -799,11 +813,11 @@ func (x *MultiAddress) GetIsAddress_20() bool { return false } -func (x *MultiAddress) GetAsAddress_20() string { +func (x *MultiAddress) GetAsAddress_20() []byte { if x != nil { return x.AsAddress_20 } - return "" + return nil } type MultiSignature struct { @@ -813,13 +827,13 @@ type MultiSignature struct { IsEd_25519 bool `protobuf:"varint,1,opt,name=is_ed_25519,json=isEd25519,proto3" json:"is_ed_25519,omitempty"` // [64]byte - AsEd_25519 string `protobuf:"bytes,2,opt,name=as_ed_25519,json=asEd25519,proto3" json:"as_ed_25519,omitempty"` + AsEd_25519 []byte `protobuf:"bytes,2,opt,name=as_ed_25519,json=asEd25519,proto3" json:"as_ed_25519,omitempty"` IsSr_25519 bool `protobuf:"varint,3,opt,name=is_sr_25519,json=isSr25519,proto3" json:"is_sr_25519,omitempty"` // [64]byte - AsSr_25519 string `protobuf:"bytes,4,opt,name=as_sr_25519,json=asSr25519,proto3" json:"as_sr_25519,omitempty"` + AsSr_25519 []byte `protobuf:"bytes,4,opt,name=as_sr_25519,json=asSr25519,proto3" json:"as_sr_25519,omitempty"` IsEcdsa bool `protobuf:"varint,5,opt,name=is_ecdsa,json=isEcdsa,proto3" json:"is_ecdsa,omitempty"` - // [65]byte - AsEcdsa string `protobuf:"bytes,6,opt,name=as_ecdsa,json=asEcdsa,proto3" json:"as_ecdsa,omitempty"` + // [64]byte + AsEcdsa []byte `protobuf:"bytes,6,opt,name=as_ecdsa,json=asEcdsa,proto3" json:"as_ecdsa,omitempty"` } func (x *MultiSignature) Reset() { @@ -861,11 +875,11 @@ func (x *MultiSignature) GetIsEd_25519() bool { return false } -func (x *MultiSignature) GetAsEd_25519() string { +func (x *MultiSignature) GetAsEd_25519() []byte { if x != nil { return x.AsEd_25519 } - return "" + return nil } func (x *MultiSignature) GetIsSr_25519() bool { @@ -875,11 +889,11 @@ func (x *MultiSignature) GetIsSr_25519() bool { return false } -func (x *MultiSignature) GetAsSr_25519() string { +func (x *MultiSignature) GetAsSr_25519() []byte { if x != nil { return x.AsSr_25519 } - return "" + return nil } func (x *MultiSignature) GetIsEcdsa() bool { @@ -889,11 +903,11 @@ func (x *MultiSignature) GetIsEcdsa() bool { return false } -func (x *MultiSignature) GetAsEcdsa() string { +func (x *MultiSignature) GetAsEcdsa() []byte { if x != nil { return x.AsEcdsa } - return "" + return nil } type ExtrinsicEra struct { @@ -1014,150 +1028,6 @@ func (x *Call) GetArgs() []byte { return nil } -type Field struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - LookupIndex int64 `protobuf:"varint,2,opt,name=lookup_index,json=lookupIndex,proto3" json:"lookup_index,omitempty"` - // Types that are assignable to Value: - // - // *Field_JsonValue - // *Field_Fields - Value isField_Value `protobuf_oneof:"value"` -} - -func (x *Field) Reset() { - *x = Field{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Field) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Field) ProtoMessage() {} - -func (x *Field) ProtoReflect() protoreflect.Message { - mi := &file_block_proto_msgTypes[13] - 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 Field.ProtoReflect.Descriptor instead. -func (*Field) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{13} -} - -func (x *Field) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Field) GetLookupIndex() int64 { - if x != nil { - return x.LookupIndex - } - return 0 -} - -func (m *Field) GetValue() isField_Value { - if m != nil { - return m.Value - } - return nil -} - -func (x *Field) GetJsonValue() string { - if x, ok := x.GetValue().(*Field_JsonValue); ok { - return x.JsonValue - } - return "" -} - -func (x *Field) GetFields() *Fields { - if x, ok := x.GetValue().(*Field_Fields); ok { - return x.Fields - } - return nil -} - -type isField_Value interface { - isField_Value() -} - -type Field_JsonValue struct { - JsonValue string `protobuf:"bytes,3,opt,name=json_value,json=jsonValue,proto3,oneof"` -} - -type Field_Fields struct { - Fields *Fields `protobuf:"bytes,4,opt,name=fields,proto3,oneof"` -} - -func (*Field_JsonValue) isField_Value() {} - -func (*Field_Fields) isField_Value() {} - -type Fields struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value []*Field `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` -} - -func (x *Fields) Reset() { - *x = Fields{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Fields) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Fields) ProtoMessage() {} - -func (x *Fields) ProtoReflect() protoreflect.Message { - mi := &file_block_proto_msgTypes[14] - 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 Fields.ProtoReflect.Descriptor instead. -func (*Fields) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{14} -} - -func (x *Fields) GetValue() []*Field { - if x != nil { - return x.Value - } - return nil -} - type CallIndex struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1170,7 +1040,7 @@ type CallIndex struct { func (x *CallIndex) Reset() { *x = CallIndex{} if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[15] + mi := &file_block_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1183,7 +1053,7 @@ func (x *CallIndex) String() string { func (*CallIndex) ProtoMessage() {} func (x *CallIndex) ProtoReflect() protoreflect.Message { - mi := &file_block_proto_msgTypes[15] + mi := &file_block_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1196,7 +1066,7 @@ func (x *CallIndex) ProtoReflect() protoreflect.Message { // Deprecated: Use CallIndex.ProtoReflect.Descriptor instead. func (*CallIndex) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{15} + return file_block_proto_rawDescGZIP(), []int{13} } func (x *CallIndex) GetSectionIndex() uint32 { @@ -1219,18 +1089,18 @@ type Event struct { unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Fields []*Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"` + Fields [][]byte `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"` // [2]byte - Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + Id []byte `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` Phase *Phase `protobuf:"bytes,4,opt,name=phase,proto3" json:"phase,omitempty"` // [32]byte - Topics []string `protobuf:"bytes,5,rep,name=topics,proto3" json:"topics,omitempty"` + Topics [][]byte `protobuf:"bytes,5,rep,name=topics,proto3" json:"topics,omitempty"` } func (x *Event) Reset() { *x = Event{} if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[16] + mi := &file_block_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1243,7 +1113,7 @@ func (x *Event) String() string { func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_block_proto_msgTypes[16] + mi := &file_block_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1256,7 +1126,7 @@ func (x *Event) ProtoReflect() protoreflect.Message { // Deprecated: Use Event.ProtoReflect.Descriptor instead. func (*Event) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{16} + return file_block_proto_rawDescGZIP(), []int{14} } func (x *Event) GetName() string { @@ -1266,18 +1136,18 @@ func (x *Event) GetName() string { return "" } -func (x *Event) GetFields() []*Field { +func (x *Event) GetFields() [][]byte { if x != nil { return x.Fields } return nil } -func (x *Event) GetId() string { +func (x *Event) GetId() []byte { if x != nil { return x.Id } - return "" + return nil } func (x *Event) GetPhase() *Phase { @@ -1287,7 +1157,7 @@ func (x *Event) GetPhase() *Phase { return nil } -func (x *Event) GetTopics() []string { +func (x *Event) GetTopics() [][]byte { if x != nil { return x.Topics } @@ -1308,7 +1178,7 @@ type Phase struct { func (x *Phase) Reset() { *x = Phase{} if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[17] + mi := &file_block_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1321,7 +1191,7 @@ func (x *Phase) String() string { func (*Phase) ProtoMessage() {} func (x *Phase) ProtoReflect() protoreflect.Message { - mi := &file_block_proto_msgTypes[17] + mi := &file_block_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1334,7 +1204,7 @@ func (x *Phase) ProtoReflect() protoreflect.Message { // Deprecated: Use Phase.ProtoReflect.Descriptor instead. func (*Phase) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{17} + return file_block_proto_rawDescGZIP(), []int{15} } func (x *Phase) GetIsApplyExtrinsic() bool { @@ -1372,19 +1242,19 @@ type SignatureDef struct { IsEd25519 bool `protobuf:"varint,1,opt,name=is_ed25519,json=isEd25519,proto3" json:"is_ed25519,omitempty"` // [64]byte - AsEd25519 string `protobuf:"bytes,2,opt,name=as_ed25519,json=asEd25519,proto3" json:"as_ed25519,omitempty"` + AsEd25519 []byte `protobuf:"bytes,2,opt,name=as_ed25519,json=asEd25519,proto3" json:"as_ed25519,omitempty"` IsSr25519 bool `protobuf:"varint,3,opt,name=is_sr25519,json=isSr25519,proto3" json:"is_sr25519,omitempty"` // [64]byte - AsSr25519 string `protobuf:"bytes,4,opt,name=as_sr25519,json=asSr25519,proto3" json:"as_sr25519,omitempty"` + AsSr25519 []byte `protobuf:"bytes,4,opt,name=as_sr25519,json=asSr25519,proto3" json:"as_sr25519,omitempty"` IsEcdsa bool `protobuf:"varint,5,opt,name=is_ecdsa,json=isEcdsa,proto3" json:"is_ecdsa,omitempty"` - // [65]byte - AsEcdsa string `protobuf:"bytes,6,opt,name=as_ecdsa,json=asEcdsa,proto3" json:"as_ecdsa,omitempty"` + // [64]byte + AsEcdsa []byte `protobuf:"bytes,6,opt,name=as_ecdsa,json=asEcdsa,proto3" json:"as_ecdsa,omitempty"` } func (x *SignatureDef) Reset() { *x = SignatureDef{} if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[18] + mi := &file_block_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1397,7 +1267,7 @@ func (x *SignatureDef) String() string { func (*SignatureDef) ProtoMessage() {} func (x *SignatureDef) ProtoReflect() protoreflect.Message { - mi := &file_block_proto_msgTypes[18] + mi := &file_block_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1410,7 +1280,7 @@ func (x *SignatureDef) ProtoReflect() protoreflect.Message { // Deprecated: Use SignatureDef.ProtoReflect.Descriptor instead. func (*SignatureDef) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{18} + return file_block_proto_rawDescGZIP(), []int{16} } func (x *SignatureDef) GetIsEd25519() bool { @@ -1420,11 +1290,11 @@ func (x *SignatureDef) GetIsEd25519() bool { return false } -func (x *SignatureDef) GetAsEd25519() string { +func (x *SignatureDef) GetAsEd25519() []byte { if x != nil { return x.AsEd25519 } - return "" + return nil } func (x *SignatureDef) GetIsSr25519() bool { @@ -1434,11 +1304,11 @@ func (x *SignatureDef) GetIsSr25519() bool { return false } -func (x *SignatureDef) GetAsSr25519() string { +func (x *SignatureDef) GetAsSr25519() []byte { if x != nil { return x.AsSr25519 } - return "" + return nil } func (x *SignatureDef) GetIsEcdsa() bool { @@ -1448,11 +1318,11 @@ func (x *SignatureDef) GetIsEcdsa() bool { return false } -func (x *SignatureDef) GetAsEcdsa() string { +func (x *SignatureDef) GetAsEcdsa() []byte { if x != nil { return x.AsEcdsa } - return "" + return nil } type MortalEra struct { @@ -1467,7 +1337,7 @@ type MortalEra struct { func (x *MortalEra) Reset() { *x = MortalEra{} if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[19] + mi := &file_block_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1480,7 +1350,7 @@ func (x *MortalEra) String() string { func (*MortalEra) ProtoMessage() {} func (x *MortalEra) ProtoReflect() protoreflect.Message { - mi := &file_block_proto_msgTypes[19] + mi := &file_block_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1493,7 +1363,7 @@ func (x *MortalEra) ProtoReflect() protoreflect.Message { // Deprecated: Use MortalEra.ProtoReflect.Descriptor instead. func (*MortalEra) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{19} + return file_block_proto_rawDescGZIP(), []int{17} } func (x *MortalEra) GetFirst() uint32 { @@ -1522,7 +1392,7 @@ type PaymentFields struct { func (x *PaymentFields) Reset() { *x = PaymentFields{} if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[20] + mi := &file_block_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1535,7 +1405,7 @@ func (x *PaymentFields) String() string { func (*PaymentFields) ProtoMessage() {} func (x *PaymentFields) ProtoReflect() protoreflect.Message { - mi := &file_block_proto_msgTypes[20] + mi := &file_block_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1548,7 +1418,7 @@ func (x *PaymentFields) ProtoReflect() protoreflect.Message { // Deprecated: Use PaymentFields.ProtoReflect.Descriptor instead. func (*PaymentFields) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{20} + return file_block_proto_rawDescGZIP(), []int{18} } func (x *PaymentFields) GetTip() string { @@ -1565,7 +1435,7 @@ var file_block_proto_rawDesc = []byte{ 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x22, 0xb6, 0x02, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x2f, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, @@ -1582,193 +1452,184 @@ var file_block_proto_rawDesc = []byte{ 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0b, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x71, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, - 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, 0x5f, - 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x72, - 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0xf7, 0x02, 0x0a, 0x0a, 0x44, - 0x69, 0x67, 0x65, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x31, 0x0a, 0x14, 0x61, 0x73, 0x5f, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x5f, 0x74, 0x72, 0x69, 0x65, 0x5f, 0x72, 0x6f, 0x6f, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x61, 0x73, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x73, 0x54, 0x72, 0x69, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x43, 0x0a, 0x0e, - 0x61, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x73, 0x50, 0x72, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, - 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, - 0x75, 0x73, 0x12, 0x30, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x73, 0x65, 0x61, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x06, 0x61, 0x73, - 0x53, 0x65, 0x61, 0x6c, 0x12, 0x59, 0x0a, 0x16, 0x61, 0x73, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x73, 0x5f, 0x74, 0x72, 0x69, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x54, 0x72, - 0x69, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x13, 0x61, 0x73, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x73, 0x54, 0x72, 0x69, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, - 0x1b, 0x0a, 0x08, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0c, 0x48, 0x00, 0x52, 0x07, 0x61, 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x42, 0x06, 0x0a, 0x04, - 0x49, 0x74, 0x65, 0x6d, 0x22, 0x52, 0x0a, 0x0a, 0x50, 0x72, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbf, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, + 0x6f, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, + 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x65, 0x78, 0x74, + 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x70, 0x65, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0b, 0x73, 0x70, 0x65, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x29, + 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xf7, 0x02, 0x0a, 0x0a, 0x44, 0x69, + 0x67, 0x65, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x31, 0x0a, 0x14, 0x61, 0x73, 0x5f, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x5f, 0x74, 0x72, 0x69, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x11, 0x61, 0x73, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x54, 0x72, 0x69, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x43, 0x0a, 0x0e, 0x61, + 0x73, 0x5f, 0x70, 0x72, 0x65, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x48, 0x00, 0x52, 0x0c, 0x61, 0x73, 0x50, 0x72, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, + 0x73, 0x12, 0x30, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x73, 0x65, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x06, 0x61, 0x73, 0x53, + 0x65, 0x61, 0x6c, 0x12, 0x59, 0x0a, 0x16, 0x61, 0x73, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x5f, 0x74, 0x72, 0x69, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x54, 0x72, 0x69, + 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x13, 0x61, 0x73, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x54, 0x72, 0x69, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x1b, + 0x0a, 0x08, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, + 0x48, 0x00, 0x52, 0x07, 0x61, 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x49, + 0x74, 0x65, 0x6d, 0x22, 0x52, 0x0a, 0x0a, 0x50, 0x72, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x65, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, + 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x49, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x51, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, + 0x73, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x45, 0x6e, 0x67, 0x69, + 0x6e, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x4c, 0x0a, 0x04, 0x53, 0x65, + 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x51, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x73, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, - 0x75, 0x73, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x45, 0x6e, 0x67, - 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x4c, 0x0a, 0x04, 0x53, - 0x65, 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, - 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x45, 0x6e, 0x67, 0x69, 0x6e, - 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x77, 0x0a, 0x11, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x73, 0x54, 0x72, 0x69, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x30, - 0x0a, 0x14, 0x69, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x73, - 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x30, 0x0a, 0x14, 0x61, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, - 0x61, 0x73, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x8e, 0x01, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x06, 0x6d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x22, 0xda, 0x01, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x66, - 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2f, 0x0a, 0x03, 0x65, 0x72, 0x61, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, - 0x45, 0x72, 0x61, 0x52, 0x03, 0x65, 0x72, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x69, 0x70, - 0x22, 0xac, 0x02, 0x0a, 0x0c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x13, 0x0a, 0x05, 0x69, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x04, 0x69, 0x73, 0x49, 0x64, 0x12, 0x13, 0x0a, 0x05, 0x61, 0x73, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x69, - 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, - 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x61, 0x73, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x05, 0x69, 0x73, 0x52, 0x61, 0x77, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x72, - 0x61, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x52, 0x61, 0x77, 0x12, - 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x33, 0x32, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x33, 0x32, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x5f, 0x33, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x73, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x33, 0x32, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x32, 0x30, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, - 0x69, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0x30, 0x12, 0x22, 0x0a, 0x0d, 0x61, - 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x32, 0x30, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x61, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0x30, 0x22, - 0xc6, 0x01, 0x0a, 0x0e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x65, 0x64, 0x5f, 0x32, 0x35, 0x35, 0x31, - 0x39, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x64, 0x32, 0x35, 0x35, - 0x31, 0x39, 0x12, 0x1e, 0x0a, 0x0b, 0x61, 0x73, 0x5f, 0x65, 0x64, 0x5f, 0x32, 0x35, 0x35, 0x31, - 0x39, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x45, 0x64, 0x32, 0x35, 0x35, - 0x31, 0x39, 0x12, 0x1e, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x73, 0x72, 0x5f, 0x32, 0x35, 0x35, 0x31, - 0x39, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x72, 0x32, 0x35, 0x35, - 0x31, 0x39, 0x12, 0x1e, 0x0a, 0x0b, 0x61, 0x73, 0x5f, 0x73, 0x72, 0x5f, 0x32, 0x35, 0x35, 0x31, - 0x39, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x53, 0x72, 0x32, 0x35, 0x35, - 0x31, 0x39, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x65, 0x63, 0x64, 0x73, 0x61, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x45, 0x63, 0x64, 0x73, 0x61, 0x12, 0x19, 0x0a, - 0x08, 0x61, 0x73, 0x5f, 0x65, 0x63, 0x64, 0x73, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x73, 0x45, 0x63, 0x64, 0x73, 0x61, 0x22, 0x9a, 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x74, - 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x45, 0x72, 0x61, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x73, 0x5f, - 0x69, 0x6d, 0x6d, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x49, 0x6d, 0x6d, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x45, 0x72, - 0x61, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x6d, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5f, 0x65, - 0x72, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x4d, 0x6f, 0x72, 0x74, - 0x61, 0x6c, 0x45, 0x72, 0x61, 0x12, 0x3e, 0x0a, 0x0d, 0x61, 0x73, 0x5f, 0x6d, 0x6f, 0x72, 0x74, - 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, - 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x61, 0x52, 0x0b, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x74, - 0x61, 0x6c, 0x45, 0x72, 0x61, 0x22, 0x55, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x39, 0x0a, - 0x0a, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x09, 0x63, - 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x9b, 0x01, 0x0a, - 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x6f, - 0x6f, 0x6b, 0x75, 0x70, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0b, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1f, 0x0a, - 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x31, - 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x48, 0x00, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x73, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x36, 0x0a, 0x06, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x53, 0x0a, 0x09, 0x43, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xa1, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, - 0x61, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x22, 0xb9, 0x01, 0x0a, 0x05, - 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x61, 0x70, 0x70, 0x6c, - 0x79, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x10, 0x69, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x45, 0x78, 0x74, 0x72, 0x69, 0x6e, - 0x73, 0x69, 0x63, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x73, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x5f, - 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x10, 0x61, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x45, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, - 0x63, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x46, 0x69, - 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x73, - 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc0, 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x65, 0x66, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x65, - 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, - 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x65, 0x64, - 0x32, 0x35, 0x35, 0x31, 0x39, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x45, - 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x72, 0x32, - 0x35, 0x35, 0x31, 0x39, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x72, - 0x32, 0x35, 0x35, 0x31, 0x39, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x73, 0x72, 0x32, 0x35, - 0x35, 0x31, 0x39, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x53, 0x72, 0x32, - 0x35, 0x35, 0x31, 0x39, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x65, 0x63, 0x64, 0x73, 0x61, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x45, 0x63, 0x64, 0x73, 0x61, 0x12, - 0x19, 0x0a, 0x08, 0x61, 0x73, 0x5f, 0x65, 0x63, 0x64, 0x73, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x73, 0x45, 0x63, 0x64, 0x73, 0x61, 0x22, 0x39, 0x0a, 0x09, 0x4d, 0x6f, - 0x72, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, - 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x21, 0x0a, 0x0d, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x69, 0x70, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, - 0x66, 0x61, 0x73, 0x74, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x68, 0x6f, 0x73, 0x65, 0x2d, 0x67, 0x65, - 0x61, 0x72, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x67, 0x65, 0x61, 0x72, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x77, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x54, 0x72, 0x69, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x30, 0x0a, + 0x14, 0x69, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x73, 0x4e, + 0x65, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x30, 0x0a, 0x14, 0x61, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x61, + 0x73, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x8e, 0x01, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, + 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x22, 0xda, 0x01, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x12, 0x35, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x66, 0x2e, + 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2f, 0x0a, 0x03, 0x65, 0x72, 0x61, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x45, + 0x72, 0x61, 0x52, 0x03, 0x65, 0x72, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x74, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x69, 0x70, 0x22, + 0xac, 0x02, 0x0a, 0x0c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x13, 0x0a, 0x05, 0x69, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x04, 0x69, 0x73, 0x49, 0x64, 0x12, 0x13, 0x0a, 0x05, 0x61, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x61, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x61, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x69, 0x73, 0x52, 0x61, 0x77, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x72, 0x61, + 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x73, 0x52, 0x61, 0x77, 0x12, 0x22, + 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x33, 0x32, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x33, 0x32, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x5f, 0x33, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x73, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x33, 0x32, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x32, 0x30, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, + 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0x30, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x73, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x32, 0x30, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0b, 0x61, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0x30, 0x22, 0xc6, + 0x01, 0x0a, 0x0e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x1e, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x65, 0x64, 0x5f, 0x32, 0x35, 0x35, 0x31, 0x39, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, + 0x39, 0x12, 0x1e, 0x0a, 0x0b, 0x61, 0x73, 0x5f, 0x65, 0x64, 0x5f, 0x32, 0x35, 0x35, 0x31, 0x39, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x61, 0x73, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, + 0x39, 0x12, 0x1e, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x73, 0x72, 0x5f, 0x32, 0x35, 0x35, 0x31, 0x39, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x72, 0x32, 0x35, 0x35, 0x31, + 0x39, 0x12, 0x1e, 0x0a, 0x0b, 0x61, 0x73, 0x5f, 0x73, 0x72, 0x5f, 0x32, 0x35, 0x35, 0x31, 0x39, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x61, 0x73, 0x53, 0x72, 0x32, 0x35, 0x35, 0x31, + 0x39, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x65, 0x63, 0x64, 0x73, 0x61, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x45, 0x63, 0x64, 0x73, 0x61, 0x12, 0x19, 0x0a, 0x08, + 0x61, 0x73, 0x5f, 0x65, 0x63, 0x64, 0x73, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, + 0x61, 0x73, 0x45, 0x63, 0x64, 0x73, 0x61, 0x22, 0x9a, 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x74, 0x72, + 0x69, 0x6e, 0x73, 0x69, 0x63, 0x45, 0x72, 0x61, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x69, + 0x6d, 0x6d, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0d, 0x69, 0x73, 0x49, 0x6d, 0x6d, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x61, + 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x6d, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x72, + 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x4d, 0x6f, 0x72, 0x74, 0x61, + 0x6c, 0x45, 0x72, 0x61, 0x12, 0x3e, 0x0a, 0x0d, 0x61, 0x73, 0x5f, 0x6d, 0x6f, 0x72, 0x74, 0x61, + 0x6c, 0x5f, 0x65, 0x72, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x66, + 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, + 0x72, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x61, 0x52, 0x0b, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x74, 0x61, + 0x6c, 0x45, 0x72, 0x61, 0x22, 0x55, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x39, 0x0a, 0x0a, + 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x09, 0x63, 0x61, + 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x53, 0x0a, 0x09, 0x43, + 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0c, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x21, 0x0a, + 0x0c, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x22, 0x89, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x66, 0x2e, 0x67, 0x65, 0x61, 0x72, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, + 0x68, 0x61, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x22, 0xb9, 0x01, 0x0a, + 0x05, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x61, 0x70, 0x70, + 0x6c, 0x79, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x45, 0x78, 0x74, 0x72, 0x69, + 0x6e, 0x73, 0x69, 0x63, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x73, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x79, + 0x5f, 0x65, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x10, 0x61, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x45, 0x78, 0x74, 0x72, 0x69, 0x6e, 0x73, + 0x69, 0x63, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x46, + 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x69, + 0x73, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc0, 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x65, 0x66, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, + 0x65, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, + 0x73, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x65, + 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x61, 0x73, + 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x72, + 0x32, 0x35, 0x35, 0x31, 0x39, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, + 0x72, 0x32, 0x35, 0x35, 0x31, 0x39, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x73, 0x72, 0x32, + 0x35, 0x35, 0x31, 0x39, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x61, 0x73, 0x53, 0x72, + 0x32, 0x35, 0x35, 0x31, 0x39, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x65, 0x63, 0x64, 0x73, + 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x45, 0x63, 0x64, 0x73, 0x61, + 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x5f, 0x65, 0x63, 0x64, 0x73, 0x61, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x07, 0x61, 0x73, 0x45, 0x63, 0x64, 0x73, 0x61, 0x22, 0x39, 0x0a, 0x09, 0x4d, + 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x21, 0x0a, 0x0d, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x69, 0x70, 0x42, 0x42, 0x5a, 0x40, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, + 0x67, 0x66, 0x61, 0x73, 0x74, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x68, 0x6f, 0x73, 0x65, 0x2d, 0x67, + 0x65, 0x61, 0x72, 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x67, 0x65, 0x61, 0x72, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x62, 0x67, 0x65, 0x61, 0x72, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1783,7 +1644,7 @@ func file_block_proto_rawDescGZIP() []byte { return file_block_proto_rawDescData } -var file_block_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_block_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_block_proto_goTypes = []interface{}{ (*Block)(nil), // 0: sf.gear.type.v1.Block (*Header)(nil), // 1: sf.gear.type.v1.Header @@ -1798,19 +1659,17 @@ var file_block_proto_goTypes = []interface{}{ (*MultiSignature)(nil), // 10: sf.gear.type.v1.MultiSignature (*ExtrinsicEra)(nil), // 11: sf.gear.type.v1.ExtrinsicEra (*Call)(nil), // 12: sf.gear.type.v1.Call - (*Field)(nil), // 13: sf.gear.type.v1.Field - (*Fields)(nil), // 14: sf.gear.type.v1.Fields - (*CallIndex)(nil), // 15: sf.gear.type.v1.CallIndex - (*Event)(nil), // 16: sf.gear.type.v1.Event - (*Phase)(nil), // 17: sf.gear.type.v1.Phase - (*SignatureDef)(nil), // 18: sf.gear.type.v1.SignatureDef - (*MortalEra)(nil), // 19: sf.gear.type.v1.MortalEra - (*PaymentFields)(nil), // 20: sf.gear.type.v1.PaymentFields + (*CallIndex)(nil), // 13: sf.gear.type.v1.CallIndex + (*Event)(nil), // 14: sf.gear.type.v1.Event + (*Phase)(nil), // 15: sf.gear.type.v1.Phase + (*SignatureDef)(nil), // 16: sf.gear.type.v1.SignatureDef + (*MortalEra)(nil), // 17: sf.gear.type.v1.MortalEra + (*PaymentFields)(nil), // 18: sf.gear.type.v1.PaymentFields } var file_block_proto_depIdxs = []int32{ 1, // 0: sf.gear.type.v1.Block.header:type_name -> sf.gear.type.v1.Header 7, // 1: sf.gear.type.v1.Block.extrinsics:type_name -> sf.gear.type.v1.Extrinsic - 16, // 2: sf.gear.type.v1.Block.events:type_name -> sf.gear.type.v1.Event + 14, // 2: sf.gear.type.v1.Block.events:type_name -> sf.gear.type.v1.Event 2, // 3: sf.gear.type.v1.Block.digest_items:type_name -> sf.gear.type.v1.DigestItem 3, // 4: sf.gear.type.v1.DigestItem.as_pre_runtime:type_name -> sf.gear.type.v1.PreRuntime 4, // 5: sf.gear.type.v1.DigestItem.as_consensus:type_name -> sf.gear.type.v1.Consensus @@ -1821,17 +1680,14 @@ var file_block_proto_depIdxs = []int32{ 9, // 10: sf.gear.type.v1.Signature.signer:type_name -> sf.gear.type.v1.MultiAddress 10, // 11: sf.gear.type.v1.Signature.signature:type_name -> sf.gear.type.v1.MultiSignature 11, // 12: sf.gear.type.v1.Signature.era:type_name -> sf.gear.type.v1.ExtrinsicEra - 19, // 13: sf.gear.type.v1.ExtrinsicEra.as_mortal_era:type_name -> sf.gear.type.v1.MortalEra - 15, // 14: sf.gear.type.v1.Call.call_index:type_name -> sf.gear.type.v1.CallIndex - 14, // 15: sf.gear.type.v1.Field.fields:type_name -> sf.gear.type.v1.Fields - 13, // 16: sf.gear.type.v1.Fields.value:type_name -> sf.gear.type.v1.Field - 13, // 17: sf.gear.type.v1.Event.fields:type_name -> sf.gear.type.v1.Field - 17, // 18: sf.gear.type.v1.Event.phase:type_name -> sf.gear.type.v1.Phase - 19, // [19:19] is the sub-list for method output_type - 19, // [19:19] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name + 17, // 13: sf.gear.type.v1.ExtrinsicEra.as_mortal_era:type_name -> sf.gear.type.v1.MortalEra + 13, // 14: sf.gear.type.v1.Call.call_index:type_name -> sf.gear.type.v1.CallIndex + 15, // 15: sf.gear.type.v1.Event.phase:type_name -> sf.gear.type.v1.Phase + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_block_proto_init() } @@ -1997,30 +1853,6 @@ func file_block_proto_init() { } } file_block_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Field); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Fields); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CallIndex); i { case 0: return &v.state @@ -2032,7 +1864,7 @@ func file_block_proto_init() { return nil } } - file_block_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_block_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Event); i { case 0: return &v.state @@ -2044,7 +1876,7 @@ func file_block_proto_init() { return nil } } - file_block_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_block_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Phase); i { case 0: return &v.state @@ -2056,7 +1888,7 @@ func file_block_proto_init() { return nil } } - file_block_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_block_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignatureDef); i { case 0: return &v.state @@ -2068,7 +1900,7 @@ func file_block_proto_init() { return nil } } - file_block_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_block_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MortalEra); i { case 0: return &v.state @@ -2080,7 +1912,7 @@ func file_block_proto_init() { return nil } } - file_block_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_block_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PaymentFields); i { case 0: return &v.state @@ -2101,17 +1933,13 @@ func file_block_proto_init() { (*DigestItem_AsChangesTrieSignal)(nil), (*DigestItem_AsOther)(nil), } - file_block_proto_msgTypes[13].OneofWrappers = []interface{}{ - (*Field_JsonValue)(nil), - (*Field_Fields)(nil), - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_block_proto_rawDesc, NumEnums: 0, - NumMessages: 21, + NumMessages: 19, NumExtensions: 0, NumServices: 0, }, diff --git a/vara-common/pb/block_vtproto.pb.go b/vara-common/pb/block_vtproto.pb.go index 7fa3bd4..7125b0c 100644 --- a/vara-common/pb/block_vtproto.pb.go +++ b/vara-common/pb/block_vtproto.pb.go @@ -26,8 +26,12 @@ func (m *Block) CloneVT() *Block { } r := new(Block) r.Number = m.Number - r.Hash = m.Hash r.Header = m.Header.CloneVT() + if rhs := m.Hash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Hash = tmpBytes + } if rhs := m.Extrinsics; rhs != nil { tmpContainer := make([]*Extrinsic, len(rhs)) for k, v := range rhs { @@ -70,9 +74,27 @@ func (m *Header) CloneVT() *Header { return (*Header)(nil) } r := new(Header) - r.ParentHash = m.ParentHash - r.StateRoot = m.StateRoot - r.ExtrinsicsRoot = m.ExtrinsicsRoot + r.SpecVersion = m.SpecVersion + if rhs := m.ParentHash; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ParentHash = tmpBytes + } + if rhs := m.StateRoot; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.StateRoot = tmpBytes + } + if rhs := m.ExtrinsicsRoot; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.ExtrinsicsRoot = tmpBytes + } + if rhs := m.UpdatedMetadata; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.UpdatedMetadata = tmpBytes + } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -108,7 +130,11 @@ func (m *DigestItem_AsChangesTrieRoot) CloneVT() isDigestItem_Item { return (*DigestItem_AsChangesTrieRoot)(nil) } r := new(DigestItem_AsChangesTrieRoot) - r.AsChangesTrieRoot = m.AsChangesTrieRoot + if rhs := m.AsChangesTrieRoot; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.AsChangesTrieRoot = tmpBytes + } return r } @@ -295,15 +321,31 @@ func (m *MultiAddress) CloneVT() *MultiAddress { } r := new(MultiAddress) r.IsId = m.IsId - r.AsId = m.AsId r.IsIndex = m.IsIndex r.AsIndex = m.AsIndex r.IsRaw = m.IsRaw - r.AsRaw = m.AsRaw r.IsAddress_32 = m.IsAddress_32 - r.AsAddress_32 = m.AsAddress_32 r.IsAddress_20 = m.IsAddress_20 - r.AsAddress_20 = m.AsAddress_20 + if rhs := m.AsId; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.AsId = tmpBytes + } + if rhs := m.AsRaw; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.AsRaw = tmpBytes + } + if rhs := m.AsAddress_32; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.AsAddress_32 = tmpBytes + } + if rhs := m.AsAddress_20; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.AsAddress_20 = tmpBytes + } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -321,11 +363,23 @@ func (m *MultiSignature) CloneVT() *MultiSignature { } r := new(MultiSignature) r.IsEd_25519 = m.IsEd_25519 - r.AsEd_25519 = m.AsEd_25519 r.IsSr_25519 = m.IsSr_25519 - r.AsSr_25519 = m.AsSr_25519 r.IsEcdsa = m.IsEcdsa - r.AsEcdsa = m.AsEcdsa + if rhs := m.AsEd_25519; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.AsEd_25519 = tmpBytes + } + if rhs := m.AsSr_25519; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.AsSr_25519 = tmpBytes + } + if rhs := m.AsEcdsa; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.AsEcdsa = tmpBytes + } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -378,68 +432,6 @@ func (m *Call) CloneMessageVT() proto.Message { return m.CloneVT() } -func (m *Field) CloneVT() *Field { - if m == nil { - return (*Field)(nil) - } - r := new(Field) - r.Name = m.Name - r.LookupIndex = m.LookupIndex - if m.Value != nil { - r.Value = m.Value.(interface{ CloneVT() isField_Value }).CloneVT() - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Field) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Field_JsonValue) CloneVT() isField_Value { - if m == nil { - return (*Field_JsonValue)(nil) - } - r := new(Field_JsonValue) - r.JsonValue = m.JsonValue - return r -} - -func (m *Field_Fields) CloneVT() isField_Value { - if m == nil { - return (*Field_Fields)(nil) - } - r := new(Field_Fields) - r.Fields = m.Fields.CloneVT() - return r -} - -func (m *Fields) CloneVT() *Fields { - if m == nil { - return (*Fields)(nil) - } - r := new(Fields) - if rhs := m.Value; rhs != nil { - tmpContainer := make([]*Field, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Value = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Fields) CloneMessageVT() proto.Message { - return m.CloneVT() -} - func (m *CallIndex) CloneVT() *CallIndex { if m == nil { return (*CallIndex)(nil) @@ -464,18 +456,28 @@ func (m *Event) CloneVT() *Event { } r := new(Event) r.Name = m.Name - r.Id = m.Id r.Phase = m.Phase.CloneVT() if rhs := m.Fields; rhs != nil { - tmpContainer := make([]*Field, len(rhs)) + tmpContainer := make([][]byte, len(rhs)) for k, v := range rhs { - tmpContainer[k] = v.CloneVT() + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes } r.Fields = tmpContainer } + if rhs := m.Id; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.Id = tmpBytes + } if rhs := m.Topics; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } r.Topics = tmpContainer } if len(m.unknownFields) > 0 { @@ -515,11 +517,23 @@ func (m *SignatureDef) CloneVT() *SignatureDef { } r := new(SignatureDef) r.IsEd25519 = m.IsEd25519 - r.AsEd25519 = m.AsEd25519 r.IsSr25519 = m.IsSr25519 - r.AsSr25519 = m.AsSr25519 r.IsEcdsa = m.IsEcdsa - r.AsEcdsa = m.AsEcdsa + if rhs := m.AsEd25519; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.AsEd25519 = tmpBytes + } + if rhs := m.AsSr25519; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.AsSr25519 = tmpBytes + } + if rhs := m.AsEcdsa; rhs != nil { + tmpBytes := make([]byte, len(rhs)) + copy(tmpBytes, rhs) + r.AsEcdsa = tmpBytes + } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -575,7 +589,7 @@ func (this *Block) EqualVT(that *Block) bool { if this.Number != that.Number { return false } - if this.Hash != that.Hash { + if string(this.Hash) != string(that.Hash) { return false } if !this.Header.EqualVT(that.Header) { @@ -651,13 +665,19 @@ func (this *Header) EqualVT(that *Header) bool { } else if this == nil || that == nil { return false } - if this.ParentHash != that.ParentHash { + if string(this.ParentHash) != string(that.ParentHash) { + return false + } + if string(this.StateRoot) != string(that.StateRoot) { return false } - if this.StateRoot != that.StateRoot { + if string(this.ExtrinsicsRoot) != string(that.ExtrinsicsRoot) { return false } - if this.ExtrinsicsRoot != that.ExtrinsicsRoot { + if this.SpecVersion != that.SpecVersion { + return false + } + if string(this.UpdatedMetadata) != string(that.UpdatedMetadata) { return false } return string(this.unknownFields) == string(that.unknownFields) @@ -707,7 +727,7 @@ func (this *DigestItem_AsChangesTrieRoot) EqualVT(thatIface isDigestItem_Item) b if this == nil && that != nil || this != nil && that == nil { return false } - if this.AsChangesTrieRoot != that.AsChangesTrieRoot { + if string(this.AsChangesTrieRoot) != string(that.AsChangesTrieRoot) { return false } return true @@ -983,7 +1003,7 @@ func (this *MultiAddress) EqualVT(that *MultiAddress) bool { if this.IsId != that.IsId { return false } - if this.AsId != that.AsId { + if string(this.AsId) != string(that.AsId) { return false } if this.IsIndex != that.IsIndex { @@ -995,19 +1015,19 @@ func (this *MultiAddress) EqualVT(that *MultiAddress) bool { if this.IsRaw != that.IsRaw { return false } - if this.AsRaw != that.AsRaw { + if string(this.AsRaw) != string(that.AsRaw) { return false } if this.IsAddress_32 != that.IsAddress_32 { return false } - if this.AsAddress_32 != that.AsAddress_32 { + if string(this.AsAddress_32) != string(that.AsAddress_32) { return false } if this.IsAddress_20 != that.IsAddress_20 { return false } - if this.AsAddress_20 != that.AsAddress_20 { + if string(this.AsAddress_20) != string(that.AsAddress_20) { return false } return string(this.unknownFields) == string(that.unknownFields) @@ -1029,19 +1049,19 @@ func (this *MultiSignature) EqualVT(that *MultiSignature) bool { if this.IsEd_25519 != that.IsEd_25519 { return false } - if this.AsEd_25519 != that.AsEd_25519 { + if string(this.AsEd_25519) != string(that.AsEd_25519) { return false } if this.IsSr_25519 != that.IsSr_25519 { return false } - if this.AsSr_25519 != that.AsSr_25519 { + if string(this.AsSr_25519) != string(that.AsSr_25519) { return false } if this.IsEcdsa != that.IsEcdsa { return false } - if this.AsEcdsa != that.AsEcdsa { + if string(this.AsEcdsa) != string(that.AsEcdsa) { return false } return string(this.unknownFields) == string(that.unknownFields) @@ -1101,113 +1121,6 @@ func (this *Call) EqualMessageVT(thatMsg proto.Message) bool { } return this.EqualVT(that) } -func (this *Field) EqualVT(that *Field) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Value == nil && that.Value != nil { - return false - } else if this.Value != nil { - if that.Value == nil { - return false - } - if !this.Value.(interface{ EqualVT(isField_Value) bool }).EqualVT(that.Value) { - return false - } - } - if this.Name != that.Name { - return false - } - if this.LookupIndex != that.LookupIndex { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Field) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Field) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *Field_JsonValue) EqualVT(thatIface isField_Value) bool { - that, ok := thatIface.(*Field_JsonValue) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if this.JsonValue != that.JsonValue { - return false - } - return true -} - -func (this *Field_Fields) EqualVT(thatIface isField_Value) bool { - that, ok := thatIface.(*Field_Fields) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.Fields, that.Fields; p != q { - if p == nil { - p = &Fields{} - } - if q == nil { - q = &Fields{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *Fields) EqualVT(that *Fields) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if len(this.Value) != len(that.Value) { - return false - } - for i, vx := range this.Value { - vy := that.Value[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &Field{} - } - if q == nil { - q = &Field{} - } - if !p.EqualVT(q) { - return false - } - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Fields) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Fields) - if !ok { - return false - } - return this.EqualVT(that) -} func (this *CallIndex) EqualVT(that *CallIndex) bool { if this == that { return true @@ -1244,19 +1157,11 @@ func (this *Event) EqualVT(that *Event) bool { } for i, vx := range this.Fields { vy := that.Fields[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &Field{} - } - if q == nil { - q = &Field{} - } - if !p.EqualVT(q) { - return false - } + if string(vx) != string(vy) { + return false } } - if this.Id != that.Id { + if string(this.Id) != string(that.Id) { return false } if !this.Phase.EqualVT(that.Phase) { @@ -1267,7 +1172,7 @@ func (this *Event) EqualVT(that *Event) bool { } for i, vx := range this.Topics { vy := that.Topics[i] - if vx != vy { + if string(vx) != string(vy) { return false } } @@ -1318,19 +1223,19 @@ func (this *SignatureDef) EqualVT(that *SignatureDef) bool { if this.IsEd25519 != that.IsEd25519 { return false } - if this.AsEd25519 != that.AsEd25519 { + if string(this.AsEd25519) != string(that.AsEd25519) { return false } if this.IsSr25519 != that.IsSr25519 { return false } - if this.AsSr25519 != that.AsSr25519 { + if string(this.AsSr25519) != string(that.AsSr25519) { return false } if this.IsEcdsa != that.IsEcdsa { return false } - if this.AsEcdsa != that.AsEcdsa { + if string(this.AsEcdsa) != string(that.AsEcdsa) { return false } return string(this.unknownFields) == string(that.unknownFields) @@ -1512,6 +1417,18 @@ func (m *Header) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if len(m.UpdatedMetadata) > 0 { + i -= len(m.UpdatedMetadata) + copy(dAtA[i:], m.UpdatedMetadata) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.UpdatedMetadata))) + i-- + dAtA[i] = 0x2a + } + if m.SpecVersion != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SpecVersion)) + i-- + dAtA[i] = 0x20 + } if len(m.ExtrinsicsRoot) > 0 { i -= len(m.ExtrinsicsRoot) copy(dAtA[i:], m.ExtrinsicsRoot) @@ -2315,7 +2232,7 @@ func (m *Call) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Field) MarshalVT() (dAtA []byte, err error) { +func (m *CallIndex) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2328,12 +2245,12 @@ func (m *Field) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Field) MarshalToVT(dAtA []byte) (int, error) { +func (m *CallIndex) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Field) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *CallIndex) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2345,64 +2262,20 @@ func (m *Field) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if vtmsg, ok := m.Value.(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if m.LookupIndex != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.LookupIndex)) + if m.MethodIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MethodIndex)) i-- dAtA[i] = 0x10 } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + if m.SectionIndex != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SectionIndex)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *Field_JsonValue) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Field_JsonValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.JsonValue) - copy(dAtA[i:], m.JsonValue) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JsonValue))) - i-- - dAtA[i] = 0x1a - return len(dAtA) - i, nil -} -func (m *Field_Fields) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Field_Fields) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Fields != nil { - size, err := m.Fields.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *Fields) MarshalVT() (dAtA []byte, err error) { +func (m *Event) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2415,12 +2288,12 @@ func (m *Fields) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Fields) MarshalToVT(dAtA []byte) (int, error) { +func (m *Event) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Fields) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Event) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2432,101 +2305,13 @@ func (m *Fields) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Value) > 0 { - for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Value[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if len(m.Topics) > 0 { + for iNdEx := len(m.Topics) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Topics[iNdEx]) + copy(dAtA[i:], m.Topics[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Topics[iNdEx]))) i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *CallIndex) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CallIndex) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *CallIndex) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.MethodIndex != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MethodIndex)) - i-- - dAtA[i] = 0x10 - } - if m.SectionIndex != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SectionIndex)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Event) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Event) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Event) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Topics) > 0 { - for iNdEx := len(m.Topics) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Topics[iNdEx]) - copy(dAtA[i:], m.Topics[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Topics[iNdEx]))) - i-- - dAtA[i] = 0x2a + dAtA[i] = 0x2a } } if m.Phase != nil { @@ -2548,12 +2333,9 @@ func (m *Event) MarshalToSizedBufferVT(dAtA []byte) (int, error) { } if len(m.Fields) > 0 { for iNdEx := len(m.Fields) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Fields[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i -= len(m.Fields[iNdEx]) + copy(dAtA[i:], m.Fields[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Fields[iNdEx]))) i-- dAtA[i] = 0x12 } @@ -2931,6 +2713,18 @@ func (m *Header) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if len(m.UpdatedMetadata) > 0 { + i -= len(m.UpdatedMetadata) + copy(dAtA[i:], m.UpdatedMetadata) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.UpdatedMetadata))) + i-- + dAtA[i] = 0x2a + } + if m.SpecVersion != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SpecVersion)) + i-- + dAtA[i] = 0x20 + } if len(m.ExtrinsicsRoot) > 0 { i -= len(m.ExtrinsicsRoot) copy(dAtA[i:], m.ExtrinsicsRoot) @@ -3767,143 +3561,6 @@ func (m *Call) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Field) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Field) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Field) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if msg, ok := m.Value.(*Field_Fields); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.Value.(*Field_JsonValue); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if m.LookupIndex != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.LookupIndex)) - i-- - dAtA[i] = 0x10 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Field_JsonValue) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Field_JsonValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.JsonValue) - copy(dAtA[i:], m.JsonValue) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.JsonValue))) - i-- - dAtA[i] = 0x1a - return len(dAtA) - i, nil -} -func (m *Field_Fields) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Field_Fields) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Fields != nil { - size, err := m.Fields.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *Fields) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Fields) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *Fields) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Value) > 0 { - for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Value[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - func (m *CallIndex) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -4005,12 +3662,9 @@ func (m *Event) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { } if len(m.Fields) > 0 { for iNdEx := len(m.Fields) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Fields[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i -= len(m.Fields[iNdEx]) + copy(dAtA[i:], m.Fields[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Fields[iNdEx]))) i-- dAtA[i] = 0x12 } @@ -4321,6 +3975,13 @@ func (m *Header) SizeVT() (n int) { if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } + if m.SpecVersion != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.SpecVersion)) + } + l = len(m.UpdatedMetadata) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } n += len(m.unknownFields) return n } @@ -4638,57 +4299,49 @@ func (m *Call) SizeVT() (n int) { return n } -func (m *Field) SizeVT() (n int) { +func (m *CallIndex) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.LookupIndex != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.LookupIndex)) + if m.SectionIndex != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.SectionIndex)) } - if vtmsg, ok := m.Value.(interface{ SizeVT() int }); ok { - n += vtmsg.SizeVT() + if m.MethodIndex != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.MethodIndex)) } n += len(m.unknownFields) return n } -func (m *Field_JsonValue) SizeVT() (n int) { +func (m *Event) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.JsonValue) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - return n -} -func (m *Field_Fields) SizeVT() (n int) { - if m == nil { - return 0 + l = len(m.Name) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - var l int - _ = l - if m.Fields != nil { - l = m.Fields.SizeVT() + if len(m.Fields) > 0 { + for _, b := range m.Fields { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.Id) + if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - return n -} -func (m *Fields) SizeVT() (n int) { - if m == nil { - return 0 + if m.Phase != nil { + l = m.Phase.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - var l int - _ = l - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.SizeVT() + if len(m.Topics) > 0 { + for _, b := range m.Topics { + l = len(b) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } @@ -4696,57 +4349,7 @@ func (m *Fields) SizeVT() (n int) { return n } -func (m *CallIndex) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SectionIndex != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.SectionIndex)) - } - if m.MethodIndex != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.MethodIndex)) - } - n += len(m.unknownFields) - return n -} - -func (m *Event) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Fields) > 0 { - for _, e := range m.Fields { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.Id) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Phase != nil { - l = m.Phase.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Topics) > 0 { - for _, s := range m.Topics { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *Phase) SizeVT() (n int) { +func (m *Phase) SizeVT() (n int) { if m == nil { return 0 } @@ -4881,7 +4484,7 @@ func (m *Block) UnmarshalVT(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -4891,23 +4494,25 @@ func (m *Block) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Hash = string(dAtA[iNdEx:postIndex]) + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } iNdEx = postIndex case 3: if wireType != 2 { @@ -5136,7 +4741,7 @@ func (m *Header) UnmarshalVT(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ParentHash", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -5146,29 +4751,31 @@ func (m *Header) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.ParentHash = string(dAtA[iNdEx:postIndex]) + m.ParentHash = append(m.ParentHash[:0], dAtA[iNdEx:postIndex]...) + if m.ParentHash == nil { + m.ParentHash = []byte{} + } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StateRoot", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -5178,29 +4785,31 @@ func (m *Header) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.StateRoot = string(dAtA[iNdEx:postIndex]) + m.StateRoot = append(m.StateRoot[:0], dAtA[iNdEx:postIndex]...) + if m.StateRoot == nil { + m.StateRoot = []byte{} + } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExtrinsicsRoot", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -5210,23 +4819,78 @@ func (m *Header) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExtrinsicsRoot = append(m.ExtrinsicsRoot[:0], dAtA[iNdEx:postIndex]...) + if m.ExtrinsicsRoot == nil { + m.ExtrinsicsRoot = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SpecVersion", wireType) + } + m.SpecVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SpecVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdatedMetadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.ExtrinsicsRoot = string(dAtA[iNdEx:postIndex]) + m.UpdatedMetadata = append(m.UpdatedMetadata[:0], dAtA[iNdEx:postIndex]...) + if m.UpdatedMetadata == nil { + m.UpdatedMetadata = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -5283,7 +4947,7 @@ func (m *DigestItem) UnmarshalVT(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AsChangesTrieRoot", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -5293,23 +4957,24 @@ func (m *DigestItem) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Item = &DigestItem_AsChangesTrieRoot{AsChangesTrieRoot: string(dAtA[iNdEx:postIndex])} + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.Item = &DigestItem_AsChangesTrieRoot{AsChangesTrieRoot: v} iNdEx = postIndex case 2: if wireType != 2 { @@ -6365,7 +6030,7 @@ func (m *MultiAddress) UnmarshalVT(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AsId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6375,23 +6040,25 @@ func (m *MultiAddress) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.AsId = string(dAtA[iNdEx:postIndex]) + m.AsId = append(m.AsId[:0], dAtA[iNdEx:postIndex]...) + if m.AsId == nil { + m.AsId = []byte{} + } iNdEx = postIndex case 3: if wireType != 0 { @@ -6456,7 +6123,7 @@ func (m *MultiAddress) UnmarshalVT(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AsRaw", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6466,23 +6133,25 @@ func (m *MultiAddress) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.AsRaw = string(dAtA[iNdEx:postIndex]) + m.AsRaw = append(m.AsRaw[:0], dAtA[iNdEx:postIndex]...) + if m.AsRaw == nil { + m.AsRaw = []byte{} + } iNdEx = postIndex case 7: if wireType != 0 { @@ -6508,7 +6177,7 @@ func (m *MultiAddress) UnmarshalVT(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AsAddress_32", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6518,23 +6187,25 @@ func (m *MultiAddress) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.AsAddress_32 = string(dAtA[iNdEx:postIndex]) + m.AsAddress_32 = append(m.AsAddress_32[:0], dAtA[iNdEx:postIndex]...) + if m.AsAddress_32 == nil { + m.AsAddress_32 = []byte{} + } iNdEx = postIndex case 9: if wireType != 0 { @@ -6560,7 +6231,7 @@ func (m *MultiAddress) UnmarshalVT(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AsAddress_20", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6570,23 +6241,25 @@ func (m *MultiAddress) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.AsAddress_20 = string(dAtA[iNdEx:postIndex]) + m.AsAddress_20 = append(m.AsAddress_20[:0], dAtA[iNdEx:postIndex]...) + if m.AsAddress_20 == nil { + m.AsAddress_20 = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -6663,7 +6336,7 @@ func (m *MultiSignature) UnmarshalVT(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AsEd_25519", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6673,23 +6346,25 @@ func (m *MultiSignature) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.AsEd_25519 = string(dAtA[iNdEx:postIndex]) + m.AsEd_25519 = append(m.AsEd_25519[:0], dAtA[iNdEx:postIndex]...) + if m.AsEd_25519 == nil { + m.AsEd_25519 = []byte{} + } iNdEx = postIndex case 3: if wireType != 0 { @@ -6715,7 +6390,7 @@ func (m *MultiSignature) UnmarshalVT(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AsSr_25519", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6725,23 +6400,25 @@ func (m *MultiSignature) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.AsSr_25519 = string(dAtA[iNdEx:postIndex]) + m.AsSr_25519 = append(m.AsSr_25519[:0], dAtA[iNdEx:postIndex]...) + if m.AsSr_25519 == nil { + m.AsSr_25519 = []byte{} + } iNdEx = postIndex case 5: if wireType != 0 { @@ -6767,7 +6444,7 @@ func (m *MultiSignature) UnmarshalVT(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AsEcdsa", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6777,23 +6454,25 @@ func (m *MultiSignature) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.AsEcdsa = string(dAtA[iNdEx:postIndex]) + m.AsEcdsa = append(m.AsEcdsa[:0], dAtA[iNdEx:postIndex]...) + if m.AsEcdsa == nil { + m.AsEcdsa = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -7065,7 +6744,7 @@ func (m *Call) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Field) UnmarshalVT(dAtA []byte) error { +func (m *CallIndex) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7088,17 +6767,17 @@ func (m *Field) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Field: wiretype end group for non-group") + return fmt.Errorf("proto: CallIndex: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Field: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CallIndex: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SectionIndex", wireType) } - var stringLen uint64 + m.SectionIndex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7108,29 +6787,16 @@ func (m *Field) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.SectionIndex |= uint32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LookupIndex", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MethodIndex", wireType) } - m.LookupIndex = 0 + m.MethodIndex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7140,23 +6806,74 @@ func (m *Field) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LookupIndex |= int64(b&0x7F) << shift + m.MethodIndex |= uint32(b&0x7F) << shift if b < 0x80 { break } } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JsonValue", wireType) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Event) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift @@ -7175,13 +6892,13 @@ func (m *Field) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Value = &Field_JsonValue{JsonValue: string(dAtA[iNdEx:postIndex])} + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7191,87 +6908,61 @@ func (m *Field) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if oneof, ok := m.Value.(*Field_Fields); ok { - if err := oneof.Fields.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Fields = append(m.Fields, make([]byte, postIndex-iNdEx)) + copy(m.Fields[len(m.Fields)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - } else { - v := &Fields{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break } - m.Value = &Field_Fields{Fields: v} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Fields) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Id = append(m.Id[:0], dAtA[iNdEx:postIndex]...) + if m.Id == nil { + m.Id = []byte{} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Fields: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Fields: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7298,11 +6989,45 @@ func (m *Fields) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Value = append(m.Value, &Field{}) - if err := m.Value[len(m.Value)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.Phase == nil { + m.Phase = &Phase{} + } + if err := m.Phase.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Topics", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Topics = append(m.Topics, make([]byte, postIndex-iNdEx)) + copy(m.Topics[len(m.Topics)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -7325,7 +7050,7 @@ func (m *Fields) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *CallIndex) UnmarshalVT(dAtA []byte) error { +func (m *Phase) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7348,17 +7073,17 @@ func (m *CallIndex) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CallIndex: wiretype end group for non-group") + return fmt.Errorf("proto: Phase: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CallIndex: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Phase: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SectionIndex", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IsApplyExtrinsic", wireType) } - m.SectionIndex = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7368,16 +7093,17 @@ func (m *CallIndex) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SectionIndex |= uint32(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.IsApplyExtrinsic = bool(v != 0) case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MethodIndex", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsApplyExtrinsic", wireType) } - m.MethodIndex = 0 + m.AsApplyExtrinsic = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7387,11 +7113,51 @@ func (m *CallIndex) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MethodIndex |= uint32(b&0x7F) << shift + m.AsApplyExtrinsic |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsFinalization", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsFinalization = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsInitialization", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.IsInitialization = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -7414,7 +7180,7 @@ func (m *CallIndex) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Event) UnmarshalVT(dAtA []byte) error { +func (m *SignatureDef) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7437,17 +7203,17 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Event: wiretype end group for non-group") + return fmt.Errorf("proto: SignatureDef: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SignatureDef: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEd25519", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7457,29 +7223,17 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength + m.IsEd25519 = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsEd25519", wireType) } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) - } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7489,31 +7243,31 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Fields = append(m.Fields, &Field{}) - if err := m.Fields[len(m.Fields)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + m.AsEd25519 = append(m.AsEd25519[:0], dAtA[iNdEx:postIndex]...) + if m.AsEd25519 == nil { + m.AsEd25519 = []byte{} } iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsSr25519", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7523,29 +7277,17 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + m.IsSr25519 = bool(v != 0) case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsSr25519", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7555,33 +7297,51 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Phase == nil { - m.Phase = &Phase{} - } - if err := m.Phase.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + m.AsSr25519 = append(m.AsSr25519[:0], dAtA[iNdEx:postIndex]...) + if m.AsSr25519 == nil { + m.AsSr25519 = []byte{} } iNdEx = postIndex case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEcdsa", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEcdsa = bool(v != 0) + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Topics", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsEcdsa", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7591,23 +7351,25 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Topics = append(m.Topics, string(dAtA[iNdEx:postIndex])) + m.AsEcdsa = append(m.AsEcdsa[:0], dAtA[iNdEx:postIndex]...) + if m.AsEcdsa == nil { + m.AsEcdsa = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -7631,7 +7393,7 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Phase) UnmarshalVT(dAtA []byte) error { +func (m *MortalEra) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7654,17 +7416,17 @@ func (m *Phase) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Phase: wiretype end group for non-group") + return fmt.Errorf("proto: MortalEra: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Phase: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MortalEra: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsApplyExtrinsic", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field First", wireType) } - var v int + m.First = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7674,17 +7436,16 @@ func (m *Phase) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.First |= uint32(b&0x7F) << shift if b < 0x80 { break } } - m.IsApplyExtrinsic = bool(v != 0) case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AsApplyExtrinsic", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Second", wireType) } - m.AsApplyExtrinsic = 0 + m.Second = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7694,36 +7455,67 @@ func (m *Phase) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.AsApplyExtrinsic |= uint32(b&0x7F) << shift + m.Second |= uint32(b&0x7F) << shift if b < 0x80 { break } } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsFinalization", wireType) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - m.IsFinalization = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsInitialization", wireType) + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - var v int + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PaymentFields) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PaymentFields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PaymentFields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7733,12 +7525,24 @@ func (m *Phase) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.IsInitialization = bool(v != 0) + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tip = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -7761,7 +7565,7 @@ func (m *Phase) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SignatureDef) UnmarshalVT(dAtA []byte) error { +func (m *Block) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7784,17 +7588,17 @@ func (m *SignatureDef) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SignatureDef: wiretype end group for non-group") + return fmt.Errorf("proto: Block: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SignatureDef: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsEd25519", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) } - var v int + m.Number = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7804,17 +7608,16 @@ func (m *SignatureDef) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Number |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.IsEd25519 = bool(v != 0) case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsEd25519", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7824,29 +7627,28 @@ func (m *SignatureDef) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.AsEd25519 = string(dAtA[iNdEx:postIndex]) + m.Hash = dAtA[iNdEx:postIndex] iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSr25519", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7856,17 +7658,33 @@ func (m *SignatureDef) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.IsSr25519 = bool(v != 0) + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &Header{} + } + if err := m.Header.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsSr25519", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Extrinsics", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7876,29 +7694,31 @@ func (m *SignatureDef) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.AsSr25519 = string(dAtA[iNdEx:postIndex]) + m.Extrinsics = append(m.Extrinsics, &Extrinsic{}) + if err := m.Extrinsics[len(m.Extrinsics)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsEcdsa", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7908,17 +7728,31 @@ func (m *SignatureDef) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.IsEcdsa = bool(v != 0) + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Events = append(m.Events, &Event{}) + if err := m.Events[len(m.Events)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsEcdsa", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DigestItems", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7928,23 +7762,56 @@ func (m *SignatureDef) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DigestItems = append(m.DigestItems, &DigestItem{}) + if err := m.DigestItems[len(m.DigestItems)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Justification", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.AsEcdsa = string(dAtA[iNdEx:postIndex]) + m.Justification = dAtA[iNdEx:postIndex] iNdEx = postIndex default: iNdEx = preIndex @@ -7968,7 +7835,7 @@ func (m *SignatureDef) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *MortalEra) UnmarshalVT(dAtA []byte) error { +func (m *Header) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7991,17 +7858,17 @@ func (m *MortalEra) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MortalEra: wiretype end group for non-group") + return fmt.Errorf("proto: Header: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MortalEra: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field First", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParentHash", wireType) } - m.First = 0 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8011,16 +7878,28 @@ func (m *MortalEra) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.First |= uint32(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ParentHash = dAtA[iNdEx:postIndex] + iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Second", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StateRoot", wireType) } - m.Second = 0 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8030,67 +7909,78 @@ func (m *MortalEra) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Second |= uint32(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + if byteLen < 0 { + return protohelpers.ErrInvalidLength } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + byteLen + if postIndex < 0 { return protohelpers.ErrInvalidLength } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PaymentFields) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + m.StateRoot = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtrinsicsRoot", wireType) } - if iNdEx >= l { + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.ExtrinsicsRoot = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SpecVersion", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PaymentFields: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PaymentFields: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.SpecVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SpecVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UpdatedMetadata", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8100,23 +7990,22 @@ func (m *PaymentFields) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Tip = string(dAtA[iNdEx:postIndex]) + m.UpdatedMetadata = dAtA[iNdEx:postIndex] iNdEx = postIndex default: iNdEx = preIndex @@ -8140,7 +8029,7 @@ func (m *PaymentFields) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Block) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *DigestItem) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8163,17 +8052,17 @@ func (m *Block) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Block: wiretype end group for non-group") + return fmt.Errorf("proto: DigestItem: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DigestItem: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsChangesTrieRoot", wireType) } - m.Number = 0 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8183,16 +8072,29 @@ func (m *Block) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Number |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := dAtA[iNdEx:postIndex] + m.Item = &DigestItem_AsChangesTrieRoot{AsChangesTrieRoot: v} + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsPreRuntime", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8202,31 +8104,36 @@ func (m *Block) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Hash = stringValue - iNdEx = postIndex + if oneof, ok := m.Item.(*DigestItem_AsPreRuntime); ok { + if err := oneof.AsPreRuntime.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &PreRuntime{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &DigestItem_AsPreRuntime{AsPreRuntime: v} + } + iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsConsensus", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8253,16 +8160,21 @@ func (m *Block) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Header == nil { - m.Header = &Header{} - } - if err := m.Header.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + if oneof, ok := m.Item.(*DigestItem_AsConsensus); ok { + if err := oneof.AsConsensus.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Consensus{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &DigestItem_AsConsensus{AsConsensus: v} } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Extrinsics", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsSeal", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8289,14 +8201,21 @@ func (m *Block) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Extrinsics = append(m.Extrinsics, &Extrinsic{}) - if err := m.Extrinsics[len(m.Extrinsics)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + if oneof, ok := m.Item.(*DigestItem_AsSeal); ok { + if err := oneof.AsSeal.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Seal{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &DigestItem_AsSeal{AsSeal: v} } iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsChangesTrieSignal", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8323,48 +8242,21 @@ func (m *Block) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Events = append(m.Events, &Event{}) - if err := m.Events[len(m.Events)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DigestItems", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + if oneof, ok := m.Item.(*DigestItem_AsChangesTrieSignal); ok { + if err := oneof.AsChangesTrieSignal.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + } else { + v := &ChangesTrieSignal{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DigestItems = append(m.DigestItems, &DigestItem{}) - if err := m.DigestItems[len(m.DigestItems)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Item = &DigestItem_AsChangesTrieSignal{AsChangesTrieSignal: v} } iNdEx = postIndex - case 7: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Justification", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsOther", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -8391,7 +8283,8 @@ func (m *Block) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Justification = dAtA[iNdEx:postIndex] + v := dAtA[iNdEx:postIndex] + m.Item = &DigestItem_AsOther{AsOther: v} iNdEx = postIndex default: iNdEx = preIndex @@ -8415,7 +8308,7 @@ func (m *Block) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *Header) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *PreRuntime) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8438,17 +8331,17 @@ func (m *Header) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Header: wiretype end group for non-group") + return fmt.Errorf("proto: PreRuntime: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PreRuntime: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentHash", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusEngineId", wireType) } - var stringLen uint64 + m.ConsensusEngineId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8458,69 +8351,16 @@ func (m *Header) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.ConsensusEngineId |= uint32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.ParentHash = stringValue - iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StateRoot", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.StateRoot = stringValue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtrinsicsRoot", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8530,27 +8370,22 @@ func (m *Header) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.ExtrinsicsRoot = stringValue + m.Bytes = dAtA[iNdEx:postIndex] iNdEx = postIndex default: iNdEx = preIndex @@ -8574,7 +8409,7 @@ func (m *Header) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *DigestItem) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Consensus) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8597,17 +8432,17 @@ func (m *DigestItem) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DigestItem: wiretype end group for non-group") + return fmt.Errorf("proto: Consensus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DigestItem: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Consensus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsChangesTrieRoot", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusEngineId", wireType) } - var stringLen uint64 + m.ConsensusEngineId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8617,33 +8452,16 @@ func (m *DigestItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.ConsensusEngineId |= uint32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Item = &DigestItem_AsChangesTrieRoot{AsChangesTrieRoot: stringValue} - iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsPreRuntime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8653,195 +8471,30 @@ func (m *DigestItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if oneof, ok := m.Item.(*DigestItem_AsPreRuntime); ok { - if err := oneof.AsPreRuntime.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &PreRuntime{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &DigestItem_AsPreRuntime{AsPreRuntime: v} - } + m.Bytes = dAtA[iNdEx:postIndex] iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsConsensus", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Item.(*DigestItem_AsConsensus); ok { - if err := oneof.AsConsensus.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &Consensus{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &DigestItem_AsConsensus{AsConsensus: v} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsSeal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Item.(*DigestItem_AsSeal); ok { - if err := oneof.AsSeal.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &Seal{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &DigestItem_AsSeal{AsSeal: v} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsChangesTrieSignal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Item.(*DigestItem_AsChangesTrieSignal); ok { - if err := oneof.AsChangesTrieSignal.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &ChangesTrieSignal{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &DigestItem_AsChangesTrieSignal{AsChangesTrieSignal: v} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsOther", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := dAtA[iNdEx:postIndex] - m.Item = &DigestItem_AsOther{AsOther: v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { @@ -8857,7 +8510,7 @@ func (m *DigestItem) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *PreRuntime) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Seal) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8880,10 +8533,10 @@ func (m *PreRuntime) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PreRuntime: wiretype end group for non-group") + return fmt.Errorf("proto: Seal: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PreRuntime: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Seal: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -8958,7 +8611,7 @@ func (m *PreRuntime) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *Consensus) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *ChangesTrieSignal) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8981,17 +8634,17 @@ func (m *Consensus) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Consensus: wiretype end group for non-group") + return fmt.Errorf("proto: ChangesTrieSignal: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Consensus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ChangesTrieSignal: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusEngineId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IsNewConfiguration", wireType) } - m.ConsensusEngineId = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9001,14 +8654,15 @@ func (m *Consensus) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ConsensusEngineId |= uint32(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.IsNewConfiguration = bool(v != 0) case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsNewConfiguration", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -9035,7 +8689,7 @@ func (m *Consensus) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Bytes = dAtA[iNdEx:postIndex] + m.AsNewConfiguration = dAtA[iNdEx:postIndex] iNdEx = postIndex default: iNdEx = preIndex @@ -9059,7 +8713,7 @@ func (m *Consensus) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *Seal) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Extrinsic) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9082,17 +8736,17 @@ func (m *Seal) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Seal: wiretype end group for non-group") + return fmt.Errorf("proto: Extrinsic: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Seal: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Extrinsic: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusEngineId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } - m.ConsensusEngineId = 0 + m.Version = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9102,16 +8756,16 @@ func (m *Seal) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ConsensusEngineId |= uint32(b&0x7F) << shift + m.Version |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9121,22 +8775,63 @@ func (m *Seal) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Bytes = dAtA[iNdEx:postIndex] + if m.Signature == nil { + m.Signature = &Signature{} + } + if err := m.Signature.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Method == nil { + m.Method = &Call{} + } + if err := m.Method.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -9160,7 +8855,7 @@ func (m *Seal) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *ChangesTrieSignal) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Signature) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9183,17 +8878,17 @@ func (m *ChangesTrieSignal) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ChangesTrieSignal: wiretype end group for non-group") + return fmt.Errorf("proto: Signature: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ChangesTrieSignal: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Signature: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsNewConfiguration", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9203,257 +8898,13 @@ func (m *ChangesTrieSignal) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.IsNewConfiguration = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsNewConfiguration", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AsNewConfiguration = dAtA[iNdEx:postIndex] - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Extrinsic) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Extrinsic: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Extrinsic: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Signature == nil { - m.Signature = &Signature{} - } - if err := m.Signature.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Method == nil { - m.Method = &Call{} - } - if err := m.Method.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Signature) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Signature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Signature: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength + if msglen < 0 { + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { @@ -9572,328 +9023,14 @@ func (m *Signature) UnmarshalVTUnsafe(dAtA []byte) error { return io.ErrUnexpectedEOF } var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Nonce = stringValue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Tip = stringValue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MultiAddress) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MultiAddress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MultiAddress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsId", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsId = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.AsId = stringValue - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsIndex", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsIndex = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AsIndex", wireType) - } - m.AsIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AsIndex |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsRaw", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsRaw = bool(v != 0) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsRaw", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.AsRaw = stringValue - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsAddress_32", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsAddress_32 = bool(v != 0) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsAddress_32", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.AsAddress_32 = stringValue - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsAddress_20", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.IsAddress_20 = bool(v != 0) - case 10: + m.Nonce = stringValue + iNdEx = postIndex + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsAddress_20", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9925,7 +9062,7 @@ func (m *MultiAddress) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.AsAddress_20 = stringValue + m.Tip = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -9949,7 +9086,7 @@ func (m *MultiAddress) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *MultiSignature) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *MultiAddress) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9972,15 +9109,15 @@ func (m *MultiSignature) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MultiSignature: wiretype end group for non-group") + return fmt.Errorf("proto: MultiAddress: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MultiSignature: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MultiAddress: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsEd_25519", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IsId", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -9997,12 +9134,12 @@ func (m *MultiSignature) UnmarshalVTUnsafe(dAtA []byte) error { break } } - m.IsEd_25519 = bool(v != 0) + m.IsId = bool(v != 0) case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsEd_25519", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10012,31 +9149,26 @@ func (m *MultiSignature) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.AsEd_25519 = stringValue + m.AsId = dAtA[iNdEx:postIndex] iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSr_25519", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IsIndex", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -10053,12 +9185,51 @@ func (m *MultiSignature) UnmarshalVTUnsafe(dAtA []byte) error { break } } - m.IsSr_25519 = bool(v != 0) + m.IsIndex = bool(v != 0) case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AsIndex", wireType) + } + m.AsIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AsIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsRaw", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsRaw = bool(v != 0) + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsSr_25519", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsRaw", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10068,31 +9239,26 @@ func (m *MultiSignature) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.AsSr_25519 = stringValue + m.AsRaw = dAtA[iNdEx:postIndex] iNdEx = postIndex - case 5: + case 7: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsEcdsa", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IsAddress_32", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -10109,12 +9275,12 @@ func (m *MultiSignature) UnmarshalVTUnsafe(dAtA []byte) error { break } } - m.IsEcdsa = bool(v != 0) - case 6: + m.IsAddress_32 = bool(v != 0) + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsEcdsa", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsAddress_32", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10124,27 +9290,73 @@ func (m *MultiSignature) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + m.AsAddress_32 = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsAddress_20", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsAddress_20 = bool(v != 0) + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsAddress_20", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF } - m.AsEcdsa = stringValue + m.AsAddress_20 = dAtA[iNdEx:postIndex] iNdEx = postIndex default: iNdEx = preIndex @@ -10168,7 +9380,7 @@ func (m *MultiSignature) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *ExtrinsicEra) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *MultiSignature) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10191,15 +9403,15 @@ func (m *ExtrinsicEra) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExtrinsicEra: wiretype end group for non-group") + return fmt.Errorf("proto: MultiSignature: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExtrinsicEra: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MultiSignature: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsImmortalEra", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IsEd_25519", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -10216,32 +9428,12 @@ func (m *ExtrinsicEra) UnmarshalVTUnsafe(dAtA []byte) error { break } } - m.IsImmortalEra = bool(v != 0) + m.IsEd_25519 = bool(v != 0) case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsMortalEra", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsMortalEra = bool(v != 0) - case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsMortalEra", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsEd_25519", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10251,84 +9443,48 @@ func (m *ExtrinsicEra) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.AsMortalEra == nil { - m.AsMortalEra = &MortalEra{} - } - if err := m.AsMortalEra.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.AsEd_25519 = dAtA[iNdEx:postIndex] iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Call) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsSr_25519", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Call: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Call: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.IsSr_25519 = bool(v != 0) + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CallIndex", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsSr_25519", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10338,31 +9494,46 @@ func (m *Call) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.CallIndex == nil { - m.CallIndex = &CallIndex{} + m.AsSr_25519 = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEcdsa", wireType) } - if err := m.CallIndex.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex - case 2: + m.IsEcdsa = bool(v != 0) + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsEcdsa", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -10389,7 +9560,7 @@ func (m *Call) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Args = dAtA[iNdEx:postIndex] + m.AsEcdsa = dAtA[iNdEx:postIndex] iNdEx = postIndex default: iNdEx = preIndex @@ -10413,7 +9584,7 @@ func (m *Call) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *Field) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *ExtrinsicEra) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10436,17 +9607,17 @@ func (m *Field) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Field: wiretype end group for non-group") + return fmt.Errorf("proto: ExtrinsicEra: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Field: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExtrinsicEra: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsImmortalEra", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10456,33 +9627,17 @@ func (m *Field) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Name = stringValue - iNdEx = postIndex + m.IsImmortalEra = bool(v != 0) case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LookupIndex", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IsMortalEra", wireType) } - m.LookupIndex = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10492,50 +9647,15 @@ func (m *Field) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LookupIndex |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.IsMortalEra = bool(v != 0) case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JsonValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Value = &Field_JsonValue{JsonValue: stringValue} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AsMortalEra", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10562,16 +9682,11 @@ func (m *Field) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if oneof, ok := m.Value.(*Field_Fields); ok { - if err := oneof.Fields.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &Fields{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Field_Fields{Fields: v} + if m.AsMortalEra == nil { + m.AsMortalEra = &MortalEra{} + } + if err := m.AsMortalEra.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: @@ -10596,7 +9711,7 @@ func (m *Field) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *Fields) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Call) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10619,15 +9734,15 @@ func (m *Fields) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Fields: wiretype end group for non-group") + return fmt.Errorf("proto: Call: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Fields: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Call: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CallIndex", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10654,11 +9769,44 @@ func (m *Fields) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Value = append(m.Value, &Field{}) - if err := m.Value[len(m.Value)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if m.CallIndex == nil { + m.CallIndex = &CallIndex{} + } + if err := m.CallIndex.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Args = dAtA[iNdEx:postIndex] + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -10839,7 +9987,7 @@ func (m *Event) UnmarshalVTUnsafe(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10849,31 +9997,28 @@ func (m *Event) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Fields = append(m.Fields, &Field{}) - if err := m.Fields[len(m.Fields)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Fields = append(m.Fields, dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10883,27 +10028,22 @@ func (m *Event) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Id = stringValue + m.Id = dAtA[iNdEx:postIndex] iNdEx = postIndex case 4: if wireType != 2 { @@ -10945,7 +10085,7 @@ func (m *Event) UnmarshalVTUnsafe(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Topics", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10955,27 +10095,22 @@ func (m *Event) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Topics = append(m.Topics, stringValue) + m.Topics = append(m.Topics, dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -11182,7 +10317,7 @@ func (m *SignatureDef) UnmarshalVTUnsafe(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AsEd25519", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11192,27 +10327,22 @@ func (m *SignatureDef) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.AsEd25519 = stringValue + m.AsEd25519 = dAtA[iNdEx:postIndex] iNdEx = postIndex case 3: if wireType != 0 { @@ -11238,7 +10368,7 @@ func (m *SignatureDef) UnmarshalVTUnsafe(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AsSr25519", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11248,27 +10378,22 @@ func (m *SignatureDef) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.AsSr25519 = stringValue + m.AsSr25519 = dAtA[iNdEx:postIndex] iNdEx = postIndex case 5: if wireType != 0 { @@ -11294,7 +10419,7 @@ func (m *SignatureDef) UnmarshalVTUnsafe(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AsEcdsa", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11304,27 +10429,22 @@ func (m *SignatureDef) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.AsEcdsa = stringValue + m.AsEcdsa = dAtA[iNdEx:postIndex] iNdEx = postIndex default: iNdEx = preIndex diff --git a/vara-common/proto/block.proto b/vara-common/proto/block.proto index 475ebd2..0de616b 100644 --- a/vara-common/proto/block.proto +++ b/vara-common/proto/block.proto @@ -1,11 +1,12 @@ syntax = "proto3"; package sf.gear.type.v1; -option go_package = "github.com/streamingfast/firehose-gear/pb;pbgear"; +option go_package = "github.com/streamingfast/firehose-gear/pb/sf/gear/type/v1;pbgear"; + message Block { uint64 number = 1; - string hash = 2; + bytes hash = 2; Header header = 3; repeated Extrinsic extrinsics = 4; repeated Event events = 5; @@ -15,17 +16,19 @@ message Block { message Header { // [32]byte - string parent_hash = 1; + bytes parent_hash = 1; // [32]byte - string state_root = 2; + bytes state_root = 2; // [32]byte - string extrinsics_root = 3; + bytes extrinsics_root = 3; + uint32 spec_version = 4; + bytes updated_metadata = 5; } message DigestItem { oneof Item { // [32]byte - string as_changes_trie_root = 1; + bytes as_changes_trie_root = 1; PreRuntime as_pre_runtime = 2; Consensus as_consensus = 3; Seal as_seal = 4; @@ -73,30 +76,28 @@ message Signature { message MultiAddress { bool is_id = 1; // [32]byte - string as_id = 2; + bytes as_id = 2; bool is_index = 3; uint32 as_index = 4; bool is_raw = 5; - // []byte - string as_raw = 6; + bytes as_raw = 6; bool is_address_32 = 7; - // []byte - string as_address_32 = 8; + bytes as_address_32 = 8; bool is_address_20 = 9; // [20]byte - string as_address_20 = 10; + bytes as_address_20 = 10; } message MultiSignature { bool is_ed_25519 = 1; // [64]byte - string as_ed_25519 = 2; + bytes as_ed_25519 = 2; bool is_sr_25519 = 3; // [64]byte - string as_sr_25519 = 4; + bytes as_sr_25519 = 4; bool is_ecdsa = 5; - // [65]byte - string as_ecdsa = 6; + // [64]byte + bytes as_ecdsa = 6; } message ExtrinsicEra { @@ -110,20 +111,6 @@ message Call { bytes args = 2; } -message Field { - string name = 1; - int64 lookup_index = 2; - - oneof value { - string json_value = 3; - Fields fields = 4; - } -} - -message Fields { - repeated Field value = 1; -} - message CallIndex { uint32 section_index = 1; uint32 method_index = 2; @@ -131,12 +118,12 @@ message CallIndex { message Event { string name = 1; - repeated Field fields = 2; + repeated bytes fields = 2; // [2]byte - string id = 3; + bytes id = 3; Phase phase = 4; // [32]byte - repeated string topics = 5; + repeated bytes topics = 5; } message Phase { @@ -149,13 +136,13 @@ message Phase { message SignatureDef { bool is_ed25519 = 1; // [64]byte - string as_ed25519 = 2; + bytes as_ed25519 = 2; bool is_sr25519 = 3; // [64]byte - string as_sr25519 = 4; + bytes as_sr25519 = 4; bool is_ecdsa = 5; - // [65]byte - string as_ecdsa = 6; + // [64]byte + bytes as_ecdsa = 6; } message MortalEra { diff --git a/vara-common/proto/extrinsics.proto b/vara-common/proto/extrinsics.proto deleted file mode 100644 index f30858c..0000000 --- a/vara-common/proto/extrinsics.proto +++ /dev/null @@ -1,95 +0,0 @@ -syntax = "proto3"; -package sf.substreams.vara.v1; - -option go_package = "github.com/streamingfast/firehose-gear/pb;pbgear"; - -message ParsedExtrinsics { - string block_hash = 1; - repeated ParsedExtrinsic extrinsics = 2; -} - -message ParsedExtrinsic { - string name = 1; - repeated ParsedField call_fields = 2; - ParsedCallIndex call_index = 3; - uint32 version = 4; - ParsedSignature signature = 5; -} - -message ParsedField { - string name = 1; - int64 lookup_index = 2; - string type = 3; - oneof value { - string field_value = 4; - ParsedField fields = 5; - } - -} - -message AirDropTransferExt { - // AccountId - string source = 1; - // AccountId - string dest = 2; - // U128 - string amount = 3; -} - -message ParsedCallIndex { - uint32 section_index = 1; - uint32 method_index = 2; -} - -message ParsedSignature { - ParsedSigner signer = 1; - ParsedSignatureDef signature = 2; - ParsedEra era = 12; - // big.Int - string none = 13; - ParsedPaymentFields payment_fields = 14; -} - -message ParsedSigner { - bool is_ID = 1; - // [32]byte - string as_ID = 2; - bool is_index = 3; - uint32 as_index = 4; - bool is_raw = 5; - bytes as_raw = 6; - bool is_address_32 = 7; - // [32]byte - string as_address_32 = 8; - bool is_address_20 = 9; - // [20]byte - string as_address_20 = 10; -} - -message ParsedSignatureDef { - bool is_ed25519 = 1; - // [64]byte - string as_ed25519 = 2; - bool is_sr25519 = 3; - // [64]byte - string as_sr25519 = 4; - bool is_ecdsa = 5; - // [65]byte - string as_ecdsa = 6; -} - -message ParsedEra { - bool is_immortal_era = 1; - bool is_mortal_era = 2; - ParsedMortalEra as_mortal_era = 3; -} - -message ParsedMortalEra { - uint32 first = 1; - uint32 last = 2; -} - -message ParsedPaymentFields { - // big.Int - string tip = 1; -} \ No newline at end of file diff --git a/vara-common/substreams.yaml b/vara-common/substreams.yaml index d82b68a..2c60614 100644 --- a/vara-common/substreams.yaml +++ b/vara-common/substreams.yaml @@ -15,13 +15,13 @@ binaries: type: wasip1/tinygo-v1 # wasm/rust-v1 file: ./wasm.wasm -network: mainnet +network: vara-mainnet modules: - - name: map_test + - name: map_decoded_block kind: map initialBlock: 12360600 inputs: - - source: sf.ethereum.type.v2.Block + - source: sf.gear.type.v1.Block output: - type: proto:my.Block + type: proto:sf.gear.type.v1.DecodedBlock