diff --git a/crates/starknet-types-rpc/src/v0_7_1/starknet_api_openrpc.rs b/crates/starknet-types-rpc/src/v0_7_1/starknet_api_openrpc.rs index 58e4a97..a6a37f0 100644 --- a/crates/starknet-types-rpc/src/v0_7_1/starknet_api_openrpc.rs +++ b/crates/starknet-types-rpc/src/v0_7_1/starknet_api_openrpc.rs @@ -305,11 +305,9 @@ pub struct ContractStorageDiffItem { #[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)] pub struct KeyValuePair { /// The key of the changed value - #[serde(default)] - pub key: Option, + pub key: F, /// The new value applied to the given address - #[serde(default)] - pub value: Option, + pub value: F, } /// Specifies a storage domain in Starknet. Each domain has different gurantess regarding availability @@ -504,15 +502,12 @@ pub struct DeprecatedContractClass { #[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)] pub struct DeprecatedEntryPointsByType { - #[serde(default)] #[serde(rename = "CONSTRUCTOR")] - pub constructor: Option>>, - #[serde(default)] + pub constructor: Vec>, #[serde(rename = "EXTERNAL")] - pub external: Option>>, - #[serde(default)] + pub external: Vec>, #[serde(rename = "L1_HANDLER")] - pub l1_handler: Option>>, + pub l1_handler: Vec>, } /// Event information decorated with metadata on where it was emitted / An event emitted as a result of transaction execution @@ -892,33 +887,27 @@ pub struct StateDiff { #[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)] pub struct NewClasses { /// The hash of the declared class - #[serde(default)] - pub class_hash: Option, + pub class_hash: F, /// The Cairo assembly hash corresponding to the declared class - #[serde(default)] - pub compiled_class_hash: Option, + pub compiled_class_hash: F, } /// The updated nonce per contract address #[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)] pub struct NonceUpdate { /// The address of the contract - #[serde(default)] - pub contract_address: Option>, + pub contract_address: Address, /// The nonce for the given address at the end of the block - #[serde(default)] - pub nonce: Option, + pub nonce: F, } /// The list of contracts whose class was replaced #[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)] pub struct ReplacedClass { /// The new class hash - #[serde(default)] - pub class_hash: Option, + pub class_hash: F, /// The address of the contract whose class was replaced - #[serde(default)] - pub contract_address: Option>, + pub contract_address: Address, } #[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)] @@ -951,8 +940,7 @@ pub struct StructMember { #[serde(flatten)] pub typed_parameter: TypedParameter, /// offset of this property within the struct - #[serde(default)] - pub offset: Option, + pub offset: u64, } /// An object describing the node synchronization status diff --git a/crates/starknet-types-rpc/src/v0_7_1/starknet_trace_api_openrpc.rs b/crates/starknet-types-rpc/src/v0_7_1/starknet_trace_api_openrpc.rs index 6d9cde4..e0f1ddb 100644 --- a/crates/starknet-types-rpc/src/v0_7_1/starknet_trace_api_openrpc.rs +++ b/crates/starknet-types-rpc/src/v0_7_1/starknet_trace_api_openrpc.rs @@ -66,8 +66,7 @@ pub type NestedCall = FunctionInvocation; #[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)] pub struct OrderedEvent { /// the order of the event within the transaction - #[serde(default)] - pub order: Option, + pub order: u64, #[serde(flatten)] pub event: Event, } @@ -76,8 +75,7 @@ pub struct OrderedEvent { #[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)] pub struct OrderedMessage { /// the order of the message within the transaction - #[serde(default)] - pub order: Option, + pub order: u64, #[serde(flatten)] pub msg_to_l_1: MsgToL1, } @@ -182,19 +180,15 @@ pub struct L1HandlerTransactionTrace { #[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)] pub struct SimulateTransactionsResult { - #[serde(default)] - pub fee_estimation: Option>, - #[serde(default)] - pub transaction_trace: Option>, + pub fee_estimation: FeeEstimate, + pub transaction_trace: TransactionTrace, } /// A single pair of transaction hash and corresponding trace #[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)] pub struct TraceBlockTransactionsResult { - #[serde(default)] - pub trace_root: Option>, - #[serde(default)] - pub transaction_hash: Option, + pub trace_root: TransactionTrace, + pub transaction_hash: F, } /// Parameters of the `starknet_traceTransaction` method.