From 1db8d239c9adf4790852c6935bbee48c583f9c6b Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Andres <11448715+al3mart@users.noreply.github.com> Date: Thu, 29 May 2025 16:20:43 +0200 Subject: [PATCH] fix(testnet): EVM ChainID to use PARA ID --- runtime/testnet/src/config/contracts.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runtime/testnet/src/config/contracts.rs b/runtime/testnet/src/config/contracts.rs index 85811da27..b2386cfe8 100644 --- a/runtime/testnet/src/config/contracts.rs +++ b/runtime/testnet/src/config/contracts.rs @@ -38,6 +38,7 @@ impl Randomness> for Dum const ETH: u128 = 1_000_000_000_000_000_000; parameter_types! { + pub ChainId: u64 = u32::from(crate::genesis::PARA_ID) as u64; pub Schedule: pallet_contracts::Schedule = schedule::(); pub const DefaultDepositLimit: Balance = deposit(1024, 1024 * 1024); pub const CodeHashLockupDepositPercent: Perbill = Perbill::from_percent(0); @@ -91,8 +92,8 @@ impl pallet_revive::Config for Runtime { // No runtime dispatchables are callable from contracts. type CallFilter = Nothing; type ChainExtension = (); - // EVM chain id. 3,395 is a unique ID still. - type ChainId = ConstU64<3_395>; + // EVM Chain Id. Should be different from the one configured in mainnet. + type ChainId = ChainId; // 30 percent of storage deposit held for using a code hash. type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent; type Currency = Balances;