From d745d24751ecd6e8b041510a0b7a2839928b5989 Mon Sep 17 00:00:00 2001 From: Wenfeng Wang Date: Tue, 7 Nov 2023 21:19:43 +0800 Subject: [PATCH] Change inDEX pallet admin to a multisig account (#298) * change inDEX pallet admin to a multisig account * update --- runtime/khala/src/lib.rs | 15 ++++++++++++++- runtime/phala/src/lib.rs | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/runtime/khala/src/lib.rs b/runtime/khala/src/lib.rs index 9729b076..66b3fc6e 100644 --- a/runtime/khala/src/lib.rs +++ b/runtime/khala/src/lib.rs @@ -1837,9 +1837,22 @@ impl phala_pallets::PhalaConfig for Runtime { // type Currency = Balances; // } +parameter_types! { + // InDexAdminAccount Address: 41jWo4Q2ogXXHCHofUvkwrXjkxyWNdZdpCf92tdqdTB2ZeHP + pub InDexAdminAccountPubKey: [u8; 32] = hex_literal::hex!("315d3946332b2d1d9147634bd970b8b2503895ab9c877ed5d4dcd5fa528f6246"); + pub InDexAdminAccount: AccountId = InDexAdminAccountPubKey::get().into(); +} + +pub struct InDexAdminMembers; +impl SortedMembers for InDexAdminMembers { + fn sorted_members() -> Vec { + [InDexAdminAccount::get()].to_vec() + } +} + impl pallet_index::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type CommitteeOrigin = EnsureRootOrHalfCouncil; + type CommitteeOrigin = EnsureSignedBy; type AssetTransactor = (CurrencyTransactor, FungiblesTransactor); type AssetsRegistry = AssetsRegistry; } diff --git a/runtime/phala/src/lib.rs b/runtime/phala/src/lib.rs index d287050a..51a75bde 100644 --- a/runtime/phala/src/lib.rs +++ b/runtime/phala/src/lib.rs @@ -1796,9 +1796,22 @@ impl pallet_phat_tokenomic::Config for Runtime { type Currency = Balances; } +parameter_types! { + // InDexAdminAccount Address: 444xsyqf856A3EPtvDfPtg7TudDPhEpurq9N1MgukxxqV6h8 + pub InDexAdminAccountPubKey: [u8; 32] = hex_literal::hex!("98ab29aa531ccfdc7756f58c1e10d27d15acd2cbfde2c70c4125e74b2db9e861"); + pub InDexAdminAccount: AccountId = InDexAdminAccountPubKey::get().into(); +} + +pub struct InDexAdminMembers; +impl SortedMembers for InDexAdminMembers { + fn sorted_members() -> Vec { + [InDexAdminAccount::get()].to_vec() + } +} + impl pallet_index::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type CommitteeOrigin = EnsureRootOrHalfCouncil; + type CommitteeOrigin = EnsureSignedBy; type AssetTransactor = (CurrencyTransactor, FungiblesTransactor); type AssetsRegistry = AssetsRegistry; }