From 94b05f5a8ed474ac439f98c3026b2342b272c73f Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 21 Oct 2024 12:44:53 +0200 Subject: [PATCH] add fork version test --- .../bridge-hub-paseo/tests/snowbridge.rs | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/system-parachains/bridge-hub-paseo/tests/snowbridge.rs b/system-parachains/bridge-hub-paseo/tests/snowbridge.rs index 55b41d4..d5b051e 100644 --- a/system-parachains/bridge-hub-paseo/tests/snowbridge.rs +++ b/system-parachains/bridge-hub-paseo/tests/snowbridge.rs @@ -30,6 +30,7 @@ use cumulus_primitives_core::XcmError::{FailedToTransactAsset, TooExpensive}; use frame_support::{parameter_types, traits::Contains}; use parachains_common::{AccountId, AuraId, Balance}; pub use parachains_runtimes_test_utils::test_cases::change_storage_constant_by_governance_works; +use snowbridge_beacon_primitives::{Fork, ForkVersions}; use snowbridge_pallet_ethereum_client::WeightInfo; use sp_core::H160; use sp_keyring::AccountKeyring::Alice; @@ -216,6 +217,35 @@ fn ethereum_to_paseo_message_extrinsics_work() { ); } +#[test] +fn fork_versions_are_set_to_sepolia() { + assert_eq!( + ForkVersions { + genesis: Fork { + version: [0, 0, 0, 0], // 0x00000000 + epoch: 0, + }, + altair: Fork { + version: [1, 0, 0, 0], // 0x01000000 + epoch: 74240, + }, + bellatrix: Fork { + version: [2, 0, 0, 0], // 0x02000000 + epoch: 144896, + }, + capella: Fork { + version: [3, 0, 0, 0], // 0x03000000 + epoch: 194048, + }, + deneb: Fork { + version: [4, 0, 0, 0], // 0x04000000 + epoch: 269568, + }, + }, + bridge_hub_paseo_runtime::bridge_to_ethereum_config::ChainForkVersions::get() + ) +} + #[test] fn ethereum_outbound_queue_processes_messages_before_message_queue_works() { snowbridge_runtime_test_common::ethereum_outbound_queue_processes_messages_before_message_queue_works::<