From bad4860cce11db207b09244af12e5733fcf68e52 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Mon, 4 Nov 2024 10:14:09 +0800 Subject: [PATCH] change `Balances` to `PalletBalances` for clarity. (#186) --- steps/1/src/tests.rs | 8 ++++---- steps/10/src/tests.rs | 8 ++++---- steps/11/src/tests.rs | 8 ++++---- steps/12/src/tests.rs | 8 ++++---- steps/13/src/tests.rs | 8 ++++---- steps/14/src/tests.rs | 8 ++++---- steps/15/src/tests.rs | 8 ++++---- steps/16/src/tests.rs | 8 ++++---- steps/17/src/tests.rs | 8 ++++---- steps/18/src/tests.rs | 8 ++++---- steps/19/src/tests.rs | 8 ++++---- steps/2/src/tests.rs | 8 ++++---- steps/20/src/tests.rs | 8 ++++---- steps/21/src/tests.rs | 8 ++++---- steps/22/src/tests.rs | 8 ++++---- steps/23/src/tests.rs | 8 ++++---- steps/24/src/tests.rs | 8 ++++---- steps/25/src/tests.rs | 8 ++++---- steps/26/src/tests.rs | 8 ++++---- steps/27/src/tests.rs | 8 ++++---- steps/28/src/tests.rs | 8 ++++---- steps/29/src/tests.rs | 8 ++++---- steps/3/src/tests.rs | 8 ++++---- steps/30/src/tests.rs | 8 ++++---- steps/31/src/tests.rs | 8 ++++---- steps/32/src/tests.rs | 8 ++++---- steps/33/src/tests.rs | 8 ++++---- steps/34/src/tests.rs | 8 ++++---- steps/35/src/tests.rs | 8 ++++---- steps/36/src/tests.rs | 8 ++++---- steps/37/src/tests.rs | 8 ++++---- steps/38/src/tests.rs | 8 ++++---- steps/39/src/tests.rs | 8 ++++---- steps/4/src/tests.rs | 8 ++++---- steps/40/src/tests.rs | 8 ++++---- steps/41/src/tests.rs | 8 ++++---- steps/42/src/tests.rs | 8 ++++---- steps/43/src/tests.rs | 10 +++++----- steps/44/src/tests.rs | 10 +++++----- steps/45/src/tests.rs | 10 +++++----- steps/46/src/tests.rs | 10 +++++----- steps/47/src/tests.rs | 10 +++++----- steps/48/src/tests.rs | 10 +++++----- steps/49/src/tests.rs | 10 +++++----- steps/5/src/tests.rs | 8 ++++---- steps/50/src/tests.rs | 10 +++++----- steps/51/src/tests.rs | 12 ++++++------ steps/52/src/tests.rs | 12 ++++++------ steps/53/src/tests.rs | 20 ++++++++++---------- steps/54/src/tests.rs | 20 ++++++++++---------- steps/6/src/tests.rs | 8 ++++---- steps/7/src/tests.rs | 8 ++++---- steps/8/src/tests.rs | 8 ++++---- steps/9/src/tests.rs | 8 ++++---- 54 files changed, 240 insertions(+), 240 deletions(-) diff --git a/steps/1/src/tests.rs b/steps/1/src/tests.rs index 375cd3f4..a7cbf27e 100644 --- a/steps/1/src/tests.rs +++ b/steps/1/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/10/src/tests.rs b/steps/10/src/tests.rs index 8fa3dc60..2755b0ae 100644 --- a/steps/10/src/tests.rs +++ b/steps/10/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/11/src/tests.rs b/steps/11/src/tests.rs index 8fa3dc60..2755b0ae 100644 --- a/steps/11/src/tests.rs +++ b/steps/11/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/12/src/tests.rs b/steps/12/src/tests.rs index 8fa3dc60..2755b0ae 100644 --- a/steps/12/src/tests.rs +++ b/steps/12/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/13/src/tests.rs b/steps/13/src/tests.rs index e271b018..0a74c2cd 100644 --- a/steps/13/src/tests.rs +++ b/steps/13/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/14/src/tests.rs b/steps/14/src/tests.rs index e271b018..0a74c2cd 100644 --- a/steps/14/src/tests.rs +++ b/steps/14/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/15/src/tests.rs b/steps/15/src/tests.rs index 08f81b93..c025cead 100644 --- a/steps/15/src/tests.rs +++ b/steps/15/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/16/src/tests.rs b/steps/16/src/tests.rs index 08f81b93..c025cead 100644 --- a/steps/16/src/tests.rs +++ b/steps/16/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/17/src/tests.rs b/steps/17/src/tests.rs index 089ada9e..e831c7c0 100644 --- a/steps/17/src/tests.rs +++ b/steps/17/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/18/src/tests.rs b/steps/18/src/tests.rs index 089ada9e..e831c7c0 100644 --- a/steps/18/src/tests.rs +++ b/steps/18/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/19/src/tests.rs b/steps/19/src/tests.rs index 43af4064..f4f2c6db 100644 --- a/steps/19/src/tests.rs +++ b/steps/19/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/2/src/tests.rs b/steps/2/src/tests.rs index 375cd3f4..a7cbf27e 100644 --- a/steps/2/src/tests.rs +++ b/steps/2/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/20/src/tests.rs b/steps/20/src/tests.rs index 43af4064..f4f2c6db 100644 --- a/steps/20/src/tests.rs +++ b/steps/20/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/21/src/tests.rs b/steps/21/src/tests.rs index a564bb30..530431b3 100644 --- a/steps/21/src/tests.rs +++ b/steps/21/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/22/src/tests.rs b/steps/22/src/tests.rs index a564bb30..530431b3 100644 --- a/steps/22/src/tests.rs +++ b/steps/22/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/23/src/tests.rs b/steps/23/src/tests.rs index 1da91ca7..483846e8 100644 --- a/steps/23/src/tests.rs +++ b/steps/23/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/24/src/tests.rs b/steps/24/src/tests.rs index 1da91ca7..483846e8 100644 --- a/steps/24/src/tests.rs +++ b/steps/24/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/25/src/tests.rs b/steps/25/src/tests.rs index 5caa1349..64fa2b48 100644 --- a/steps/25/src/tests.rs +++ b/steps/25/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/26/src/tests.rs b/steps/26/src/tests.rs index 5caa1349..64fa2b48 100644 --- a/steps/26/src/tests.rs +++ b/steps/26/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/27/src/tests.rs b/steps/27/src/tests.rs index 38392b03..457fb8e6 100644 --- a/steps/27/src/tests.rs +++ b/steps/27/src/tests.rs @@ -33,12 +33,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, } } @@ -94,8 +94,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)); }); } diff --git a/steps/28/src/tests.rs b/steps/28/src/tests.rs index c8f6ca59..2aba1c95 100644 --- a/steps/28/src/tests.rs +++ b/steps/28/src/tests.rs @@ -32,12 +32,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -93,8 +93,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)); }); } diff --git a/steps/29/src/tests.rs b/steps/29/src/tests.rs index c8f6ca59..2aba1c95 100644 --- a/steps/29/src/tests.rs +++ b/steps/29/src/tests.rs @@ -32,12 +32,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -93,8 +93,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)); }); } diff --git a/steps/3/src/tests.rs b/steps/3/src/tests.rs index 375cd3f4..a7cbf27e 100644 --- a/steps/3/src/tests.rs +++ b/steps/3/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/30/src/tests.rs b/steps/30/src/tests.rs index f60af86b..a02e6887 100644 --- a/steps/30/src/tests.rs +++ b/steps/30/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -92,8 +92,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)); }); } diff --git a/steps/31/src/tests.rs b/steps/31/src/tests.rs index f60af86b..a02e6887 100644 --- a/steps/31/src/tests.rs +++ b/steps/31/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -92,8 +92,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)); }); } diff --git a/steps/32/src/tests.rs b/steps/32/src/tests.rs index a4bb7648..b1275734 100644 --- a/steps/32/src/tests.rs +++ b/steps/32/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -92,8 +92,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)); }); } diff --git a/steps/33/src/tests.rs b/steps/33/src/tests.rs index a4bb7648..b1275734 100644 --- a/steps/33/src/tests.rs +++ b/steps/33/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -92,8 +92,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)); }); } diff --git a/steps/34/src/tests.rs b/steps/34/src/tests.rs index f2fb1d01..5a09446d 100644 --- a/steps/34/src/tests.rs +++ b/steps/34/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -92,8 +92,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)); }); } diff --git a/steps/35/src/tests.rs b/steps/35/src/tests.rs index f2fb1d01..5a09446d 100644 --- a/steps/35/src/tests.rs +++ b/steps/35/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -92,8 +92,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)); }); } diff --git a/steps/36/src/tests.rs b/steps/36/src/tests.rs index 89c0ab15..c1743f29 100644 --- a/steps/36/src/tests.rs +++ b/steps/36/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -92,8 +92,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)); }); } diff --git a/steps/37/src/tests.rs b/steps/37/src/tests.rs index 89c0ab15..c1743f29 100644 --- a/steps/37/src/tests.rs +++ b/steps/37/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -92,8 +92,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)); }); } diff --git a/steps/38/src/tests.rs b/steps/38/src/tests.rs index 89c0ab15..c1743f29 100644 --- a/steps/38/src/tests.rs +++ b/steps/38/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -92,8 +92,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)); }); } diff --git a/steps/39/src/tests.rs b/steps/39/src/tests.rs index 96402459..7016da83 100644 --- a/steps/39/src/tests.rs +++ b/steps/39/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -92,8 +92,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)); }); } diff --git a/steps/4/src/tests.rs b/steps/4/src/tests.rs index 375cd3f4..a7cbf27e 100644 --- a/steps/4/src/tests.rs +++ b/steps/4/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/40/src/tests.rs b/steps/40/src/tests.rs index 96402459..7016da83 100644 --- a/steps/40/src/tests.rs +++ b/steps/40/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -92,8 +92,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)); }); } diff --git a/steps/41/src/tests.rs b/steps/41/src/tests.rs index ffe1390d..e41b8561 100644 --- a/steps/41/src/tests.rs +++ b/steps/41/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -92,8 +92,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)); }); } diff --git a/steps/42/src/tests.rs b/steps/42/src/tests.rs index 20bff4fd..ccaf15ad 100644 --- a/steps/42/src/tests.rs +++ b/steps/42/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -93,8 +93,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)); }); } diff --git a/steps/43/src/tests.rs b/steps/43/src/tests.rs index 37a2ddd4..081b11c9 100644 --- a/steps/43/src/tests.rs +++ b/steps/43/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -61,7 +61,7 @@ impl pallet_balances::Config for TestRuntime { // will also need to update this configuration to represent that. impl pallet_kitties::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; - type NativeBalance = Balances; + type NativeBalance = PalletBalances; } // We need to run most of our tests using this function: `new_test_ext().execute_with(|| { ... });` @@ -93,8 +93,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)); }); } diff --git a/steps/44/src/tests.rs b/steps/44/src/tests.rs index 37a2ddd4..081b11c9 100644 --- a/steps/44/src/tests.rs +++ b/steps/44/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0 }; // 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, } } @@ -61,7 +61,7 @@ impl pallet_balances::Config for TestRuntime { // will also need to update this configuration to represent that. impl pallet_kitties::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; - type NativeBalance = Balances; + type NativeBalance = PalletBalances; } // We need to run most of our tests using this function: `new_test_ext().execute_with(|| { ... });` @@ -93,8 +93,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)); }); } diff --git a/steps/45/src/tests.rs b/steps/45/src/tests.rs index ff914c8e..983c7edd 100644 --- a/steps/45/src/tests.rs +++ b/steps/45/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0, pric // 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, } } @@ -61,7 +61,7 @@ impl pallet_balances::Config for TestRuntime { // will also need to update this configuration to represent that. impl pallet_kitties::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; - type NativeBalance = Balances; + type NativeBalance = PalletBalances; } // We need to run most of our tests using this function: `new_test_ext().execute_with(|| { ... });` @@ -93,8 +93,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)); }); } diff --git a/steps/46/src/tests.rs b/steps/46/src/tests.rs index ff914c8e..983c7edd 100644 --- a/steps/46/src/tests.rs +++ b/steps/46/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0, pric // 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, } } @@ -61,7 +61,7 @@ impl pallet_balances::Config for TestRuntime { // will also need to update this configuration to represent that. impl pallet_kitties::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; - type NativeBalance = Balances; + type NativeBalance = PalletBalances; } // We need to run most of our tests using this function: `new_test_ext().execute_with(|| { ... });` @@ -93,8 +93,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)); }); } diff --git a/steps/47/src/tests.rs b/steps/47/src/tests.rs index 4c486fd5..c9a845a3 100644 --- a/steps/47/src/tests.rs +++ b/steps/47/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0, pric // 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, } } @@ -61,7 +61,7 @@ impl pallet_balances::Config for TestRuntime { // will also need to update this configuration to represent that. impl pallet_kitties::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; - type NativeBalance = Balances; + type NativeBalance = PalletBalances; } // We need to run most of our tests using this function: `new_test_ext().execute_with(|| { ... });` @@ -93,8 +93,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)); }); } diff --git a/steps/48/src/tests.rs b/steps/48/src/tests.rs index 4c486fd5..c9a845a3 100644 --- a/steps/48/src/tests.rs +++ b/steps/48/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0, pric // 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, } } @@ -61,7 +61,7 @@ impl pallet_balances::Config for TestRuntime { // will also need to update this configuration to represent that. impl pallet_kitties::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; - type NativeBalance = Balances; + type NativeBalance = PalletBalances; } // We need to run most of our tests using this function: `new_test_ext().execute_with(|| { ... });` @@ -93,8 +93,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)); }); } diff --git a/steps/49/src/tests.rs b/steps/49/src/tests.rs index 77ffa1bc..66049705 100644 --- a/steps/49/src/tests.rs +++ b/steps/49/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0, pric // 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, } } @@ -61,7 +61,7 @@ impl pallet_balances::Config for TestRuntime { // will also need to update this configuration to represent that. impl pallet_kitties::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; - type NativeBalance = Balances; + type NativeBalance = PalletBalances; } // We need to run most of our tests using this function: `new_test_ext().execute_with(|| { ... });` @@ -93,8 +93,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)); }); } diff --git a/steps/5/src/tests.rs b/steps/5/src/tests.rs index 375cd3f4..a7cbf27e 100644 --- a/steps/5/src/tests.rs +++ b/steps/5/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/50/src/tests.rs b/steps/50/src/tests.rs index 77ffa1bc..66049705 100644 --- a/steps/50/src/tests.rs +++ b/steps/50/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0, pric // 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, } } @@ -61,7 +61,7 @@ impl pallet_balances::Config for TestRuntime { // will also need to update this configuration to represent that. impl pallet_kitties::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; - type NativeBalance = Balances; + type NativeBalance = PalletBalances; } // We need to run most of our tests using this function: `new_test_ext().execute_with(|| { ... });` @@ -93,8 +93,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)); }); } diff --git a/steps/51/src/tests.rs b/steps/51/src/tests.rs index 905bebfe..3e038826 100644 --- a/steps/51/src/tests.rs +++ b/steps/51/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0, pric // 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, } } @@ -61,7 +61,7 @@ impl pallet_balances::Config for TestRuntime { // will also need to update this configuration to represent that. impl pallet_kitties::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; - type NativeBalance = Balances; + type NativeBalance = PalletBalances; } // We need to run most of our tests using this function: `new_test_ext().execute_with(|| { ... });` @@ -93,8 +93,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)); }); } @@ -347,7 +347,7 @@ fn do_buy_kitty_emits_event() { assert_ok!(PalletKitties::create_kitty(RuntimeOrigin::signed(ALICE))); let kitty_id = Kitties::::iter_keys().collect::>()[0]; assert_ok!(PalletKitties::set_price(RuntimeOrigin::signed(ALICE), kitty_id, Some(1337))); - assert_ok!(Balances::mint_into(&BOB, 100_000)); + assert_ok!(PalletBalances::mint_into(&BOB, 100_000)); assert_ok!(PalletKitties::buy_kitty(RuntimeOrigin::signed(BOB), kitty_id, 1337)); // Assert the last event by our blockchain is the `Created` event with the correct owner. System::assert_last_event( diff --git a/steps/52/src/tests.rs b/steps/52/src/tests.rs index 905bebfe..3e038826 100644 --- a/steps/52/src/tests.rs +++ b/steps/52/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0, pric // 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, } } @@ -61,7 +61,7 @@ impl pallet_balances::Config for TestRuntime { // will also need to update this configuration to represent that. impl pallet_kitties::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; - type NativeBalance = Balances; + type NativeBalance = PalletBalances; } // We need to run most of our tests using this function: `new_test_ext().execute_with(|| { ... });` @@ -93,8 +93,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)); }); } @@ -347,7 +347,7 @@ fn do_buy_kitty_emits_event() { assert_ok!(PalletKitties::create_kitty(RuntimeOrigin::signed(ALICE))); let kitty_id = Kitties::::iter_keys().collect::>()[0]; assert_ok!(PalletKitties::set_price(RuntimeOrigin::signed(ALICE), kitty_id, Some(1337))); - assert_ok!(Balances::mint_into(&BOB, 100_000)); + assert_ok!(PalletBalances::mint_into(&BOB, 100_000)); assert_ok!(PalletKitties::buy_kitty(RuntimeOrigin::signed(BOB), kitty_id, 1337)); // Assert the last event by our blockchain is the `Created` event with the correct owner. System::assert_last_event( diff --git a/steps/53/src/tests.rs b/steps/53/src/tests.rs index d3d623db..ee165b02 100644 --- a/steps/53/src/tests.rs +++ b/steps/53/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0, pric // 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, } } @@ -61,7 +61,7 @@ impl pallet_balances::Config for TestRuntime { // will also need to update this configuration to represent that. impl pallet_kitties::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; - type NativeBalance = Balances; + type NativeBalance = PalletBalances; } // We need to run most of our tests using this function: `new_test_ext().execute_with(|| { ... });` @@ -93,8 +93,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)); }); } @@ -347,7 +347,7 @@ fn do_buy_kitty_emits_event() { assert_ok!(PalletKitties::create_kitty(RuntimeOrigin::signed(ALICE))); let kitty_id = Kitties::::iter_keys().collect::>()[0]; assert_ok!(PalletKitties::set_price(RuntimeOrigin::signed(ALICE), kitty_id, Some(1337))); - assert_ok!(Balances::mint_into(&BOB, 100_000)); + assert_ok!(PalletBalances::mint_into(&BOB, 100_000)); assert_ok!(PalletKitties::buy_kitty(RuntimeOrigin::signed(BOB), kitty_id, 1337)); // Assert the last event by our blockchain is the `Created` event with the correct owner. System::assert_last_event( @@ -386,13 +386,13 @@ fn do_buy_kitty_logic_works() { frame::arithmetic::ArithmeticError::Underflow ); // Cannot buy kitty if it would kill your account (i.e. set your balance to 0). - assert_ok!(Balances::mint_into(&BOB, 1337)); + assert_ok!(PalletBalances::mint_into(&BOB, 1337)); assert!( PalletKitties::buy_kitty(RuntimeOrigin::signed(BOB), kitty_id, 1337).is_err(), // TODO: assert_noop on DispatchError::Token(TokenError::NotExpendable) ); // When everything is right, it works. - assert_ok!(Balances::mint_into(&BOB, 100_000)); + assert_ok!(PalletBalances::mint_into(&BOB, 100_000)); assert_ok!(PalletKitties::buy_kitty(RuntimeOrigin::signed(BOB), kitty_id, 1337)); // State is updated correctly. assert_eq!(KittiesOwned::::get(BOB), vec![kitty_id]); @@ -401,7 +401,7 @@ fn do_buy_kitty_logic_works() { // Price is reset to `None`. assert_eq!(kitty.price, None); // BOB transferred funds to ALICE. - assert_eq!(Balances::balance(&ALICE), 1337); - assert_eq!(Balances::balance(&BOB), 100_000); + assert_eq!(PalletBalances::balance(&ALICE), 1337); + assert_eq!(PalletBalances::balance(&BOB), 100_000); }) } diff --git a/steps/54/src/tests.rs b/steps/54/src/tests.rs index d3d623db..ee165b02 100644 --- a/steps/54/src/tests.rs +++ b/steps/54/src/tests.rs @@ -31,12 +31,12 @@ const DEFAULT_KITTY: Kitty = Kitty { dna: [0u8; 32], owner: 0, pric // 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, } } @@ -61,7 +61,7 @@ impl pallet_balances::Config for TestRuntime { // will also need to update this configuration to represent that. impl pallet_kitties::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; - type NativeBalance = Balances; + type NativeBalance = PalletBalances; } // We need to run most of our tests using this function: `new_test_ext().execute_with(|| { ... });` @@ -93,8 +93,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)); }); } @@ -347,7 +347,7 @@ fn do_buy_kitty_emits_event() { assert_ok!(PalletKitties::create_kitty(RuntimeOrigin::signed(ALICE))); let kitty_id = Kitties::::iter_keys().collect::>()[0]; assert_ok!(PalletKitties::set_price(RuntimeOrigin::signed(ALICE), kitty_id, Some(1337))); - assert_ok!(Balances::mint_into(&BOB, 100_000)); + assert_ok!(PalletBalances::mint_into(&BOB, 100_000)); assert_ok!(PalletKitties::buy_kitty(RuntimeOrigin::signed(BOB), kitty_id, 1337)); // Assert the last event by our blockchain is the `Created` event with the correct owner. System::assert_last_event( @@ -386,13 +386,13 @@ fn do_buy_kitty_logic_works() { frame::arithmetic::ArithmeticError::Underflow ); // Cannot buy kitty if it would kill your account (i.e. set your balance to 0). - assert_ok!(Balances::mint_into(&BOB, 1337)); + assert_ok!(PalletBalances::mint_into(&BOB, 1337)); assert!( PalletKitties::buy_kitty(RuntimeOrigin::signed(BOB), kitty_id, 1337).is_err(), // TODO: assert_noop on DispatchError::Token(TokenError::NotExpendable) ); // When everything is right, it works. - assert_ok!(Balances::mint_into(&BOB, 100_000)); + assert_ok!(PalletBalances::mint_into(&BOB, 100_000)); assert_ok!(PalletKitties::buy_kitty(RuntimeOrigin::signed(BOB), kitty_id, 1337)); // State is updated correctly. assert_eq!(KittiesOwned::::get(BOB), vec![kitty_id]); @@ -401,7 +401,7 @@ fn do_buy_kitty_logic_works() { // Price is reset to `None`. assert_eq!(kitty.price, None); // BOB transferred funds to ALICE. - assert_eq!(Balances::balance(&ALICE), 1337); - assert_eq!(Balances::balance(&BOB), 100_000); + assert_eq!(PalletBalances::balance(&ALICE), 1337); + assert_eq!(PalletBalances::balance(&BOB), 100_000); }) } diff --git a/steps/6/src/tests.rs b/steps/6/src/tests.rs index 375cd3f4..a7cbf27e 100644 --- a/steps/6/src/tests.rs +++ b/steps/6/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/7/src/tests.rs b/steps/7/src/tests.rs index c2140eda..6844575c 100644 --- a/steps/7/src/tests.rs +++ b/steps/7/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/8/src/tests.rs b/steps/8/src/tests.rs index c2140eda..6844575c 100644 --- a/steps/8/src/tests.rs +++ b/steps/8/src/tests.rs @@ -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, } } @@ -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)); }); } diff --git a/steps/9/src/tests.rs b/steps/9/src/tests.rs index 8fa3dc60..2755b0ae 100644 --- a/steps/9/src/tests.rs +++ b/steps/9/src/tests.rs @@ -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, } } @@ -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)); }); }