Skip to content

Commit

Permalink
Add pallet-multisig to Moonbase runtime (#2187)
Browse files Browse the repository at this point in the history
* added pallet-multisig to moonbase

* added pallet-multisig to Moonbeam and Moonriver

* fixed DepositBase and DepositFactor

* fixed Cargo.toml files

* removed multisigs from Moonbeam and Moonriver
  • Loading branch information
Agusrodri authored Apr 21, 2023
1 parent 302e47c commit e8eef18
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ pallet-collective = { git = "https://github.com/purestake/substrate", branch = "
pallet-conviction-voting = { git = "https://github.com/purestake/substrate", branch = "moonbeam-polkadot-v0.9.38", default-features = false }
pallet-democracy = { git = "https://github.com/purestake/substrate", branch = "moonbeam-polkadot-v0.9.38", default-features = false }
pallet-identity = { git = "https://github.com/purestake/substrate", branch = "moonbeam-polkadot-v0.9.38", default-features = false }
pallet-multisig = { git = "https://github.com/purestake/substrate", branch = "moonbeam-polkadot-v0.9.38", default-features = false }
pallet-preimage = { git = "https://github.com/purestake/substrate", branch = "moonbeam-polkadot-v0.9.38", default-features = false }
pallet-proxy = { git = "https://github.com/purestake/substrate", branch = "moonbeam-polkadot-v0.9.38", default-features = false }
pallet-referenda = { git = "https://github.com/purestake/substrate", branch = "moonbeam-polkadot-v0.9.38", default-features = false }
Expand Down
2 changes: 2 additions & 0 deletions runtime/moonbase/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ pallet-collective = { workspace = true }
pallet-conviction-voting = { workspace = true }
pallet-democracy = { workspace = true }
pallet-identity = { workspace = true }
pallet-multisig = { workspace = true }
pallet-preimage = { workspace = true }
pallet-proxy = { workspace = true }
pallet-referenda = { workspace = true }
Expand Down Expand Up @@ -233,6 +234,7 @@ std = [
"pallet-maintenance-mode/std",
"pallet-migrations/std",
"pallet-moonbeam-orbiters/std",
"pallet-multisig/std",
"pallet-parachain-staking/std",
"pallet-preimage/std",
"pallet-proxy-genesis-companion/std",
Expand Down
19 changes: 19 additions & 0 deletions runtime/moonbase/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,24 @@ impl pallet_randomness::Config for Runtime {

impl pallet_root_testing::Config for Runtime {}

parameter_types! {
// One storage item; key size is 32; value is size 4+4+16+20 bytes = 44 bytes.
pub const DepositBase: Balance = currency::deposit(1, 76);
// Additional storage item size of 32 bytes.
pub const DepositFactor: Balance = currency::deposit(0, 20);
pub const MaxSignatories: u32 = 100;
}

impl pallet_multisig::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
type Currency = Balances;
type DepositBase = DepositBase;
type DepositFactor = DepositFactor;
type MaxSignatories = MaxSignatories;
type WeightInfo = pallet_multisig::weights::SubstrateWeight<Runtime>;
}

construct_runtime! {
pub enum Runtime where
Block = Block,
Expand Down Expand Up @@ -1312,6 +1330,7 @@ construct_runtime! {
pallet_collective::<Instance4>::{Pallet, Call, Storage, Event<T>, Origin<T>, Config<T>} = 46,
RootTesting: pallet_root_testing::{Pallet, Call, Storage} = 47,
Erc20XcmBridge: pallet_erc20_xcm_bridge::{Pallet} = 48,
Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>} = 49,
}
}

Expand Down

0 comments on commit e8eef18

Please sign in to comment.