diff --git a/auction/src/mock.rs b/auction/src/mock.rs index 974ee7d8c1d47460fa3dfb80bd52319aa155742b..f5acc361e1f16818df65e509d33c495fe73a9c9b 100644 --- a/auction/src/mock.rs +++ b/auction/src/mock.rs @@ -34,7 +34,7 @@ parameter_types! { pub const AvailableBlockRatio: Perbill = Perbill::one(); } -pub type AccountId = u64; +pub type AccountId = u128; pub type Balance = u64; pub type BlockNumber = u64; pub type AuctionId = u64; @@ -86,7 +86,7 @@ impl AuctionHandler<AccountId, Balance, BlockNumber, AuctionId> for Handler { impl Trait for Runtime { type Event = TestEvent; type Balance = Balance; - type AuctionId = AccountId; + type AuctionId = AuctionId; type Handler = Handler; } pub type AuctionModule = Module<Runtime>; diff --git a/benchmarking/src/tests.rs b/benchmarking/src/tests.rs index 5e2ffaba3a0b34f4d6ea35d35967a14982d4b19f..35e4361232f4229973950c6fb08182ad73ef5ada 100644 --- a/benchmarking/src/tests.rs +++ b/benchmarking/src/tests.rs @@ -49,7 +49,7 @@ pub trait Trait { type Origin: From<frame_system::RawOrigin<Self::AccountId>> + Into<Result<RawOrigin<Self::AccountId>, Self::Origin>>; } -type AccountId = u64; +type AccountId = u128; #[derive(Clone, Eq, PartialEq)] pub struct Test; @@ -84,7 +84,7 @@ impl Trait for Test { type Event = (); type BlockNumber = u32; type Origin = Origin; - type AccountId = u64; + type AccountId = u128; } // This function basically just builds a genesis storage key/value store according to diff --git a/currencies/src/mock.rs b/currencies/src/mock.rs index e98aa3e1a70ad8ba57799d37e69036d553cea1ae..63be37cc6e234fd88376e4f6866e3fe009a8bb4e 100644 --- a/currencies/src/mock.rs +++ b/currencies/src/mock.rs @@ -38,7 +38,7 @@ parameter_types! { pub const AvailableBlockRatio: Perbill = Perbill::one(); } -pub type AccountId = u64; +pub type AccountId = u128; impl frame_system::Trait for Runtime { type Origin = Origin; type Call = (); diff --git a/gradually-update/src/mock.rs b/gradually-update/src/mock.rs index 6963593e2dac05ac130edd10f0aabdb056a0f96a..40ab82f5a756412cecebb4de742934efba8c40ef 100644 --- a/gradually-update/src/mock.rs +++ b/gradually-update/src/mock.rs @@ -34,7 +34,7 @@ parameter_types! { pub const AvailableBlockRatio: Perbill = Perbill::one(); } -pub type AccountId = u64; +pub type AccountId = u128; pub type BlockNumber = u64; impl frame_system::Trait for Runtime { diff --git a/oracle/src/mock.rs b/oracle/src/mock.rs index a9f7f597bbe3137386740cefe274749ab3983b5a..05be4597666b553aa2924e4bc79fa00aed1e4919 100644 --- a/oracle/src/mock.rs +++ b/oracle/src/mock.rs @@ -22,7 +22,7 @@ impl_outer_dispatch! { } pub type OracleCall = super::Call<Test>; -type AccountId = u64; +pub type AccountId = u128; type Key = u32; type Value = u32; diff --git a/oracle/src/tests.rs b/oracle/src/tests.rs index 9d6c5e6d934ed528384828e5425f032159c9ef78..4546a5faa0612a3c9240843472ee84dd61a6712c 100644 --- a/oracle/src/tests.rs +++ b/oracle/src/tests.rs @@ -1,7 +1,7 @@ #![cfg(test)] use crate::{ - mock::{new_test_ext, ModuleOracle, OracleCall, Origin, Timestamp}, + mock::{new_test_ext, AccountId, ModuleOracle, OracleCall, Origin, Timestamp}, TimestampedValue, }; use codec::Encode; @@ -33,7 +33,7 @@ fn feed_values_from_session_key( } fn feed_values( - from: u64, + from: AccountId, index: u32, nonce: u32, values: Vec<(u32, u32)>, @@ -46,7 +46,7 @@ fn feed_values( #[test] fn should_feed_values() { new_test_ext().execute_with(|| { - let account_id: u64 = 1; + let account_id: AccountId = 1; assert_ok!(feed_values(account_id, 0, 0, vec![(50, 1000), (51, 900), (52, 800)])); @@ -274,7 +274,7 @@ fn bad_index() { #[test] fn change_member_should_work() { new_test_ext().execute_with(|| { - <ModuleOracle as ChangeMembers<u64>>::change_members_sorted(&[4], &[1], &[2, 3, 4]); + <ModuleOracle as ChangeMembers<AccountId>>::change_members_sorted(&[4], &[1], &[2, 3, 4]); assert_noop!( feed_values_from_session_key(10.into(), 0, 0, vec![(50, 1000)]), diff --git a/schedule-update/src/mock.rs b/schedule-update/src/mock.rs index 5b790048d513a20157057be54db3ced7fd6287e8..9edb9dccdc0a6c9af1598f5d2950d480b917d04d 100644 --- a/schedule-update/src/mock.rs +++ b/schedule-update/src/mock.rs @@ -41,7 +41,7 @@ parameter_types! { pub const AvailableBlockRatio: Perbill = Perbill::one(); } -pub type AccountId = u64; +pub type AccountId = u128; pub type BlockNumber = u64; impl frame_system::Trait for Runtime { @@ -83,8 +83,8 @@ impl pallet_balances::Trait for Runtime { type AccountStore = System; } -pub const ALICE: AccountId = 1u64; -pub const BOB: AccountId = 2u64; +pub const ALICE: AccountId = 1; +pub const BOB: AccountId = 2; // A mock schedule origin where only `ALICE` has permission. pub struct MockScheduleOrigin; diff --git a/tokens/src/mock.rs b/tokens/src/mock.rs index 32bea4bd1a268a33b2c1d8ee48ef059d26df389e..c9b86c88e3e775e075028b79e4284aa8d647e599 100644 --- a/tokens/src/mock.rs +++ b/tokens/src/mock.rs @@ -36,7 +36,7 @@ parameter_types! { pub const AvailableBlockRatio: Perbill = Perbill::one(); } -type AccountId = u64; +type AccountId = u128; impl frame_system::Trait for Runtime { type Origin = Origin; type Call = (); diff --git a/utilities/src/linked_item.rs b/utilities/src/linked_item.rs index 553f39e2896a1cac9a4742cbf422be0e52b2a513..5be0eba883e21a88e933724c3ddfc63659f90735 100644 --- a/utilities/src/linked_item.rs +++ b/utilities/src/linked_item.rs @@ -203,7 +203,7 @@ mod tests { type Call = (); type Hash = H256; type Hashing = ::sp_runtime::traits::BlakeTwo256; - type AccountId = u64; + type AccountId = u128; type Lookup = IdentityLookup<Self::AccountId>; type Header = Header; type Event = (); diff --git a/vesting/src/mock.rs b/vesting/src/mock.rs index f9e666825500c6c732a44fab81e743789eb3983f..fcd13e19cfade7e71e5ed5b630e30e6b15e7aa3e 100644 --- a/vesting/src/mock.rs +++ b/vesting/src/mock.rs @@ -34,7 +34,7 @@ parameter_types! { pub const AvailableBlockRatio: Perbill = Perbill::one(); } -pub type AccountId = u64; +pub type AccountId = u128; impl frame_system::Trait for Runtime { type Origin = Origin; type Call = ();