Skip to content

Commit

Permalink
Fix KTON permission (#1595)
Browse files Browse the repository at this point in the history
* Fix KTON permission

* Release `koi-6660`
  • Loading branch information
AurevoirXavier authored Sep 20, 2024
1 parent 72418d6 commit 3ed6f6d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions runtime/common/src/gov_origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,8 @@ pub type All<T> = EnsureProportionAtLeast<AccountId, T, 1, 1>;
/// 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,
]);
2 changes: 1 addition & 1 deletion runtime/crab/src/pallets/deposit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl darwinia_deposit::SimpleAsset for KtonMinting {
Err(<pallet_assets::Error<Runtime>>::BalanceLow)?;
}

Assets::burn(RuntimeOrigin::signed(ROOT), asset_id.into(), *who, amount)
Assets::burn(RuntimeOrigin::signed(KTON_ADMIN), asset_id.into(), *who, amount)
}
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/darwinia/src/pallets/deposit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl darwinia_deposit::SimpleAsset for KtonMinting {
Err(<pallet_assets::Error<Runtime>>::BalanceLow)?;
}

Assets::burn(RuntimeOrigin::signed(ROOT), asset_id.into(), *who, amount)
Assets::burn(RuntimeOrigin::signed(KTON_ADMIN), asset_id.into(), *who, amount)
}
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/koi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion runtime/koi/src/pallets/deposit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl darwinia_deposit::SimpleAsset for KtonMinting {
Err(<pallet_assets::Error<Runtime>>::BalanceLow)?;
}

Assets::burn(RuntimeOrigin::signed(ROOT), asset_id.into(), *who, amount)
Assets::burn(RuntimeOrigin::signed(KTON_ADMIN), asset_id.into(), *who, amount)
}
}

Expand Down

0 comments on commit 3ed6f6d

Please sign in to comment.