Refactor the balances module (#4649)

* Initially scoping out of the problem

* Remove need for exiry in balance locks.

* Remove expiry from locks.

* Remove supefluous balance test

* Amalgamate pieces of balance module

* Split out vesting

* Fix tests

* Fixes for vesting.

* Docs.

* Weight docs.

* Refactor things in terms of set_balances.

* Switch out ED to be free + reserved.

* Remove on_free_balance_zero and some docs.

* Build fixes

* Update frame/vesting/src/lib.rs

Co-Authored-By: Xiliang Chen <xlchen1291@gmail.com>

* Update frame/vesting/src/lib.rs

Co-Authored-By: Xiliang Chen <xlchen1291@gmail.com>

* Migration

* Remove superfluous code.

* Test fixes

* Fix some tests

* Fix repatriate reserve

* Fixes

* Add test for migration

* Final cleanups

* Fix

* Indentation.

* Undo unneeded referencing

* Bump runtime version

* Fixes

Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
This commit is contained in:
Gavin Wood
2020-02-01 13:20:16 +00:00
committed by GitHub
parent b6e8fba179
commit d52d8692f9
46 changed files with 1748 additions and 1171 deletions
+20
View File
@@ -3683,6 +3683,7 @@ version = "2.0.0"
dependencies = [
"frame-support 2.0.0",
"frame-system 2.0.0",
"hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"pallet-balances 2.0.0",
"parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3690,6 +3691,7 @@ dependencies = [
"sp-io 2.0.0",
"sp-runtime 2.0.0",
"sp-std 2.0.0",
"sp-storage 2.0.0",
]
[[package]]
@@ -4125,6 +4127,24 @@ dependencies = [
"sp-std 2.0.0",
]
[[package]]
name = "pallet-vesting"
version = "2.0.0"
dependencies = [
"enumflags2 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"frame-support 2.0.0",
"frame-system 2.0.0",
"hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"pallet-balances 2.0.0",
"parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
"sp-core 2.0.0",
"sp-io 2.0.0",
"sp-runtime 2.0.0",
"sp-std 2.0.0",
"sp-storage 2.0.0",
]
[[package]]
name = "parity-bytes"
version = "0.1.1"