Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recovery pallet added and configured #511

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,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 }
Expand Down Expand Up @@ -249,6 +251,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",
Expand Down
21 changes: 21 additions & 0 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2012,6 +2012,25 @@ impl order_book::Config for Runtime {
type WeightInfo = order_book::weights::SubstrateWeight<Runtime>;
}

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<Runtime>;
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<RuntimeCall, SignedExtra>;
Expand Down Expand Up @@ -2394,6 +2413,8 @@ construct_runtime! {
#[cfg(feature = "wip")] // order-book
OrderBook: order_book::{Pallet, Call, Storage, Event<T>} = 57,

Recovery: pallet_recovery::{Pallet, Call, Storage, Event<T>} = 58,

// Trustless bridges
#[cfg(feature = "wip")] // Bridges
Mmr: pallet_mmr::{Pallet, Storage} = 90,
Expand Down