Skip to content

Commit

Permalink
change Balances to PalletBalances for clarity. (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
shawntabrizi authored Nov 4, 2024
1 parent e25b53b commit bad4860
Show file tree
Hide file tree
Showing 54 changed files with 240 additions and 240 deletions.
8 changes: 4 additions & 4 deletions steps/1/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const BOB: u64 = 2;

// Our blockchain tests only need 3 Pallets:
// 1. System: Which is included with every FRAME runtime.
// 2. Balances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 2. PalletBalances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 3. PalletKitties: The pallet you are building in this tutorial!
construct_runtime! {
pub struct TestRuntime {
System: frame_system,
Balances: pallet_balances,
PalletBalances: pallet_balances,
PalletKitties: pallet_kitties,
}
}
Expand Down Expand Up @@ -91,7 +91,7 @@ fn system_and_balances_work() {
// We often need to set `System` to block 1 so that we can see events.
System::set_block_number(1);
// We often need to add some balance to a user to test features which needs tokens.
assert_ok!(Balances::mint_into(&ALICE, 100));
assert_ok!(Balances::mint_into(&BOB, 100));
assert_ok!(PalletBalances::mint_into(&ALICE, 100));
assert_ok!(PalletBalances::mint_into(&BOB, 100));
});
}
8 changes: 4 additions & 4 deletions steps/10/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const BOB: u64 = 2;

// Our blockchain tests only need 3 Pallets:
// 1. System: Which is included with every FRAME runtime.
// 2. Balances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 2. PalletBalances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 3. PalletKitties: The pallet you are building in this tutorial!
construct_runtime! {
pub struct TestRuntime {
System: frame_system,
Balances: pallet_balances,
PalletBalances: pallet_balances,
PalletKitties: pallet_kitties,
}
}
Expand Down Expand Up @@ -91,8 +91,8 @@ fn system_and_balances_work() {
// We often need to set `System` to block 1 so that we can see events.
System::set_block_number(1);
// We often need to add some balance to a user to test features which needs tokens.
assert_ok!(Balances::mint_into(&ALICE, 100));
assert_ok!(Balances::mint_into(&BOB, 100));
assert_ok!(PalletBalances::mint_into(&ALICE, 100));
assert_ok!(PalletBalances::mint_into(&BOB, 100));
});
}

Expand Down
8 changes: 4 additions & 4 deletions steps/11/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const BOB: u64 = 2;

// Our blockchain tests only need 3 Pallets:
// 1. System: Which is included with every FRAME runtime.
// 2. Balances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 2. PalletBalances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 3. PalletKitties: The pallet you are building in this tutorial!
construct_runtime! {
pub struct TestRuntime {
System: frame_system,
Balances: pallet_balances,
PalletBalances: pallet_balances,
PalletKitties: pallet_kitties,
}
}
Expand Down Expand Up @@ -91,8 +91,8 @@ fn system_and_balances_work() {
// We often need to set `System` to block 1 so that we can see events.
System::set_block_number(1);
// We often need to add some balance to a user to test features which needs tokens.
assert_ok!(Balances::mint_into(&ALICE, 100));
assert_ok!(Balances::mint_into(&BOB, 100));
assert_ok!(PalletBalances::mint_into(&ALICE, 100));
assert_ok!(PalletBalances::mint_into(&BOB, 100));
});
}

Expand Down
8 changes: 4 additions & 4 deletions steps/12/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const BOB: u64 = 2;

// Our blockchain tests only need 3 Pallets:
// 1. System: Which is included with every FRAME runtime.
// 2. Balances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 2. PalletBalances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 3. PalletKitties: The pallet you are building in this tutorial!
construct_runtime! {
pub struct TestRuntime {
System: frame_system,
Balances: pallet_balances,
PalletBalances: pallet_balances,
PalletKitties: pallet_kitties,
}
}
Expand Down Expand Up @@ -91,8 +91,8 @@ fn system_and_balances_work() {
// We often need to set `System` to block 1 so that we can see events.
System::set_block_number(1);
// We often need to add some balance to a user to test features which needs tokens.
assert_ok!(Balances::mint_into(&ALICE, 100));
assert_ok!(Balances::mint_into(&BOB, 100));
assert_ok!(PalletBalances::mint_into(&ALICE, 100));
assert_ok!(PalletBalances::mint_into(&BOB, 100));
});
}

Expand Down
8 changes: 4 additions & 4 deletions steps/13/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const BOB: u64 = 2;

// Our blockchain tests only need 3 Pallets:
// 1. System: Which is included with every FRAME runtime.
// 2. Balances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 2. PalletBalances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 3. PalletKitties: The pallet you are building in this tutorial!
construct_runtime! {
pub struct TestRuntime {
System: frame_system,
Balances: pallet_balances,
PalletBalances: pallet_balances,
PalletKitties: pallet_kitties,
}
}
Expand Down Expand Up @@ -91,8 +91,8 @@ fn system_and_balances_work() {
// We often need to set `System` to block 1 so that we can see events.
System::set_block_number(1);
// We often need to add some balance to a user to test features which needs tokens.
assert_ok!(Balances::mint_into(&ALICE, 100));
assert_ok!(Balances::mint_into(&BOB, 100));
assert_ok!(PalletBalances::mint_into(&ALICE, 100));
assert_ok!(PalletBalances::mint_into(&BOB, 100));
});
}

Expand Down
8 changes: 4 additions & 4 deletions steps/14/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const BOB: u64 = 2;

// Our blockchain tests only need 3 Pallets:
// 1. System: Which is included with every FRAME runtime.
// 2. Balances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 2. PalletBalances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 3. PalletKitties: The pallet you are building in this tutorial!
construct_runtime! {
pub struct TestRuntime {
System: frame_system,
Balances: pallet_balances,
PalletBalances: pallet_balances,
PalletKitties: pallet_kitties,
}
}
Expand Down Expand Up @@ -91,8 +91,8 @@ fn system_and_balances_work() {
// We often need to set `System` to block 1 so that we can see events.
System::set_block_number(1);
// We often need to add some balance to a user to test features which needs tokens.
assert_ok!(Balances::mint_into(&ALICE, 100));
assert_ok!(Balances::mint_into(&BOB, 100));
assert_ok!(PalletBalances::mint_into(&ALICE, 100));
assert_ok!(PalletBalances::mint_into(&BOB, 100));
});
}

Expand Down
8 changes: 4 additions & 4 deletions steps/15/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const BOB: u64 = 2;

// Our blockchain tests only need 3 Pallets:
// 1. System: Which is included with every FRAME runtime.
// 2. Balances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 2. PalletBalances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 3. PalletKitties: The pallet you are building in this tutorial!
construct_runtime! {
pub struct TestRuntime {
System: frame_system,
Balances: pallet_balances,
PalletBalances: pallet_balances,
PalletKitties: pallet_kitties,
}
}
Expand Down Expand Up @@ -91,8 +91,8 @@ fn system_and_balances_work() {
// We often need to set `System` to block 1 so that we can see events.
System::set_block_number(1);
// We often need to add some balance to a user to test features which needs tokens.
assert_ok!(Balances::mint_into(&ALICE, 100));
assert_ok!(Balances::mint_into(&BOB, 100));
assert_ok!(PalletBalances::mint_into(&ALICE, 100));
assert_ok!(PalletBalances::mint_into(&BOB, 100));
});
}

Expand Down
8 changes: 4 additions & 4 deletions steps/16/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const BOB: u64 = 2;

// Our blockchain tests only need 3 Pallets:
// 1. System: Which is included with every FRAME runtime.
// 2. Balances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 2. PalletBalances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 3. PalletKitties: The pallet you are building in this tutorial!
construct_runtime! {
pub struct TestRuntime {
System: frame_system,
Balances: pallet_balances,
PalletBalances: pallet_balances,
PalletKitties: pallet_kitties,
}
}
Expand Down Expand Up @@ -91,8 +91,8 @@ fn system_and_balances_work() {
// We often need to set `System` to block 1 so that we can see events.
System::set_block_number(1);
// We often need to add some balance to a user to test features which needs tokens.
assert_ok!(Balances::mint_into(&ALICE, 100));
assert_ok!(Balances::mint_into(&BOB, 100));
assert_ok!(PalletBalances::mint_into(&ALICE, 100));
assert_ok!(PalletBalances::mint_into(&BOB, 100));
});
}

Expand Down
8 changes: 4 additions & 4 deletions steps/17/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const BOB: u64 = 2;

// Our blockchain tests only need 3 Pallets:
// 1. System: Which is included with every FRAME runtime.
// 2. Balances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 2. PalletBalances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 3. PalletKitties: The pallet you are building in this tutorial!
construct_runtime! {
pub struct TestRuntime {
System: frame_system,
Balances: pallet_balances,
PalletBalances: pallet_balances,
PalletKitties: pallet_kitties,
}
}
Expand Down Expand Up @@ -91,8 +91,8 @@ fn system_and_balances_work() {
// We often need to set `System` to block 1 so that we can see events.
System::set_block_number(1);
// We often need to add some balance to a user to test features which needs tokens.
assert_ok!(Balances::mint_into(&ALICE, 100));
assert_ok!(Balances::mint_into(&BOB, 100));
assert_ok!(PalletBalances::mint_into(&ALICE, 100));
assert_ok!(PalletBalances::mint_into(&BOB, 100));
});
}

Expand Down
8 changes: 4 additions & 4 deletions steps/18/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const BOB: u64 = 2;

// Our blockchain tests only need 3 Pallets:
// 1. System: Which is included with every FRAME runtime.
// 2. Balances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 2. PalletBalances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 3. PalletKitties: The pallet you are building in this tutorial!
construct_runtime! {
pub struct TestRuntime {
System: frame_system,
Balances: pallet_balances,
PalletBalances: pallet_balances,
PalletKitties: pallet_kitties,
}
}
Expand Down Expand Up @@ -91,8 +91,8 @@ fn system_and_balances_work() {
// We often need to set `System` to block 1 so that we can see events.
System::set_block_number(1);
// We often need to add some balance to a user to test features which needs tokens.
assert_ok!(Balances::mint_into(&ALICE, 100));
assert_ok!(Balances::mint_into(&BOB, 100));
assert_ok!(PalletBalances::mint_into(&ALICE, 100));
assert_ok!(PalletBalances::mint_into(&BOB, 100));
});
}

Expand Down
8 changes: 4 additions & 4 deletions steps/19/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const BOB: u64 = 2;

// Our blockchain tests only need 3 Pallets:
// 1. System: Which is included with every FRAME runtime.
// 2. Balances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 2. PalletBalances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 3. PalletKitties: The pallet you are building in this tutorial!
construct_runtime! {
pub struct TestRuntime {
System: frame_system,
Balances: pallet_balances,
PalletBalances: pallet_balances,
PalletKitties: pallet_kitties,
}
}
Expand Down Expand Up @@ -91,8 +91,8 @@ fn system_and_balances_work() {
// We often need to set `System` to block 1 so that we can see events.
System::set_block_number(1);
// We often need to add some balance to a user to test features which needs tokens.
assert_ok!(Balances::mint_into(&ALICE, 100));
assert_ok!(Balances::mint_into(&BOB, 100));
assert_ok!(PalletBalances::mint_into(&ALICE, 100));
assert_ok!(PalletBalances::mint_into(&BOB, 100));
});
}

Expand Down
8 changes: 4 additions & 4 deletions steps/2/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const BOB: u64 = 2;

// Our blockchain tests only need 3 Pallets:
// 1. System: Which is included with every FRAME runtime.
// 2. Balances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 2. PalletBalances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 3. PalletKitties: The pallet you are building in this tutorial!
construct_runtime! {
pub struct TestRuntime {
System: frame_system,
Balances: pallet_balances,
PalletBalances: pallet_balances,
PalletKitties: pallet_kitties,
}
}
Expand Down Expand Up @@ -91,7 +91,7 @@ fn system_and_balances_work() {
// We often need to set `System` to block 1 so that we can see events.
System::set_block_number(1);
// We often need to add some balance to a user to test features which needs tokens.
assert_ok!(Balances::mint_into(&ALICE, 100));
assert_ok!(Balances::mint_into(&BOB, 100));
assert_ok!(PalletBalances::mint_into(&ALICE, 100));
assert_ok!(PalletBalances::mint_into(&BOB, 100));
});
}
8 changes: 4 additions & 4 deletions steps/20/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const BOB: u64 = 2;

// Our blockchain tests only need 3 Pallets:
// 1. System: Which is included with every FRAME runtime.
// 2. Balances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 2. PalletBalances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 3. PalletKitties: The pallet you are building in this tutorial!
construct_runtime! {
pub struct TestRuntime {
System: frame_system,
Balances: pallet_balances,
PalletBalances: pallet_balances,
PalletKitties: pallet_kitties,
}
}
Expand Down Expand Up @@ -91,8 +91,8 @@ fn system_and_balances_work() {
// We often need to set `System` to block 1 so that we can see events.
System::set_block_number(1);
// We often need to add some balance to a user to test features which needs tokens.
assert_ok!(Balances::mint_into(&ALICE, 100));
assert_ok!(Balances::mint_into(&BOB, 100));
assert_ok!(PalletBalances::mint_into(&ALICE, 100));
assert_ok!(PalletBalances::mint_into(&BOB, 100));
});
}

Expand Down
8 changes: 4 additions & 4 deletions steps/21/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const BOB: u64 = 2;

// Our blockchain tests only need 3 Pallets:
// 1. System: Which is included with every FRAME runtime.
// 2. Balances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 2. PalletBalances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 3. PalletKitties: The pallet you are building in this tutorial!
construct_runtime! {
pub struct TestRuntime {
System: frame_system,
Balances: pallet_balances,
PalletBalances: pallet_balances,
PalletKitties: pallet_kitties,
}
}
Expand Down Expand Up @@ -91,8 +91,8 @@ fn system_and_balances_work() {
// We often need to set `System` to block 1 so that we can see events.
System::set_block_number(1);
// We often need to add some balance to a user to test features which needs tokens.
assert_ok!(Balances::mint_into(&ALICE, 100));
assert_ok!(Balances::mint_into(&BOB, 100));
assert_ok!(PalletBalances::mint_into(&ALICE, 100));
assert_ok!(PalletBalances::mint_into(&BOB, 100));
});
}

Expand Down
8 changes: 4 additions & 4 deletions steps/22/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const BOB: u64 = 2;

// Our blockchain tests only need 3 Pallets:
// 1. System: Which is included with every FRAME runtime.
// 2. Balances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 2. PalletBalances: Which is manages your blockchain's native currency. (i.e. DOT on Polkadot)
// 3. PalletKitties: The pallet you are building in this tutorial!
construct_runtime! {
pub struct TestRuntime {
System: frame_system,
Balances: pallet_balances,
PalletBalances: pallet_balances,
PalletKitties: pallet_kitties,
}
}
Expand Down Expand Up @@ -91,8 +91,8 @@ fn system_and_balances_work() {
// We often need to set `System` to block 1 so that we can see events.
System::set_block_number(1);
// We often need to add some balance to a user to test features which needs tokens.
assert_ok!(Balances::mint_into(&ALICE, 100));
assert_ok!(Balances::mint_into(&BOB, 100));
assert_ok!(PalletBalances::mint_into(&ALICE, 100));
assert_ok!(PalletBalances::mint_into(&BOB, 100));
});
}

Expand Down
Loading

0 comments on commit bad4860

Please sign in to comment.