From 3ed6f6da5ffad84ceefc6b1b7a80436c8031fe18 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Fri, 20 Sep 2024 11:50:21 +0800 Subject: [PATCH] Fix KTON permission (#1595) * Fix KTON permission * Release `koi-6660` --- runtime/common/src/gov_origin.rs | 5 +++++ runtime/crab/src/pallets/deposit.rs | 2 +- runtime/darwinia/src/pallets/deposit.rs | 2 +- runtime/koi/src/lib.rs | 2 +- runtime/koi/src/pallets/deposit.rs | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/runtime/common/src/gov_origin.rs b/runtime/common/src/gov_origin.rs index f53b64ec8..9dda93504 100644 --- a/runtime/common/src/gov_origin.rs +++ b/runtime/common/src/gov_origin.rs @@ -51,3 +51,8 @@ pub type All = EnsureProportionAtLeast; /// An [`AccountId20`] generated from b"root". pub const ROOT: AccountId20 = AccountId20([0x72, 0x6f, 0x6f, 0x74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); + +/// Deposit contract `0x46275d29113f065c2aac262f34C7a3d8a8B7377D`. +pub const KTON_ADMIN: AccountId20 = AccountId20([ + 70, 39, 93, 41, 17, 63, 6, 92, 42, 172, 38, 47, 52, 199, 163, 216, 168, 183, 55, 125, +]); diff --git a/runtime/crab/src/pallets/deposit.rs b/runtime/crab/src/pallets/deposit.rs index d0fe9ad76..6ce414c14 100644 --- a/runtime/crab/src/pallets/deposit.rs +++ b/runtime/crab/src/pallets/deposit.rs @@ -39,7 +39,7 @@ impl darwinia_deposit::SimpleAsset for KtonMinting { Err(>::BalanceLow)?; } - Assets::burn(RuntimeOrigin::signed(ROOT), asset_id.into(), *who, amount) + Assets::burn(RuntimeOrigin::signed(KTON_ADMIN), asset_id.into(), *who, amount) } } diff --git a/runtime/darwinia/src/pallets/deposit.rs b/runtime/darwinia/src/pallets/deposit.rs index 2fd603bff..e1ca34c21 100644 --- a/runtime/darwinia/src/pallets/deposit.rs +++ b/runtime/darwinia/src/pallets/deposit.rs @@ -39,7 +39,7 @@ impl darwinia_deposit::SimpleAsset for KtonMinting { Err(>::BalanceLow)?; } - Assets::burn(RuntimeOrigin::signed(ROOT), asset_id.into(), *who, amount) + Assets::burn(RuntimeOrigin::signed(KTON_ADMIN), asset_id.into(), *who, amount) } } diff --git a/runtime/koi/src/lib.rs b/runtime/koi/src/lib.rs index 947a11780..e5bf25c80 100644 --- a/runtime/koi/src/lib.rs +++ b/runtime/koi/src/lib.rs @@ -80,7 +80,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion { spec_name: sp_runtime::create_runtime_str!("Darwinia Koi"), impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"), authoring_version: 0, - spec_version: 6_6_5_9, + spec_version: 6_6_6_0, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 0, diff --git a/runtime/koi/src/pallets/deposit.rs b/runtime/koi/src/pallets/deposit.rs index fe014b61c..d5789c6d0 100644 --- a/runtime/koi/src/pallets/deposit.rs +++ b/runtime/koi/src/pallets/deposit.rs @@ -39,7 +39,7 @@ impl darwinia_deposit::SimpleAsset for KtonMinting { Err(>::BalanceLow)?; } - Assets::burn(RuntimeOrigin::signed(ROOT), asset_id.into(), *who, amount) + Assets::burn(RuntimeOrigin::signed(KTON_ADMIN), asset_id.into(), *who, amount) } }