Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
feat: add pallet-multisig (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
José Molina Colmenero authored Sep 5, 2023
1 parent 590ab0c commit b0d60c6
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 2 deletions.
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.

4 changes: 4 additions & 0 deletions runtime/devnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-fe
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" }
pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" }
pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" }
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" }
Expand Down Expand Up @@ -108,6 +109,7 @@ std = [
"pallet-collective/std",
"pallet-collator-selection/std",
"pallet-motion/std",
"pallet-multisig/std",
"pallet-session/std",
"pallet-sudo/std",
"pallet-timestamp/std",
Expand Down Expand Up @@ -147,6 +149,7 @@ runtime-benchmarks = [
"pallet-collator-selection/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-motion/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
Expand All @@ -172,6 +175,7 @@ try-runtime = [
"pallet-collator-selection/try-runtime",
"pallet-collective/try-runtime",
"pallet-motion/try-runtime",
"pallet-multisig/try-runtime",
"pallet-session/try-runtime",
"pallet-sudo/try-runtime",
"pallet-timestamp/try-runtime",
Expand Down
19 changes: 19 additions & 0 deletions runtime/devnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,23 @@ impl pallet_motion::Config for Runtime {
type WeightInfo = pallet_motion::weights::SubstrateWeight<Runtime>;
}

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<Runtime>;
}

impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type MaxAuthorities = ConstU32<100_000>;
Expand Down Expand Up @@ -552,6 +569,7 @@ construct_runtime!(

// Utility
Utility: pallet_utility = 4,
Multisig: pallet_multisig = 5,

// Monetary stuff.
Balances: pallet_balances = 10,
Expand Down Expand Up @@ -587,6 +605,7 @@ mod benches {
[pallet_session, SessionBench::<Runtime>]
[pallet_timestamp, Timestamp]
[pallet_collator_selection, CollatorSelection]
[pallet_multisig, Multisig]
[cumulus_pallet_xcmp_queue, XcmpQueue]
);
}
Expand Down
8 changes: 6 additions & 2 deletions runtime/mainnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-fe
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" }
pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" }
pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" }
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" }
Expand Down Expand Up @@ -88,7 +89,7 @@ std = [
"codec/std",
"log/std",
"scale-info/std",
"assets-common/std",
"assets-common/std",
"cumulus-pallet-aura-ext/std",
"cumulus-pallet-dmp-queue/std",
"cumulus-pallet-parachain-system/std",
Expand All @@ -108,6 +109,7 @@ std = [
"pallet-collective/std",
"pallet-collator-selection/std",
"pallet-motion/std",
"pallet-multisig/std",
"pallet-session/std",
"pallet-sudo/std",
"pallet-timestamp/std",
Expand Down Expand Up @@ -138,7 +140,7 @@ std = [
runtime-benchmarks = [
"hex-literal",
"frame-benchmarking/runtime-benchmarks",
"assets-common/runtime-benchmarks",
"assets-common/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system-benchmarking/runtime-benchmarks",
"frame-system/runtime-benchmarks",
Expand All @@ -147,6 +149,7 @@ runtime-benchmarks = [
"pallet-collator-selection/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-motion/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
Expand All @@ -172,6 +175,7 @@ try-runtime = [
"pallet-collator-selection/try-runtime",
"pallet-collective/try-runtime",
"pallet-motion/try-runtime",
"pallet-multisig/try-runtime",
"pallet-session/try-runtime",
"pallet-sudo/try-runtime",
"pallet-timestamp/try-runtime",
Expand Down
19 changes: 19 additions & 0 deletions runtime/mainnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,23 @@ impl pallet_motion::Config for Runtime {
type WeightInfo = pallet_motion::weights::SubstrateWeight<Runtime>;
}

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<Runtime>;
}

impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type MaxAuthorities = ConstU32<100_000>;
Expand Down Expand Up @@ -551,6 +568,7 @@ construct_runtime!(

// Utility
Utility: pallet_utility = 4,
Multisig: pallet_multisig = 5,

// Monetary stuff.
Balances: pallet_balances = 10,
Expand Down Expand Up @@ -586,6 +604,7 @@ mod benches {
[pallet_session, SessionBench::<Runtime>]
[pallet_timestamp, Timestamp]
[pallet_collator_selection, CollatorSelection]
[pallet_multisig, Multisig]
[cumulus_pallet_xcmp_queue, XcmpQueue]
[pallet_motion, Motion]
);
Expand Down

0 comments on commit b0d60c6

Please sign in to comment.