Skip to content

Commit

Permalink
Change inDEX pallet admin to a multisig account (#298) (#309)
Browse files Browse the repository at this point in the history
* change inDEX pallet admin to a multisig account

* update
  • Loading branch information
tolak authored Nov 7, 2023
1 parent 30154c2 commit 7ab0950
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
15 changes: 14 additions & 1 deletion runtime/khala/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<AccountId> for InDexAdminMembers {
fn sorted_members() -> Vec<AccountId> {
[InDexAdminAccount::get()].to_vec()
}
}

impl pallet_index::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type CommitteeOrigin = EnsureRootOrHalfCouncil;
type CommitteeOrigin = EnsureSignedBy<InDexAdminMembers, AccountId>;
type AssetTransactor = (CurrencyTransactor, FungiblesTransactor);
type AssetsRegistry = AssetsRegistry;
}
Expand Down
15 changes: 14 additions & 1 deletion runtime/phala/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<AccountId> for InDexAdminMembers {
fn sorted_members() -> Vec<AccountId> {
[InDexAdminAccount::get()].to_vec()
}
}

impl pallet_index::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type CommitteeOrigin = EnsureRootOrHalfCouncil;
type CommitteeOrigin = EnsureSignedBy<InDexAdminMembers, AccountId>;
type AssetTransactor = (CurrencyTransactor, FungiblesTransactor);
type AssetsRegistry = AssetsRegistry;
}
Expand Down

0 comments on commit 7ab0950

Please sign in to comment.