diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 7eb200396146..269dde5668ea 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -43,7 +43,7 @@ use sp_runtime::{ transaction_validity::{TransactionValidity, TransactionSource, TransactionPriority}, curve::PiecewiseLinear, traits::{ - BlakeTwo256, Block as BlockT, OpaqueKeys, ConvertInto, IdentityLookup, + BlakeTwo256, Block as BlockT, OpaqueKeys, ConvertInto, AccountIdLookup, Extrinsic as ExtrinsicT, SaturatedConversion, Verify, }, }; @@ -137,7 +137,7 @@ impl frame_system::Config for Runtime { type Hash = Hash; type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; + type Lookup = AccountIdLookup; type Header = generic::Header; type Event = Event; type BlockHashCount = BlockHashCount; @@ -656,6 +656,7 @@ impl frame_system::offchain::CreateSignedTransaction for R account: AccountId, nonce: ::Index, ) -> Option<(Call, ::SignaturePayload)> { + use sp_runtime::traits::StaticLookup; // take the biggest period possible. let period = BlockHashCount::get() .checked_next_power_of_two() @@ -684,7 +685,8 @@ impl frame_system::offchain::CreateSignedTransaction for R C::sign(payload, public) })?; let (call, extra, _) = raw_payload.deconstruct(); - Some((call, (account, signature, extra))) + let address = ::Lookup::unlookup(account); + Some((call, (address, signature, extra))) } } @@ -1241,7 +1243,7 @@ construct_runtime! { } /// The address format for describing accounts. -pub type Address = AccountId; +pub type Address = sp_runtime::MultiAddress; /// Block header type as expected by this runtime. pub type Header = generic::Header; /// Block type as expected by this runtime. diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 872a11fc58cf..4e68d1ef2fcb 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -43,7 +43,7 @@ use sp_runtime::{ KeyTypeId, Percent, Permill, Perbill, curve::PiecewiseLinear, transaction_validity::{TransactionValidity, TransactionSource, TransactionPriority}, traits::{ - BlakeTwo256, Block as BlockT, OpaqueKeys, ConvertInto, IdentityLookup, + BlakeTwo256, Block as BlockT, OpaqueKeys, ConvertInto, AccountIdLookup, Extrinsic as ExtrinsicT, SaturatedConversion, Verify, }, }; @@ -151,7 +151,7 @@ impl frame_system::Config for Runtime { type Hash = Hash; type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; + type Lookup = AccountIdLookup; type Header = generic::Header; type Event = Event; type BlockHashCount = BlockHashCount; @@ -702,6 +702,7 @@ impl frame_system::offchain::CreateSignedTransaction for R account: AccountId, nonce: ::Index, ) -> Option<(Call, ::SignaturePayload)> { + use sp_runtime::traits::StaticLookup; // take the biggest period possible. let period = BlockHashCount::get() .checked_next_power_of_two() @@ -731,7 +732,8 @@ impl frame_system::offchain::CreateSignedTransaction for R C::sign(payload, public) })?; let (call, extra, _) = raw_payload.deconstruct(); - Some((call, (account, signature, extra))) + let address = ::Lookup::unlookup(account); + Some((call, (address, signature, extra))) } } @@ -1015,7 +1017,7 @@ construct_runtime! { } /// The address format for describing accounts. -pub type Address = AccountId; +pub type Address = sp_runtime::MultiAddress; /// Block header type as expected by this runtime. pub type Header = generic::Header; /// Block type as expected by this runtime. diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index f2a673200654..eeb0b6f98141 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -50,7 +50,7 @@ use sp_runtime::{ ApplyExtrinsicResult, KeyTypeId, Perbill, curve::PiecewiseLinear, transaction_validity::{TransactionValidity, TransactionSource, TransactionPriority}, traits::{ - BlakeTwo256, Block as BlockT, OpaqueKeys, IdentityLookup, + BlakeTwo256, Block as BlockT, OpaqueKeys, AccountIdLookup, Extrinsic as ExtrinsicT, SaturatedConversion, Verify, }, }; @@ -124,7 +124,7 @@ pub fn native_version() -> NativeVersion { } /// The address format for describing accounts. -pub type Address = AccountId; +pub type Address = sp_runtime::MultiAddress; /// Block header type as expected by this runtime. pub type Header = generic::Header; /// Block type as expected by this runtime. @@ -234,7 +234,7 @@ impl frame_system::Config for Runtime { type Hash = Hash; type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; + type Lookup = AccountIdLookup; type Header = generic::Header; type Event = Event; type BlockHashCount = BlockHashCount; @@ -265,6 +265,7 @@ impl frame_system::offchain::CreateSignedTransaction for R account: AccountId, nonce: ::Index, ) -> Option<(Call, ::SignaturePayload)> { + use sp_runtime::traits::StaticLookup; // take the biggest period possible. let period = BlockHashCount::get() .checked_next_power_of_two() @@ -293,7 +294,8 @@ impl frame_system::offchain::CreateSignedTransaction for R C::sign(payload, public) })?; let (call, extra, _) = raw_payload.deconstruct(); - Some((call, (account, signature, extra))) + let address = ::Lookup::unlookup(account); + Some((call, (address, signature, extra))) } } diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 7d68a6f69c64..df1b5c1ec0e2 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -524,7 +524,7 @@ construct_runtime! { } /// The address format for describing accounts. -pub type Address = ::Source; +pub type Address = sp_runtime::MultiAddress; /// Block header type as expected by this runtime. pub type Header = generic::Header; /// Block type as expected by this runtime. diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index c99b1a15009e..2a5712a72136 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -41,7 +41,7 @@ use sp_runtime::{ ApplyExtrinsicResult, KeyTypeId, Perbill, curve::PiecewiseLinear, transaction_validity::{TransactionValidity, TransactionSource, TransactionPriority}, traits::{ - BlakeTwo256, Block as BlockT, OpaqueKeys, ConvertInto, IdentityLookup, + BlakeTwo256, Block as BlockT, OpaqueKeys, ConvertInto, AccountIdLookup, Extrinsic as ExtrinsicT, SaturatedConversion, Verify, }, }; @@ -128,7 +128,7 @@ impl frame_system::Config for Runtime { type Hash = Hash; type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; + type Lookup = AccountIdLookup; type Header = generic::Header; type Event = Event; type BlockHashCount = BlockHashCount; @@ -440,6 +440,7 @@ impl frame_system::offchain::CreateSignedTransaction for R account: AccountId, nonce: ::Index, ) -> Option<(Call, ::SignaturePayload)> { + use sp_runtime::traits::StaticLookup; // take the biggest period possible. let period = BlockHashCount::get() .checked_next_power_of_two() @@ -468,7 +469,8 @@ impl frame_system::offchain::CreateSignedTransaction for R C::sign(payload, public) })?; let (call, extra, _) = raw_payload.deconstruct(); - Some((call, (account, signature, extra))) + let address = ::Lookup::unlookup(account); + Some((call, (address, signature, extra))) } } @@ -722,7 +724,7 @@ construct_runtime! { } /// The address format for describing accounts. -pub type Address = AccountId; +pub type Address = sp_runtime::MultiAddress; /// Block header type as expected by this runtime. pub type Header = generic::Header; /// Block type as expected by this runtime.