Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Balances to PalletBalances for clarity. #186

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading