From 9abb725febca2d1f86d25ca069ad74fb15bfa442 Mon Sep 17 00:00:00 2001 From: Arsenii Kulikov Date: Wed, 11 Sep 2024 12:13:34 +0400 Subject: [PATCH 1/3] fix --- crates/rpc-types-eth/src/simulate.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/rpc-types-eth/src/simulate.rs b/crates/rpc-types-eth/src/simulate.rs index 42247519229..dd7c5abed67 100644 --- a/crates/rpc-types-eth/src/simulate.rs +++ b/crates/rpc-types-eth/src/simulate.rs @@ -75,6 +75,7 @@ pub struct SimulatePayload { #[cfg_attr(feature = "serde", serde(default))] pub validation: bool, /// Flag to decide if full transactions should be returned instead of just their hashes. + #[serde(default)] pub return_full_transactions: bool, } From 88ddd496553a8019da966d080f835735b4bbc1b8 Mon Sep 17 00:00:00 2001 From: Arsenii Kulikov Date: Sat, 14 Sep 2024 05:07:27 +0400 Subject: [PATCH 2/3] add aliases --- crates/rpc-types-eth/src/block.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/crates/rpc-types-eth/src/block.rs b/crates/rpc-types-eth/src/block.rs index 83f9790e6d9..35e9a1730fa 100644 --- a/crates/rpc-types-eth/src/block.rs +++ b/crates/rpc-types-eth/src/block.rs @@ -347,13 +347,22 @@ pub struct BlockOverrides { )] pub gas_limit: Option, /// Overrides the coinbase address of the block. - #[cfg_attr(feature = "serde", serde(default, skip_serializing_if = "Option::is_none"))] + #[cfg_attr( + feature = "serde", + serde(default, skip_serializing_if = "Option::is_none", alias = "feeRecipient") + )] pub coinbase: Option
, /// Overrides the prevrandao of the block. - #[cfg_attr(feature = "serde", serde(default, skip_serializing_if = "Option::is_none"))] + #[cfg_attr( + feature = "serde", + serde(default, skip_serializing_if = "Option::is_none", alias = "prevRandao") + )] pub random: Option, /// Overrides the basefee of the block. - #[cfg_attr(feature = "serde", serde(default, skip_serializing_if = "Option::is_none"))] + #[cfg_attr( + feature = "serde", + serde(default, skip_serializing_if = "Option::is_none", alias = "baseFeePerGas") + )] pub base_fee: Option, /// A dictionary that maps blockNumber to a user-defined hash. It could be queried from the /// solidity opcode BLOCKHASH. From 8c4994094f35f253ff0cd9250e9315704fe39a7c Mon Sep 17 00:00:00 2001 From: Arsenii Kulikov Date: Sat, 14 Sep 2024 05:13:18 +0400 Subject: [PATCH 3/3] cfg_attr --- crates/rpc-types-eth/src/simulate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rpc-types-eth/src/simulate.rs b/crates/rpc-types-eth/src/simulate.rs index dd7c5abed67..798f2ac0870 100644 --- a/crates/rpc-types-eth/src/simulate.rs +++ b/crates/rpc-types-eth/src/simulate.rs @@ -75,7 +75,7 @@ pub struct SimulatePayload { #[cfg_attr(feature = "serde", serde(default))] pub validation: bool, /// Flag to decide if full transactions should be returned instead of just their hashes. - #[serde(default)] + #[cfg_attr(feature = "serde", serde(default))] pub return_full_transactions: bool, }