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
+5 -5
View File
@@ -168,9 +168,9 @@ fn emit_events_with_no_existential_deposit_suicide_with_dust() {
assert_eq!(
events(),
[
Event::frame_system(frame_system::Event::NewAccount(1)),
Event::pallet_balances(RawEvent::Endowed(1, 100)),
Event::pallet_balances(RawEvent::BalanceSet(1, 100, 0)),
Event::frame_system(system::Event::NewAccount(1)),
Event::pallet_balances(crate::Event::Endowed(1, 100)),
Event::pallet_balances(crate::Event::BalanceSet(1, 100, 0)),
]
);
@@ -184,8 +184,8 @@ fn emit_events_with_no_existential_deposit_suicide_with_dust() {
assert_eq!(
events(),
[
Event::pallet_balances(RawEvent::DustLost(1, 1)),
Event::frame_system(frame_system::Event::KilledAccount(1))
Event::pallet_balances(crate::Event::DustLost(1, 1)),
Event::frame_system(system::Event::KilledAccount(1))
]
);
});