From ae63b571065eb020b80be6bb2d42d9d0cdb33269 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Tue, 14 Jun 2022 13:41:27 +0300 Subject: [PATCH] fix(core): chainId 31337 corresponds to Anvil/Hardhat not Dev fixes: https://github.com/foundry-rs/foundry/issues/1866, because previously we'd read chain id 31337, parse it as Dev, and then when convert it to the wrong number (1337) which would make the transaction's chain id not match the signer's --- ethers-core/src/types/chain.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethers-core/src/types/chain.rs b/ethers-core/src/types/chain.rs index 41a1b777..ad9e0806 100644 --- a/ethers-core/src/types/chain.rs +++ b/ethers-core/src/types/chain.rs @@ -126,7 +126,7 @@ impl TryFrom for Chain { 100 => Chain::XDai, 137 => Chain::Polygon, 1337 => Chain::Dev, - 31337 => Chain::Dev, + 31337 => Chain::AnvilHardhat, 250 => Chain::Fantom, 4002 => Chain::FantomTestnet, 80001 => Chain::PolygonMumbai,