Skip to content

Commit

Permalink
revereted codegen changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aniketpr01 committed Jun 27, 2024
1 parent d59c2f2 commit 6121ec8
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions starknet-core/src/types/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4633,7 +4633,7 @@ impl<'de> Deserialize<'de> for AddDeclareTransactionRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
declare_transaction: field0.declare_transaction,
Expand Down Expand Up @@ -4710,7 +4710,7 @@ impl<'de> Deserialize<'de> for AddDeployAccountTransactionRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
deploy_account_transaction: field0.deploy_account_transaction,
Expand Down Expand Up @@ -4787,7 +4787,7 @@ impl<'de> Deserialize<'de> for AddInvokeTransactionRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
invoke_transaction: field0.invoke_transaction,
Expand Down Expand Up @@ -4927,13 +4927,13 @@ impl<'de> Deserialize<'de> for CallRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
let field0 = serde_json::from_value::<Field0>(
elements
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
request: field0.request,
Expand Down Expand Up @@ -5081,19 +5081,19 @@ impl<'de> Deserialize<'de> for EstimateFeeRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
let field1 = serde_json::from_value::<Field1>(
elements
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
let field0 = serde_json::from_value::<Field0>(
elements
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
request: field0.request,
Expand Down Expand Up @@ -5199,13 +5199,13 @@ impl<'de> Deserialize<'de> for EstimateMessageFeeRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
let field0 = serde_json::from_value::<Field0>(
elements
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
message: field0.message,
Expand Down Expand Up @@ -5284,7 +5284,7 @@ impl<'de> Deserialize<'de> for GetBlockTransactionCountRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
block_id: field0.block_id,
Expand Down Expand Up @@ -5361,7 +5361,7 @@ impl<'de> Deserialize<'de> for GetBlockWithReceiptsRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
block_id: field0.block_id,
Expand Down Expand Up @@ -5438,7 +5438,7 @@ impl<'de> Deserialize<'de> for GetBlockWithTxHashesRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
block_id: field0.block_id,
Expand Down Expand Up @@ -5515,7 +5515,7 @@ impl<'de> Deserialize<'de> for GetBlockWithTxsRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
block_id: field0.block_id,
Expand Down Expand Up @@ -5624,13 +5624,13 @@ impl<'de> Deserialize<'de> for GetClassAtRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
let field0 = serde_json::from_value::<Field0>(
elements
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
block_id: field0.block_id,
Expand Down Expand Up @@ -5741,13 +5741,13 @@ impl<'de> Deserialize<'de> for GetClassHashAtRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
let field0 = serde_json::from_value::<Field0>(
elements
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
block_id: field0.block_id,
Expand Down Expand Up @@ -5858,13 +5858,13 @@ impl<'de> Deserialize<'de> for GetClassRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
let field0 = serde_json::from_value::<Field0>(
elements
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
block_id: field0.block_id,
Expand Down Expand Up @@ -5943,7 +5943,7 @@ impl<'de> Deserialize<'de> for GetEventsRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
filter: field0.filter,
Expand Down Expand Up @@ -6052,13 +6052,13 @@ impl<'de> Deserialize<'de> for GetNonceRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
let field0 = serde_json::from_value::<Field0>(
elements
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
block_id: field0.block_id,
Expand Down Expand Up @@ -6137,7 +6137,7 @@ impl<'de> Deserialize<'de> for GetStateUpdateRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
block_id: field0.block_id,
Expand Down Expand Up @@ -6274,19 +6274,19 @@ impl<'de> Deserialize<'de> for GetStorageAtRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
let field1 = serde_json::from_value::<Field1>(
elements
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
let field0 = serde_json::from_value::<Field0>(
elements
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
contract_address: field0.contract_address,
Expand Down Expand Up @@ -6388,13 +6388,13 @@ impl<'de> Deserialize<'de> for GetTransactionByBlockIdAndIndexRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
let field0 = serde_json::from_value::<Field0>(
elements
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
block_id: field0.block_id,
Expand Down Expand Up @@ -6480,7 +6480,7 @@ impl<'de> Deserialize<'de> for GetTransactionByHashRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
transaction_hash: field0.transaction_hash,
Expand Down Expand Up @@ -6564,7 +6564,7 @@ impl<'de> Deserialize<'de> for GetTransactionReceiptRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
transaction_hash: field0.transaction_hash,
Expand Down Expand Up @@ -6648,7 +6648,7 @@ impl<'de> Deserialize<'de> for GetTransactionStatusRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
transaction_hash: field0.transaction_hash,
Expand Down Expand Up @@ -6775,19 +6775,19 @@ impl<'de> Deserialize<'de> for SimulateTransactionsRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
let field1 = serde_json::from_value::<Field1>(
elements
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
let field0 = serde_json::from_value::<Field0>(
elements
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
block_id: field0.block_id,
Expand Down Expand Up @@ -6906,7 +6906,7 @@ impl<'de> Deserialize<'de> for TraceBlockTransactionsRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
block_id: field0.block_id,
Expand Down Expand Up @@ -6990,7 +6990,7 @@ impl<'de> Deserialize<'de> for TraceTransactionRequest {
.pop()
.ok_or_else(|| serde::de::Error::custom("invalid sequence length"))?,
)
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;
.map_err(|err| serde::de::Error::custom(format!("failed to parse element: {}", err)))?;

Ok(Self {
transaction_hash: field0.transaction_hash,
Expand All @@ -7003,4 +7003,4 @@ impl<'de> Deserialize<'de> for TraceTransactionRequest {
Err(serde::de::Error::custom("invalid sequence length"))
}
}
}
}

0 comments on commit 6121ec8

Please sign in to comment.