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

Commit

Permalink
Migrate pallet-balances to pallet attribute macro (#7936)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
ascjones and dvdplm authored Feb 10, 2021
1 parent 90bb153 commit 22441aa
Show file tree
Hide file tree
Showing 7 changed files with 373 additions and 329 deletions.
8 changes: 4 additions & 4 deletions bin/node/executor/tests/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

use codec::{Encode, Decode, Joiner};
use frame_support::{
StorageValue, StorageMap,
StorageMap,
traits::Currency,
weights::{GetDispatchInfo, DispatchInfo, DispatchClass},
};
Expand Down Expand Up @@ -336,7 +336,7 @@ fn full_native_block_import_works() {
},
EventRecord {
phase: Phase::ApplyExtrinsic(1),
event: Event::pallet_balances(pallet_balances::RawEvent::Transfer(
event: Event::pallet_balances(pallet_balances::Event::Transfer(
alice().into(),
bob().into(),
69 * DOLLARS,
Expand Down Expand Up @@ -389,7 +389,7 @@ fn full_native_block_import_works() {
EventRecord {
phase: Phase::ApplyExtrinsic(1),
event: Event::pallet_balances(
pallet_balances::RawEvent::Transfer(
pallet_balances::Event::Transfer(
bob().into(),
alice().into(),
5 * DOLLARS,
Expand All @@ -412,7 +412,7 @@ fn full_native_block_import_works() {
EventRecord {
phase: Phase::ApplyExtrinsic(2),
event: Event::pallet_balances(
pallet_balances::RawEvent::Transfer(
pallet_balances::Event::Transfer(
alice().into(),
bob().into(),
15 * DOLLARS,
Expand Down
1 change: 0 additions & 1 deletion bin/node/executor/tests/fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

use codec::{Encode, Joiner};
use frame_support::{
StorageValue,
traits::Currency,
weights::{GetDispatchInfo, constants::ExtrinsicBaseWeight, IdentityFee, WeightToFeePolynomial},
};
Expand Down
Loading

0 comments on commit 22441aa

Please sign in to comment.