mirror of
https://github.com/pezkuwichain/pezkuwi-runtime-templates.git
synced 2026-06-12 04:11:02 +00:00
Merge pull request #13 from OpenZeppelin/multisig-pallet-testing
multisig first config
This commit is contained in:
Generated
+1
@@ -7380,6 +7380,7 @@ dependencies = [
|
||||
"pallet-authorship",
|
||||
"pallet-balances",
|
||||
"pallet-collator-selection",
|
||||
"pallet-multisig",
|
||||
"pallet-parachain-template",
|
||||
"pallet-session",
|
||||
"pallet-sudo",
|
||||
|
||||
@@ -39,6 +39,7 @@ frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch
|
||||
pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0", default-features = false }
|
||||
pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0", default-features = false }
|
||||
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0", default-features = false }
|
||||
pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0", default-features = false }
|
||||
pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0", default-features = false }
|
||||
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0", default-features = false }
|
||||
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.3.0", default-features = false }
|
||||
@@ -104,6 +105,7 @@ std = [
|
||||
"pallet-balances/std",
|
||||
"pallet-collator-selection/std",
|
||||
"pallet-parachain-template/std",
|
||||
"pallet-multisig/std",
|
||||
"pallet-session/std",
|
||||
"pallet-sudo/std",
|
||||
"pallet-timestamp/std",
|
||||
@@ -144,6 +146,7 @@ runtime-benchmarks = [
|
||||
"hex-literal",
|
||||
"pallet-balances/runtime-benchmarks",
|
||||
"pallet-collator-selection/runtime-benchmarks",
|
||||
"pallet-multisig/runtime-benchmarks",
|
||||
"pallet-parachain-template/runtime-benchmarks",
|
||||
"pallet-sudo/runtime-benchmarks",
|
||||
"pallet-timestamp/runtime-benchmarks",
|
||||
@@ -169,6 +172,7 @@ try-runtime = [
|
||||
"pallet-authorship/try-runtime",
|
||||
"pallet-balances/try-runtime",
|
||||
"pallet-collator-selection/try-runtime",
|
||||
"pallet-multisig/try-runtime",
|
||||
"pallet-parachain-template/try-runtime",
|
||||
"pallet-session/try-runtime",
|
||||
"pallet-sudo/try-runtime",
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
pub mod currency {
|
||||
use crate::Balance;
|
||||
|
||||
pub const MILLICENTS: Balance = 1_000_000_000;
|
||||
pub const CENTS: Balance = 1_000 * MILLICENTS; // assume this is worth about a cent.
|
||||
pub const DOLLARS: Balance = 100 * CENTS;
|
||||
|
||||
pub const fn deposit(items: u32, bytes: u32) -> Balance {
|
||||
items as Balance * 15 * CENTS + (bytes as Balance) * 6 * CENTS
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,8 @@
|
||||
#[cfg(feature = "std")]
|
||||
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
|
||||
|
||||
pub mod constants;
|
||||
use constants::currency::*;
|
||||
mod weights;
|
||||
pub mod xcm_config;
|
||||
|
||||
@@ -27,6 +29,7 @@ use frame_system::{
|
||||
limits::{BlockLength, BlockWeights},
|
||||
EnsureRoot,
|
||||
};
|
||||
pub use pallet_multisig;
|
||||
/// Import the template pallet.
|
||||
pub use pallet_parachain_template;
|
||||
use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
|
||||
@@ -426,6 +429,24 @@ impl cumulus_pallet_dmp_queue::Config for Runtime {
|
||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||
}
|
||||
|
||||
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 Currency = Balances;
|
||||
type DepositBase = DepositBase;
|
||||
type DepositFactor = DepositFactor;
|
||||
type MaxSignatories = MaxSignatories;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type WeightInfo = pallet_multisig::weights::SubstrateWeight<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const Period: u32 = 6 * HOURS;
|
||||
pub const Offset: u32 = 0;
|
||||
@@ -506,6 +527,7 @@ construct_runtime!(
|
||||
|
||||
// Governance
|
||||
Sudo: pallet_sudo = 15,
|
||||
Multisig: pallet_multisig,
|
||||
|
||||
// Collator support. The order of these 4 are important and shall not change.
|
||||
Authorship: pallet_authorship = 20,
|
||||
|
||||
Reference in New Issue
Block a user