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

Commit 22441aa

Browse files
ascjonesdvdplm
andauthored
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 <[email protected]> * 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 <[email protected]>
1 parent 90bb153 commit 22441aa

File tree

7 files changed

+373
-329
lines changed

7 files changed

+373
-329
lines changed

bin/node/executor/tests/basic.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
use codec::{Encode, Decode, Joiner};
1919
use frame_support::{
20-
StorageValue, StorageMap,
20+
StorageMap,
2121
traits::Currency,
2222
weights::{GetDispatchInfo, DispatchInfo, DispatchClass},
2323
};
@@ -336,7 +336,7 @@ fn full_native_block_import_works() {
336336
},
337337
EventRecord {
338338
phase: Phase::ApplyExtrinsic(1),
339-
event: Event::pallet_balances(pallet_balances::RawEvent::Transfer(
339+
event: Event::pallet_balances(pallet_balances::Event::Transfer(
340340
alice().into(),
341341
bob().into(),
342342
69 * DOLLARS,
@@ -389,7 +389,7 @@ fn full_native_block_import_works() {
389389
EventRecord {
390390
phase: Phase::ApplyExtrinsic(1),
391391
event: Event::pallet_balances(
392-
pallet_balances::RawEvent::Transfer(
392+
pallet_balances::Event::Transfer(
393393
bob().into(),
394394
alice().into(),
395395
5 * DOLLARS,
@@ -412,7 +412,7 @@ fn full_native_block_import_works() {
412412
EventRecord {
413413
phase: Phase::ApplyExtrinsic(2),
414414
event: Event::pallet_balances(
415-
pallet_balances::RawEvent::Transfer(
415+
pallet_balances::Event::Transfer(
416416
alice().into(),
417417
bob().into(),
418418
15 * DOLLARS,

bin/node/executor/tests/fees.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
use codec::{Encode, Joiner};
1919
use frame_support::{
20-
StorageValue,
2120
traits::Currency,
2221
weights::{GetDispatchInfo, constants::ExtrinsicBaseWeight, IdentityFee, WeightToFeePolynomial},
2322
};

0 commit comments

Comments
 (0)