From 3a01682edf2bd82fdf5fa0b616006fe22720fcea Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Fri, 13 Jan 2023 13:19:25 -0500 Subject: [PATCH] feat(core): switch shanghaiBlock to shanghaiTime (#2049) * geth switched to time-based forking in https://github.com/ethereum/go-ethereum/pull/25878, this changes the name of the `shanghai_block` field to `shanghaiTime` so it is compatible with geth. --- ethers-core/src/utils/genesis.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ethers-core/src/utils/genesis.rs b/ethers-core/src/utils/genesis.rs index 232dd7d4..77d072ee 100644 --- a/ethers-core/src/utils/genesis.rs +++ b/ethers-core/src/utils/genesis.rs @@ -130,11 +130,13 @@ pub struct ChainConfig { #[serde(skip_serializing_if = "Option::is_none")] pub merge_netsplit_block: Option, - /// The Shanghai hard fork block. + /// Shanghai switch time. #[serde(skip_serializing_if = "Option::is_none")] - pub shanghai_block: Option, + pub shanghai_time: Option, - /// The Cancun hard fork block. + // TODO: change to cancunTime when is + // merged in geth + /// Cancun hard fork block. #[serde(skip_serializing_if = "Option::is_none")] pub cancun_block: Option,