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
This commit is contained in:
Shawn Tabrizi
2020-01-13 17:52:04 +01:00
committed by GitHub
parent 0cd8d2c2cf
commit d16d57884a
6 changed files with 1240 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
[package]
name = "pallet-recovery"
version = "2.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
serde = { version = "1.0.101", optional = true }
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
enumflags2 = { version = "0.6.2" }
sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" }
sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" }
sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" }
frame-support = { version = "2.0.0", default-features = false, path = "../support" }
frame-system = { version = "2.0.0", default-features = false, path = "../system" }
[dev-dependencies]
sp-core = { version = "2.0.0", path = "../../primitives/core" }
pallet-balances = { version = "2.0.0", path = "../balances" }
[features]
default = ["std"]
std = [
"serde",
"codec/std",
"sp-std/std",
"sp-io/std",
"sp-runtime/std",
"frame-support/std",
"frame-system/std",
]