Upgrade evm-template to stable2412 (#407)

This commit is contained in:
Amar Singh
2025-04-30 09:20:07 -04:00
committed by GitHub
parent 2dbd3f8d28
commit 987536368c
19 changed files with 4417 additions and 2671 deletions
+4 -4
View File
@@ -29,7 +29,7 @@ mod runtime_tests {
BlockNumber, Runtime,
};
use frame_support::{pallet_prelude::Weight, traits::TypedGet, PalletId};
use sp_runtime::{create_runtime_str, Perbill};
use sp_runtime::{Cow, Perbill};
use sp_version::RuntimeVersion;
use xcm::latest::prelude::BodyId;
@@ -39,14 +39,14 @@ mod runtime_tests {
assert_eq!(
VERSION,
RuntimeVersion {
spec_name: create_runtime_str!("template-parachain"),
impl_name: create_runtime_str!("template-parachain"),
spec_name: Cow::Borrowed("template-parachain"),
impl_name: Cow::Borrowed("template-parachain"),
authoring_version: 1,
spec_version: 1,
impl_version: 0,
apis: evm_runtime_template::RUNTIME_API_VERSIONS,
transaction_version: 1,
state_version: 1,
system_version: 1,
}
);
}
+5 -5
View File
@@ -33,7 +33,7 @@ fn dmp() {
Parachain(1),
Xcm(vec![Transact {
origin_kind: OriginKind::SovereignAccount,
require_weight_at_most: Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024),
fallback_max_weight: Some(Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024)),
call: remark.encode().into(),
}]),
));
@@ -61,7 +61,7 @@ fn ump() {
Parent,
Xcm(vec![Transact {
origin_kind: OriginKind::SovereignAccount,
require_weight_at_most: Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024),
fallback_max_weight: Some(Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024)),
call: remark.encode().into(),
}]),
));
@@ -89,7 +89,7 @@ fn xcmp() {
(Parent, Parachain(2)),
Xcm(vec![Transact {
origin_kind: OriginKind::SovereignAccount,
require_weight_at_most: Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024),
fallback_max_weight: Some(Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024)),
call: remark.encode().into(),
}]),
));
@@ -121,7 +121,7 @@ fn remote_locking_and_unlocking() {
Relay::execute_with(|| {
use pallet_balances::{BalanceLock, Reasons};
assert_eq!(
relay_chain::Balances::locks(child_account_id(2)),
relay_chain::Balances::locks(&child_account_id(2)),
vec![BalanceLock { id: *b"py/xcmlk", amount: locked_amount, reasons: Reasons::All }]
);
});
@@ -149,7 +149,7 @@ fn remote_locking_and_unlocking() {
use pallet_balances::{BalanceLock, Reasons};
// Lock is reduced
assert_eq!(
relay_chain::Balances::locks(child_account_id(2)),
relay_chain::Balances::locks(&child_account_id(2)),
vec![BalanceLock {
id: *b"py/xcmlk",
amount: locked_amount - 50,