diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index cbf8d03..08ce9b3 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -36,7 +36,8 @@ frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-f pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.18" } pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.18" } pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.18" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.18" } +pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.18" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.18" } pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.18" } pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.18" } pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.18" } @@ -101,6 +102,7 @@ std = [ "pallet-authorship/std", "pallet-balances/std", "pallet-collator-selection/std", + "pallet-multisig/std", "pallet-scheduler/std", "pallet-session/std", "pallet-sudo/std", diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 00f9687..7a6d44b 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -200,6 +200,10 @@ pub const OTP: Balance = 1_000_000_000_000; pub const MILLIOTP: Balance = 1_000_000_000; pub const MICROOTP: Balance = 1_000_000; +pub const fn deposit(items: u32, bytes: u32) -> Balance { + items as Balance * 15 * OTP + (bytes as Balance) * 6 * OTP +} + /// The existential deposit. Set to 1/10 of the Connected Relay Chain. pub const EXISTENTIAL_DEPOSIT: Balance = OTP; @@ -476,6 +480,24 @@ impl pallet_sudo::Config for Runtime { type Call = Call; } +parameter_types! { + // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. + pub const DepositBase: Balance = deposit(1, 88); + // Additional storage item size of 32 bytes. + pub const DepositFactor: Balance = deposit(0, 32); + pub const MaxSignatories: u16 = 100; +} + +impl pallet_multisig::Config for Runtime { + type Event = Event; + type Call = Call; + type Currency = Balances; + type DepositBase = DepositBase; + type DepositFactor = DepositFactor; + type MaxSignatories = MaxSignatories; + type WeightInfo = pallet_multisig::weights::SubstrateWeight; +} + /// Configure the pallet template in pallets/template. impl pallet_template::Config for Runtime { type Event = Event; @@ -495,6 +517,7 @@ construct_runtime!( } = 1, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, + Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 4, // Monetary stuff. Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10,