Skip to content

Commit

Permalink
feat: pallet multisig (#69)
Browse files Browse the repository at this point in the history
* feat: pallet-multisig

* feat: update pallet index
  • Loading branch information
al3mart authored Apr 10, 2024
1 parent 5708c0d commit 150172a
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 0 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.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ pallet-assets = { version = "30.0.0", default-features = false }
pallet-balances = { version = "29.0.0", default-features = false }
pallet-contracts = { version = "28.0.0", default-features = false }
pallet-message-queue = { version = "32.0.0", default-features = false }
pallet-multisig = { version = "29.0.0", default-features = false }
pallet-nft-fractionalization = { version = "11.0.0", default-features = false }
pallet-nfts = { version = "23.0.0", default-features = false }
pallet-nfts-runtime-api = { version = "15.0.0", default-features = false }
Expand Down
4 changes: 4 additions & 0 deletions runtime/devnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pallet-assets.workspace = true
pallet-balances.workspace = true
pallet-contracts.workspace = true
pallet-message-queue.workspace = true
pallet-multisig.workspace = true
pallet-nft-fractionalization.workspace = true
pallet-nfts.workspace = true
pallet-nfts-runtime-api.workspace = true
Expand Down Expand Up @@ -116,6 +117,7 @@ std = [
"pallet-collator-selection/std",
"pallet-contracts/std",
"pallet-message-queue/std",
"pallet-multisig/std",
"pallet-nft-fractionalization/std",
"pallet-nfts/std",
"pallet-nfts-runtime-api/std",
Expand Down Expand Up @@ -166,6 +168,7 @@ runtime-benchmarks = [
"pallet-collator-selection/runtime-benchmarks",
"pallet-contracts/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-nft-fractionalization/runtime-benchmarks",
"pallet-nfts/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
Expand Down Expand Up @@ -197,6 +200,7 @@ try-runtime = [
"pallet-collator-selection/try-runtime",
"pallet-contracts/try-runtime",
"pallet-message-queue/try-runtime",
"pallet-multisig/try-runtime",
"pallet-nft-fractionalization/try-runtime",
"pallet-nfts/try-runtime",
"pallet-scheduler/try-runtime",
Expand Down
21 changes: 21 additions & 0 deletions runtime/devnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,24 @@ impl pallet_preimage::Config for 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);
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>;
}

// Create the runtime by composing the FRAME pallets that were previously configured.
construct_runtime!(
pub enum Runtime {
Expand Down Expand Up @@ -597,6 +615,9 @@ construct_runtime!(
// Contracts
Contracts: pallet_contracts = 40,

// Multisig
Multisig: pallet_multisig = 42,

// Assets
Nfts: pallet_nfts = 50,
NftFractionalization: pallet_nft_fractionalization = 51,
Expand Down
4 changes: 4 additions & 0 deletions runtime/testnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pallet-assets.workspace = true
pallet-balances.workspace = true
pallet-contracts.workspace = true
pallet-message-queue.workspace = true
pallet-multisig.workspace = true
pallet-nft-fractionalization.workspace = true
pallet-nfts.workspace = true
pallet-nfts-runtime-api.workspace = true
Expand Down Expand Up @@ -116,6 +117,7 @@ std = [
"pallet-collator-selection/std",
"pallet-contracts/std",
"pallet-message-queue/std",
"pallet-multisig/std",
"pallet-nft-fractionalization/std",
"pallet-nfts/std",
"pallet-nfts-runtime-api/std",
Expand Down Expand Up @@ -166,6 +168,7 @@ runtime-benchmarks = [
"pallet-collator-selection/runtime-benchmarks",
"pallet-contracts/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-nft-fractionalization/runtime-benchmarks",
"pallet-nfts/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
Expand Down Expand Up @@ -197,6 +200,7 @@ try-runtime = [
"pallet-collator-selection/try-runtime",
"pallet-contracts/try-runtime",
"pallet-message-queue/try-runtime",
"pallet-multisig/try-runtime",
"pallet-nft-fractionalization/try-runtime",
"pallet-nfts/try-runtime",
"pallet-scheduler/try-runtime",
Expand Down
21 changes: 21 additions & 0 deletions runtime/testnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,24 @@ impl pallet_preimage::Config for 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);
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>;
}

// Create the runtime by composing the FRAME pallets that were previously configured.
construct_runtime!(
pub enum Runtime {
Expand Down Expand Up @@ -597,6 +615,9 @@ construct_runtime!(
// Contracts
Contracts: pallet_contracts = 40,

// Multisig
Multisig: pallet_multisig = 42,

// Assets
Nfts: pallet_nfts = 50,
NftFractionalization: pallet_nft_fractionalization = 51,
Expand Down

0 comments on commit 150172a

Please sign in to comment.