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

Add multisigs pallet to Moonriver and Moonbeam #2264

Merged
merged 5 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 2 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions runtime/moonbeam/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ pallet-balances = { workspace = true }
pallet-collective = { workspace = true }
pallet-democracy = { workspace = true }
pallet-identity = { workspace = true }
pallet-multisig = { workspace = true }
pallet-preimage = { workspace = true }
pallet-proxy = { workspace = true }
pallet-root-testing = { workspace = true }
Expand Down Expand Up @@ -216,6 +217,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/moonbeam/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,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.
Agusrodri marked this conversation as resolved.
Show resolved Hide resolved
pub const DepositBase: Balance = currency::deposit(1, 76);
// Additional storage item size of 32 bytes.
pub const DepositFactor: Balance = currency::deposit(0, 32);
pub const MaxSignatories: u32 = 100;
Agusrodri marked this conversation as resolved.
Show resolved Hide resolved
}

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 @@ -1348,6 +1366,7 @@ construct_runtime! {
Identity: pallet_identity::{Pallet, Call, Storage, Event<T>} = 33,
Migrations: pallet_migrations::{Pallet, Call, Storage, Config, Event<T>} = 34,
ProxyGenesisCompanion: pallet_proxy_genesis_companion::{Pallet, Config<T>} = 35,
Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>} = 36,

// Has been permanently removed for safety reasons.
// Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>} = 40,
Expand Down
2 changes: 2 additions & 0 deletions runtime/moonriver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,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 @@ -226,6 +227,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/moonriver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,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, 32);
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 @@ -1271,6 +1289,7 @@ construct_runtime! {
Identity: pallet_identity::{Pallet, Call, Storage, Event<T>} = 33,
Migrations: pallet_migrations::{Pallet, Call, Storage, Config, Event<T>} = 34,
ProxyGenesisCompanion: pallet_proxy_genesis_companion::{Pallet, Config<T>} = 35,
Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>} = 36,

// Sudo was previously index 40

Expand Down