Skip to content

Commit

Permalink
Merge branch 'gdemay/PR-233-optional-fields-block' into 'evm-rpc-cani…
Browse files Browse the repository at this point in the history
…ster'

fix(evmrpc): Various fields in `Block` should be optional

Pre-requisite for
internet-computer-protocol/evm-rpc-canister#233 

See merge request dfinity-lab/public/ic!20095
  • Loading branch information
gregorydemay committed Jun 28, 2024
2 parents 3f04ac2 + a84082d commit 5991b07
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rs/ethereum/cketh/minter/src/eth_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,9 @@ impl From<BlockNumber> for BlockSpec {
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, CandidType)]
pub struct Block {
#[serde(rename = "baseFeePerGas")]
pub base_fee_per_gas: Wei,
pub base_fee_per_gas: Option<Wei>,
pub number: BlockNumber,
pub difficulty: CheckedAmountOf<()>,
pub difficulty: Option<CheckedAmountOf<()>>,
#[serde(rename = "extraData")]
pub extra_data: String,
#[serde(rename = "gasLimit")]
Expand All @@ -478,7 +478,7 @@ pub struct Block {
#[serde(rename = "timestamp")]
pub timestamp: CheckedAmountOf<()>,
#[serde(rename = "totalDifficulty")]
pub total_difficulty: CheckedAmountOf<()>,
pub total_difficulty: Option<CheckedAmountOf<()>>,
#[serde(default)]
pub transactions: Vec<String>,
#[serde(rename = "transactionsRoot")]
Expand Down

0 comments on commit 5991b07

Please sign in to comment.