diff --git a/invarch/Cargo.lock b/invarch/Cargo.lock index d09db71..53bd806 100644 --- a/invarch/Cargo.lock +++ b/invarch/Cargo.lock @@ -3961,12 +3961,14 @@ dependencies = [ "pallet-authorship", "pallet-balances", "pallet-collator-selection", + "pallet-identity", "pallet-session", "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", + "pallet-utility", "pallet-xcm", "parachain-info", "parity-scale-codec", diff --git a/invarch/runtime/Cargo.toml b/invarch/runtime/Cargo.toml index 5ec264f..224852d 100644 --- a/invarch/runtime/Cargo.toml +++ b/invarch/runtime/Cargo.toml @@ -32,12 +32,14 @@ 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.43" } pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } diff --git a/invarch/runtime/src/lib.rs b/invarch/runtime/src/lib.rs index e1e2c93..04ba766 100644 --- a/invarch/runtime/src/lib.rs +++ b/invarch/runtime/src/lib.rs @@ -369,6 +369,37 @@ impl pallet_sudo::Config for Runtime { type WeightInfo = pallet_sudo::weights::SubstrateWeight; } +impl pallet_utility::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type PalletsOrigin = OriginCaller; + type WeightInfo = pallet_utility::weights::SubstrateWeight; +} + +parameter_types! { + pub BasicDeposit: Balance = 5 * UNIT; + pub FieldDeposit: Balance = 2 * UNIT; + pub const MaxAdditionalFields: u32 = 5; + pub const MaxRegistrars: u32 = 10; + pub const MaxSubAccounts: u32 = 10; + pub SubAccountDeposit: Balance = 5 * UNIT; +} + +impl pallet_identity::Config for Runtime { + type BasicDeposit = BasicDeposit; + type Currency = Balances; + type RuntimeEvent = RuntimeEvent; + type FieldDeposit = FieldDeposit; + type ForceOrigin = EnsureRoot; + type MaxAdditionalFields = MaxAdditionalFields; + type MaxRegistrars = MaxRegistrars; + type MaxSubAccounts = MaxSubAccounts; + type RegistrarOrigin = EnsureRoot; + type Slashed = Treasury; + type SubAccountDeposit = SubAccountDeposit; + type WeightInfo = pallet_identity::weights::SubstrateWeight; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime where @@ -384,6 +415,7 @@ construct_runtime!( Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, Sudo: pallet_sudo::{Pallet, Call, Config, Storage, Event} = 4, + Utility: pallet_utility::{Pallet, Call, Event} = 5, // Monetary stuff. Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, @@ -405,6 +437,9 @@ construct_runtime!( DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, OrmlXcm: orml_xcm = 34, + // Extra + Identity: pallet_identity::{Pallet, Call, Storage, Event} = 40, + } );