Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change inDEX pallet admin to a multisig account (#298) #309

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading