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

Commit

Permalink
A Social Account Recovery Pallet (#4531)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
shawntabrizi authored Jan 13, 2020
1 parent 6688c3b commit 3ed7c8b
Show file tree
Hide file tree
Showing 6 changed files with 1,240 additions and 0 deletions.
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.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ members = [
"frame/nicks",
"frame/offences",
"frame/randomness-collective-flip",
"frame/recovery",
"frame/scored-pool",
"frame/session",
"frame/society",
Expand Down
31 changes: 31 additions & 0 deletions frame/recovery/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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",
]
Loading

0 comments on commit 3ed7c8b

Please sign in to comment.