Migrate pallet-balances to pallet attribute macro (#7936)

* Initial migration of balances pallet

* Fix some errors

* Remove unused imports

* Formatting and removing some todos

* Delete Subtrait

* Add genesis builder impls for tests

* Fix GenesisConfig impl

* Make set_balance visible to tests, rename RawEvent to Event

* Fix tests with Event rename etc.

* More test RawEvent renames

* Even more RawEvent renames

* Rename module to pallet in comments

* Add PalletInfo impl to avid storage collision, fixes tests

* Apply review suggestion: remove trailing a

Co-authored-by: David <dvdplm@gmail.com>

* BalancesEvent alias

* Remove BalancesEvent alias

* Review suggestion: remove redundant comment

* Apply review suggestion: make vis super

* Fis doc links

* Add RawEvent alias

* Add missing Instance parameter to deprecated RawEvent alias

* Fix RawEvent deprecation warnings

Co-authored-by: David <dvdplm@gmail.com>
This commit is contained in:
Andrew Jones
2021-02-10 12:33:25 +00:00
committed by GitHub
parent fd5fbd6252
commit 8481e9a33a
7 changed files with 373 additions and 329 deletions
@@ -1156,7 +1156,7 @@ mod tests {
assert_eq!(Balances::free_balance(2), 0);
// Transfer Event
assert!(System::events().iter().any(|event| {
event.event == Event::pallet_balances(pallet_balances::RawEvent::Transfer(2, 3, 80))
event.event == Event::pallet_balances(pallet_balances::Event::Transfer(2, 3, 80))
}));
// Killed Event
assert!(System::events().iter().any(|event| {