Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 3ed7c8b

Browse files
authored
A Social Account Recovery Pallet (#4531)
* Initial sketch of social recovery pallet * Fix compilation issues * Use a single total delay, rename stuff * Check possible overflow * Copyright bump * Add mock for tests * Add basic end to end test * Add `create_recovery` tests * Add malicious recovery lifecycle test * Make clear we check for sorted and unique friends * Work on some tests, clean up imports * Change `if let Some(_)` to `ok_or()` * More tests * Finish tests, except issue with `on_free_balance_zero` * Fix `on_free_balance_zero` * Pallet docs * Add function/weight docs * Fix merge master * OnReapAccount for System too * Update weight docs * Allow passthrough to support fee-less extrinsics
1 parent 6688c3b commit 3ed7c8b

File tree

6 files changed

+1240
-0
lines changed

6 files changed

+1240
-0
lines changed

Cargo.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ members = [
7878
"frame/nicks",
7979
"frame/offences",
8080
"frame/randomness-collective-flip",
81+
"frame/recovery",
8182
"frame/scored-pool",
8283
"frame/session",
8384
"frame/society",

frame/recovery/Cargo.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[package]
2+
name = "pallet-recovery"
3+
version = "2.0.0"
4+
authors = ["Parity Technologies <[email protected]>"]
5+
edition = "2018"
6+
7+
[dependencies]
8+
serde = { version = "1.0.101", optional = true }
9+
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
10+
enumflags2 = { version = "0.6.2" }
11+
sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" }
12+
sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" }
13+
sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" }
14+
frame-support = { version = "2.0.0", default-features = false, path = "../support" }
15+
frame-system = { version = "2.0.0", default-features = false, path = "../system" }
16+
17+
[dev-dependencies]
18+
sp-core = { version = "2.0.0", path = "../../primitives/core" }
19+
pallet-balances = { version = "2.0.0", path = "../balances" }
20+
21+
[features]
22+
default = ["std"]
23+
std = [
24+
"serde",
25+
"codec/std",
26+
"sp-std/std",
27+
"sp-io/std",
28+
"sp-runtime/std",
29+
"frame-support/std",
30+
"frame-system/std",
31+
]

0 commit comments

Comments
 (0)