|
1 | 1 | use std::collections::HashMap; |
2 | 2 |
|
3 | 3 | use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; |
4 | | -use serde::{Deserialize, Serialize}; |
| 4 | +use serde::Serialize; |
5 | 5 | use shared_execution_objects::central_objects::CentralTransactionExecutionInfo; |
6 | 6 | use starknet_api::block::{BlockHash, BlockInfo, BlockNumber}; |
7 | | -use starknet_api::core::{ChainId, ClassHash, CompiledClassHash, ContractAddress, Nonce}; |
| 7 | +use starknet_api::core::{ |
| 8 | + deserialize_chain_id_from_hex, |
| 9 | + ChainId, |
| 10 | + ClassHash, |
| 11 | + CompiledClassHash, |
| 12 | + ContractAddress, |
| 13 | + Nonce, |
| 14 | +}; |
8 | 15 | use starknet_api::deprecated_contract_class::ContractClass; |
9 | 16 | use starknet_api::executable_transaction::Transaction; |
10 | 17 | use starknet_api::state::StorageKey; |
@@ -69,8 +76,10 @@ pub struct StarknetOsInput { |
69 | 76 | } |
70 | 77 |
|
71 | 78 | // TODO(Meshi): Remove Once the blockifier ChainInfo do not support deprecated fee token. |
72 | | -#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] |
| 79 | +#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] |
| 80 | +#[derive(Clone, Debug, PartialEq, Serialize)] |
73 | 81 | pub struct OsChainInfo { |
| 82 | + #[cfg_attr(feature = "deserialize", serde(deserialize_with = "deserialize_chain_id_from_hex"))] |
74 | 83 | pub(crate) chain_id: ChainId, |
75 | 84 | pub(crate) strk_fee_token_address: ContractAddress, |
76 | 85 | } |
|
0 commit comments