diff --git a/Cargo.lock b/Cargo.lock index 42b07e51a7..382e62dd36 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4690,6 +4690,7 @@ dependencies = [ "pallet-offences", "pallet-preimage", "pallet-randomness-collective-flip", + "pallet-recovery", "pallet-scheduler", "pallet-session", "pallet-staking", @@ -8338,6 +8339,21 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-recovery" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-scheduler" version = "4.0.0-dev" diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 3a4c79e95a..2ff80d62e3 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -140,6 +140,8 @@ pallet-transaction-payment = { git = "https://github.com/sora-xor/substrate.git" pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/sora-xor/substrate.git", branch = "polkadot-v0.9.38", default-features = false } pallet-utility = { git = "https://github.com/sora-xor/substrate.git", branch = "polkadot-v0.9.38", default-features = false } pallet-bags-list = { git = "https://github.com/sora-xor/substrate.git", branch = "polkadot-v0.9.38", default-features = false } +pallet-recovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", default-features = false } + sp-api = { git = "https://github.com/sora-xor/substrate.git", branch = "polkadot-v0.9.38", default-features = false } sp-block-builder = { git = "https://github.com/sora-xor/substrate.git", branch = "polkadot-v0.9.38", default-features = false } @@ -254,6 +256,7 @@ std = [ "pallet-offences/std", "pallet-preimage/std", "pallet-randomness-collective-flip/std", + "pallet-recovery/std", "pallet-scheduler/std", "pallet-session/std", "pallet-staking/std", diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 8c50b82886..d61b6cdb2c 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -1967,6 +1967,24 @@ impl order_book::Config for Runtime { type WeightInfo = order_book::weights::SubstrateWeight; } +parameter_types! { + pub const ConfigDepositBase: Balance = balance!(5); + pub const FriendDepositFactor: Balance = balance!(3); + pub const MaxFriends: u16 = 10; + pub const RecoveryDeposit: Balance = balance!(5); +} + +impl pallet_recovery::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = pallet_recovery::weights::SubstrateWeight; + type RuntimeCall = RuntimeCall; + type Currency = Balances; + type ConfigDepositBase = ConfigDepositBase; + type FriendDepositFactor = FriendDepositFactor; + type MaxFriends = MaxFriends; + type RecoveryDeposit = RecoveryDeposit; +} + /// Payload data to be signed when making signed transaction from off-chain workers, /// inside `create_transaction` function. pub type SignedPayload = generic::SignedPayload; @@ -2356,6 +2374,8 @@ construct_runtime! { Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 56, OrderBook: order_book::{Pallet, Call, Storage, Event} = 57, + Recovery: pallet_recovery::{Pallet, Call, Storage, Event} = 58, + // Leaf provider should be placed before any pallet which is uses it LeafProvider: leaf_provider::{Pallet, Storage, Event} = 99,