From 226ca42cf1dd11dc62612737438cb1bc29668f8f Mon Sep 17 00:00:00 2001 From: Drew Stone Date: Tue, 23 Jan 2024 12:04:36 -0700 Subject: [PATCH] Add multisig pallet to both runtimes --- Cargo.lock | 18 ++++++++++++++++++ Cargo.toml | 1 + runtime/mainnet/Cargo.toml | 2 ++ runtime/mainnet/src/lib.rs | 18 ++++++++++++++++++ runtime/testnet/Cargo.toml | 2 ++ runtime/testnet/src/lib.rs | 18 ++++++++++++++++++ 6 files changed, 59 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 7bcf46411..c5a2f77f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7667,6 +7667,22 @@ dependencies = [ "tangle-primitives", ] +[[package]] +name = "pallet-multisig" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec 3.6.9", + "scale-info", + "sp-io 23.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-runtime 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", +] + [[package]] name = "pallet-nomination-pools" version = "1.0.0" @@ -13331,6 +13347,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-insecure-randomness-collective-flip", + "pallet-multisig", "pallet-nomination-pools", "pallet-offences", "pallet-preimage", @@ -13435,6 +13452,7 @@ dependencies = [ "pallet-insecure-randomness-collective-flip", "pallet-jobs", "pallet-jobs-rpc-runtime-api", + "pallet-multisig", "pallet-nomination-pools", "pallet-offences", "pallet-preimage", diff --git a/Cargo.toml b/Cargo.toml index 6ecc3b41f..b40470017 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -213,6 +213,7 @@ pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } pallet-identity = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } pallet-vesting = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } diff --git a/runtime/mainnet/Cargo.toml b/runtime/mainnet/Cargo.toml index 321a1760e..4d8ecfd8f 100644 --- a/runtime/mainnet/Cargo.toml +++ b/runtime/mainnet/Cargo.toml @@ -84,6 +84,7 @@ pallet-transaction-pause = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } pallet-utility = { workspace = true } +pallet-multisig = { workspace = true } pallet-vesting = { workspace = true } # Webb dependencies @@ -189,6 +190,7 @@ std = [ "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-pause/std", "pallet-utility/std", + "pallet-multisig/std", "pallet-collective/std", "pallet-democracy/std", "pallet-election-provider-multi-phase/std", diff --git a/runtime/mainnet/src/lib.rs b/runtime/mainnet/src/lib.rs index 67ce9f01d..3fbbbb633 100644 --- a/runtime/mainnet/src/lib.rs +++ b/runtime/mainnet/src/lib.rs @@ -1014,6 +1014,23 @@ impl pallet_utility::Config for Runtime { type WeightInfo = (); } +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); +} + +impl pallet_multisig::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type Currency = Balances; + type DepositBase = DepositBase; + type DepositFactor = DepositFactor; + type MaxSignatories = ConstU32<100>; + type WeightInfo = pallet_multisig::weights::SubstrateWeight; +} + parameter_types! { pub const StoragePricePerByte: u128 = MILLIUNIT; pub const Eth2ClientPalletId: PalletId = PalletId(*b"py/eth2c"); @@ -1082,6 +1099,7 @@ construct_runtime!( ImOnline: pallet_im_online, Identity: pallet_identity, Utility: pallet_utility, + Multisig: pallet_multisig, Ethereum: pallet_ethereum, EVM: pallet_evm, diff --git a/runtime/testnet/Cargo.toml b/runtime/testnet/Cargo.toml index 88ef5f75f..545d3866a 100644 --- a/runtime/testnet/Cargo.toml +++ b/runtime/testnet/Cargo.toml @@ -81,6 +81,7 @@ pallet-transaction-pause = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } pallet-utility = { workspace = true } +pallet-multisig = { workspace = true } pallet-vesting = { workspace = true } # Webb dependencies @@ -197,6 +198,7 @@ std = [ "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-pause/std", "pallet-utility/std", + "pallet-multisig/std", "pallet-collective/std", "pallet-democracy/std", "pallet-election-provider-multi-phase/std", diff --git a/runtime/testnet/src/lib.rs b/runtime/testnet/src/lib.rs index fe469eb0f..216ed2cf7 100644 --- a/runtime/testnet/src/lib.rs +++ b/runtime/testnet/src/lib.rs @@ -1030,6 +1030,23 @@ impl pallet_utility::Config for Runtime { type WeightInfo = (); } +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); +} + +impl pallet_multisig::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type Currency = Balances; + type DepositBase = DepositBase; + type DepositFactor = DepositFactor; + type MaxSignatories = ConstU32<100>; + type WeightInfo = pallet_multisig::weights::SubstrateWeight; +} + parameter_types! { pub const StoragePricePerByte: u128 = MILLIUNIT; pub const Eth2ClientPalletId: PalletId = PalletId(*b"py/eth2c"); @@ -1200,6 +1217,7 @@ construct_runtime!( ImOnline: pallet_im_online, Identity: pallet_identity, Utility: pallet_utility, + Multisig: pallet_multisig, Ethereum: pallet_ethereum, EVM: pallet_evm,