mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 03:31:05 +00:00
Replace Index for Nonce (#2740)
* replace Index for Nonce
* update lockfile for {"substrate", "polkadot"}
---------
Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+264
-263
File diff suppressed because it is too large
Load Diff
@@ -30,7 +30,7 @@ use pallet_bridge_messages::WeightInfoExt as _;
|
||||
use sp_runtime::traits::SignedExtension;
|
||||
|
||||
/// Macro that ensures that the runtime configuration and chain primitives crate are sharing
|
||||
/// the same types (index, block number, hash, hasher, account id and header).
|
||||
/// the same types (nonce, block number, hash, hasher, account id and header).
|
||||
#[macro_export]
|
||||
macro_rules! assert_chain_types(
|
||||
( runtime: $r:path, this_chain: $this:path ) => {
|
||||
@@ -41,7 +41,7 @@ macro_rules! assert_chain_types(
|
||||
use frame_system::{Config as SystemConfig, pallet_prelude::*};
|
||||
use static_assertions::assert_type_eq_all;
|
||||
|
||||
assert_type_eq_all!(<$r as SystemConfig>::Index, bp_runtime::IndexOf<$this>);
|
||||
assert_type_eq_all!(<$r as SystemConfig>::Nonce, bp_runtime::NonceOf<$this>);
|
||||
assert_type_eq_all!(BlockNumberFor<$r>, bp_runtime::BlockNumberOf<$this>);
|
||||
assert_type_eq_all!(<$r as SystemConfig>::Hash, bp_runtime::HashOf<$this>);
|
||||
assert_type_eq_all!(<$r as SystemConfig>::Hashing, bp_runtime::HasherOf<$this>);
|
||||
|
||||
@@ -143,7 +143,7 @@ parameter_types! {
|
||||
|
||||
impl frame_system::Config for TestRuntime {
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = ThisChainHash;
|
||||
type Hashing = ThisChainHasher;
|
||||
@@ -317,7 +317,7 @@ impl Chain for ThisUnderlyingChain {
|
||||
type Hasher = ThisChainHasher;
|
||||
type AccountId = ThisChainAccountId;
|
||||
type Balance = ThisChainBalance;
|
||||
type Index = u32;
|
||||
type Nonce = u32;
|
||||
type Signature = sp_runtime::MultiSignature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
@@ -356,7 +356,7 @@ impl Chain for BridgedUnderlyingChain {
|
||||
type Hasher = BridgedChainHasher;
|
||||
type AccountId = BridgedChainAccountId;
|
||||
type Balance = BridgedChainBalance;
|
||||
type Index = u32;
|
||||
type Nonce = u32;
|
||||
type Signature = sp_runtime::MultiSignature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
@@ -381,7 +381,7 @@ impl Chain for BridgedUnderlyingParachain {
|
||||
type Hasher = BridgedChainHasher;
|
||||
type AccountId = BridgedChainAccountId;
|
||||
type Balance = BridgedChainBalance;
|
||||
type Index = u32;
|
||||
type Nonce = u32;
|
||||
type Signature = sp_runtime::MultiSignature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
|
||||
@@ -57,7 +57,7 @@ parameter_types! {
|
||||
|
||||
impl frame_system::Config for TestRuntime {
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
@@ -106,7 +106,7 @@ impl Chain for TestBridgedChain {
|
||||
|
||||
type AccountId = AccountId;
|
||||
type Balance = u64;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Signature = Signature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
|
||||
@@ -93,7 +93,7 @@ pub type DbWeight = RocksDbWeight;
|
||||
|
||||
impl frame_system::Config for TestRuntime {
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -53,7 +53,7 @@ impl Chain for Parachain1 {
|
||||
type Hasher = RegularParachainHasher;
|
||||
type AccountId = u64;
|
||||
type Balance = u64;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Signature = MultiSignature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
@@ -76,7 +76,7 @@ impl Chain for Parachain2 {
|
||||
type Hasher = RegularParachainHasher;
|
||||
type AccountId = u64;
|
||||
type Balance = u64;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Signature = MultiSignature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
@@ -99,7 +99,7 @@ impl Chain for Parachain3 {
|
||||
type Hasher = RegularParachainHasher;
|
||||
type AccountId = u64;
|
||||
type Balance = u64;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Signature = MultiSignature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
@@ -125,7 +125,7 @@ impl Chain for BigParachain {
|
||||
type Hasher = RegularParachainHasher;
|
||||
type AccountId = u64;
|
||||
type Balance = u64;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Signature = MultiSignature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
@@ -159,7 +159,7 @@ parameter_types! {
|
||||
|
||||
impl frame_system::Config for TestRuntime {
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = RegularParachainHasher;
|
||||
@@ -262,7 +262,7 @@ impl Chain for TestBridgedChain {
|
||||
|
||||
type AccountId = AccountId;
|
||||
type Balance = u32;
|
||||
type Index = u32;
|
||||
type Nonce = u32;
|
||||
type Signature = sp_runtime::testing::TestSignature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
@@ -292,7 +292,7 @@ impl Chain for OtherBridgedChain {
|
||||
|
||||
type AccountId = AccountId;
|
||||
type Balance = u32;
|
||||
type Index = u32;
|
||||
type Nonce = u32;
|
||||
type Signature = sp_runtime::testing::TestSignature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
|
||||
@@ -63,7 +63,7 @@ parameter_types! {
|
||||
|
||||
impl frame_system::Config for TestRuntime {
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
pub use bp_polkadot_core::{
|
||||
AccountId, AccountInfoStorageMapKeyProvider, AccountPublic, Balance, Block, BlockNumber, Hash,
|
||||
Hasher, Hashing, Header, Index, Nonce, Perbill, Signature, SignedBlock, UncheckedExtrinsic,
|
||||
Hasher, Hashing, Header, Nonce, Perbill, Signature, SignedBlock, UncheckedExtrinsic,
|
||||
EXTRA_STORAGE_PROOF_SIZE, TX_EXTRA_BYTES,
|
||||
};
|
||||
|
||||
@@ -140,7 +140,7 @@ pub type SignedExtra = (
|
||||
CheckTxVersion,
|
||||
CheckGenesis<Hash>,
|
||||
CheckEra<Hash>,
|
||||
CheckNonce<Index>,
|
||||
CheckNonce<Nonce>,
|
||||
CheckWeight,
|
||||
ChargeTransactionPayment<Balance>,
|
||||
BridgeRejectObsoleteHeadersAndMessages,
|
||||
@@ -159,12 +159,12 @@ pub trait BridgeHubSignedExtension {
|
||||
transaction_version: u32,
|
||||
era: bp_runtime::TransactionEra<BlockNumber, Hash>,
|
||||
genesis_hash: Hash,
|
||||
nonce: Index,
|
||||
nonce: Nonce,
|
||||
tip: Balance,
|
||||
) -> Self;
|
||||
|
||||
/// Return transaction nonce.
|
||||
fn nonce(&self) -> Index;
|
||||
fn nonce(&self) -> Nonce;
|
||||
|
||||
/// Return transaction tip.
|
||||
fn tip(&self) -> Balance;
|
||||
@@ -177,7 +177,7 @@ impl BridgeHubSignedExtension for SignedExtension {
|
||||
transaction_version: u32,
|
||||
era: bp_runtime::TransactionEra<BlockNumber, Hash>,
|
||||
genesis_hash: Hash,
|
||||
nonce: Index,
|
||||
nonce: Nonce,
|
||||
tip: Balance,
|
||||
) -> Self {
|
||||
GenericSignedExtension::new(
|
||||
@@ -209,7 +209,7 @@ impl BridgeHubSignedExtension for SignedExtension {
|
||||
}
|
||||
|
||||
/// Return transaction nonce.
|
||||
fn nonce(&self) -> Index {
|
||||
fn nonce(&self) -> Nonce {
|
||||
self.payload.5 .0
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ impl Chain for BridgeHubKusama {
|
||||
type Block = Block;
|
||||
type AccountId = AccountId;
|
||||
type Balance = Balance;
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
type Signature = Signature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
|
||||
@@ -37,7 +37,7 @@ impl Chain for BridgeHubPolkadot {
|
||||
type Block = Block;
|
||||
type AccountId = AccountId;
|
||||
type Balance = Balance;
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
type Signature = Signature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
|
||||
@@ -41,7 +41,7 @@ impl Chain for BridgeHubRococo {
|
||||
type Block = Block;
|
||||
type AccountId = AccountId;
|
||||
type Balance = Balance;
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
type Signature = Signature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
|
||||
@@ -37,7 +37,7 @@ impl Chain for BridgeHubWococo {
|
||||
type Block = Block;
|
||||
type AccountId = AccountId;
|
||||
type Balance = Balance;
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
type Signature = Signature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
|
||||
@@ -34,7 +34,7 @@ impl Chain for Kusama {
|
||||
|
||||
type AccountId = <PolkadotLike as Chain>::AccountId;
|
||||
type Balance = <PolkadotLike as Chain>::Balance;
|
||||
type Index = <PolkadotLike as Chain>::Index;
|
||||
type Nonce = <PolkadotLike as Chain>::Nonce;
|
||||
type Signature = <PolkadotLike as Chain>::Signature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
|
||||
@@ -34,7 +34,7 @@ impl Chain for Polkadot {
|
||||
|
||||
type AccountId = <PolkadotLike as Chain>::AccountId;
|
||||
type Balance = <PolkadotLike as Chain>::Balance;
|
||||
type Index = <PolkadotLike as Chain>::Index;
|
||||
type Nonce = <PolkadotLike as Chain>::Nonce;
|
||||
type Signature = <PolkadotLike as Chain>::Signature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
|
||||
@@ -33,7 +33,7 @@ impl Chain for Rococo {
|
||||
type Hasher = <PolkadotLike as Chain>::Hasher;
|
||||
type AccountId = <PolkadotLike as Chain>::AccountId;
|
||||
type Balance = <PolkadotLike as Chain>::Balance;
|
||||
type Index = <PolkadotLike as Chain>::Index;
|
||||
type Nonce = <PolkadotLike as Chain>::Nonce;
|
||||
type Signature = <PolkadotLike as Chain>::Signature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
|
||||
@@ -36,7 +36,7 @@ impl Chain for Wococo {
|
||||
type Hasher = <PolkadotLike as Chain>::Hasher;
|
||||
type AccountId = <PolkadotLike as Chain>::AccountId;
|
||||
type Balance = <PolkadotLike as Chain>::Balance;
|
||||
type Index = <PolkadotLike as Chain>::Index;
|
||||
type Nonce = <PolkadotLike as Chain>::Nonce;
|
||||
type Signature = <PolkadotLike as Chain>::Signature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
|
||||
@@ -181,9 +181,6 @@ pub type BlockNumber = u32;
|
||||
/// Hash type used in Polkadot-like chains.
|
||||
pub type Hash = <BlakeTwo256 as HasherT>::Out;
|
||||
|
||||
/// Account Index (a.k.a. nonce).
|
||||
pub type Index = u32;
|
||||
|
||||
/// Hashing type.
|
||||
pub type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -234,7 +231,7 @@ impl Chain for PolkadotLike {
|
||||
type Block = Block;
|
||||
type AccountId = AccountId;
|
||||
type Balance = Balance;
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
type Signature = Signature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
|
||||
@@ -147,7 +147,7 @@ pub trait Chain: Send + Sync + 'static {
|
||||
+ TryFrom<sp_core::U256>
|
||||
+ MaxEncodedLen;
|
||||
/// Index of a transaction used by the chain.
|
||||
type Index: Parameter
|
||||
type Nonce: Parameter
|
||||
+ Member
|
||||
+ MaybeSerialize
|
||||
+ Debug
|
||||
@@ -181,7 +181,7 @@ where
|
||||
type Block = <T::Chain as Chain>::Block;
|
||||
type AccountId = <T::Chain as Chain>::AccountId;
|
||||
type Balance = <T::Chain as Chain>::Balance;
|
||||
type Index = <T::Chain as Chain>::Index;
|
||||
type Nonce = <T::Chain as Chain>::Nonce;
|
||||
type Signature = <T::Chain as Chain>::Signature;
|
||||
|
||||
fn max_extrinsic_size() -> u32 {
|
||||
@@ -237,7 +237,7 @@ pub type AccountIdOf<C> = <C as Chain>::AccountId;
|
||||
pub type BalanceOf<C> = <C as Chain>::Balance;
|
||||
|
||||
/// Transaction index type used by the chain.
|
||||
pub type IndexOf<C> = <C as Chain>::Index;
|
||||
pub type NonceOf<C> = <C as Chain>::Nonce;
|
||||
|
||||
/// Signature type used by the chain.
|
||||
pub type SignatureOf<C> = <C as Chain>::Signature;
|
||||
|
||||
@@ -31,7 +31,7 @@ use sp_std::{convert::TryFrom, fmt::Debug, ops::RangeInclusive, vec, vec::Vec};
|
||||
|
||||
pub use chain::{
|
||||
AccountIdOf, AccountPublicOf, BalanceOf, BlockNumberOf, Chain, EncodedOrDecodedCall, HashOf,
|
||||
HasherOf, HeaderOf, IndexOf, Parachain, ParachainIdOf, SignatureOf, TransactionEraOf,
|
||||
HasherOf, HeaderOf, NonceOf, Parachain, ParachainIdOf, SignatureOf, TransactionEraOf,
|
||||
UnderlyingChainOf, UnderlyingChainProvider,
|
||||
};
|
||||
pub use frame_support::storage::storage_prefix as storage_value_final_key;
|
||||
|
||||
@@ -57,7 +57,7 @@ impl system::Config for Test {
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = u64;
|
||||
|
||||
@@ -455,7 +455,7 @@ mod tests {
|
||||
impl frame_system::Config for Test {
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = AccountId;
|
||||
|
||||
@@ -71,7 +71,7 @@ parameter_types! {
|
||||
impl frame_system::Config for Test {
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = u64;
|
||||
|
||||
@@ -61,7 +61,7 @@ impl frame_system::Config for Test {
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = AccountId;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use parachain_template_runtime::{opaque::Block, AccountId, Balance, Index as Nonce};
|
||||
use parachain_template_runtime::{opaque::Block, AccountId, Balance, Nonce};
|
||||
|
||||
use sc_client_api::AuxStore;
|
||||
pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor};
|
||||
|
||||
@@ -29,7 +29,7 @@ impl system::Config for Test {
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = u64;
|
||||
|
||||
@@ -71,7 +71,7 @@ pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::Account
|
||||
pub type Balance = u128;
|
||||
|
||||
/// Index of a transaction in the chain.
|
||||
pub type Index = u32;
|
||||
pub type Nonce = u32;
|
||||
|
||||
/// A hash of some data used by the chain.
|
||||
pub type Hash = sp_core::H256;
|
||||
@@ -269,7 +269,7 @@ impl frame_system::Config for Runtime {
|
||||
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
/// The index type for storing how many extrinsics an account has signed.
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
/// The type for hashing blocks and tries.
|
||||
type Hash = Hash;
|
||||
/// The hashing algorithm used.
|
||||
@@ -599,8 +599,8 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Index {
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ mod tests {
|
||||
impl frame_system::Config for Test {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -43,7 +43,7 @@ mod types {
|
||||
pub type Balance = u128;
|
||||
|
||||
/// Index of a transaction in the chain.
|
||||
pub type Index = u32;
|
||||
pub type Nonce = u32;
|
||||
|
||||
/// A hash of some data used by the chain.
|
||||
pub type Hash = sp_core::H256;
|
||||
|
||||
@@ -67,7 +67,7 @@ use pallet_nfts::PalletFeatures;
|
||||
pub use parachains_common as common;
|
||||
use parachains_common::{
|
||||
impls::{AssetsToBlockAuthor, DealWithFees},
|
||||
AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, Hash, Header, Index,
|
||||
AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, Hash, Header, Nonce,
|
||||
Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT,
|
||||
NORMAL_DISPATCH_RATIO, SLOT_DURATION,
|
||||
};
|
||||
@@ -165,7 +165,7 @@ impl frame_system::Config for Runtime {
|
||||
type AccountId = AccountId;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
type Hash = Hash;
|
||||
type Hashing = BlakeTwo256;
|
||||
type Block = Block;
|
||||
@@ -935,8 +935,8 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Index {
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ pub use parachains_common as common;
|
||||
use parachains_common::{
|
||||
impls::{AssetsToBlockAuthor, DealWithFees},
|
||||
AccountId, AssetHubPolkadotAuraId as AuraId, AssetIdForTrustBackedAssets, Balance, BlockNumber,
|
||||
Hash, Header, Index, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT,
|
||||
Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT,
|
||||
NORMAL_DISPATCH_RATIO, SLOT_DURATION,
|
||||
};
|
||||
use xcm_config::{
|
||||
@@ -183,7 +183,7 @@ impl frame_system::Config for Runtime {
|
||||
type AccountId = AccountId;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
type Hash = Hash;
|
||||
type Hashing = BlakeTwo256;
|
||||
type Block = Block;
|
||||
@@ -917,8 +917,8 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Index {
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ use pallet_nfts::PalletFeatures;
|
||||
pub use parachains_common as common;
|
||||
use parachains_common::{
|
||||
impls::DealWithFees, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber,
|
||||
Hash, Header, Index, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT,
|
||||
Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT,
|
||||
NORMAL_DISPATCH_RATIO, SLOT_DURATION,
|
||||
};
|
||||
use sp_api::impl_runtime_apis;
|
||||
@@ -147,7 +147,7 @@ impl frame_system::Config for Runtime {
|
||||
type AccountId = AccountId;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
type Hash = Hash;
|
||||
type Hashing = BlakeTwo256;
|
||||
type Block = Block;
|
||||
@@ -966,8 +966,8 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Index {
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
|
||||
use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
|
||||
|
||||
use parachains_common::{
|
||||
impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Index, Signature,
|
||||
impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature,
|
||||
AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION,
|
||||
};
|
||||
|
||||
@@ -180,7 +180,7 @@ impl frame_system::Config for Runtime {
|
||||
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
/// The index type for storing how many extrinsics an account has signed.
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
/// The type for hashing blocks and tries.
|
||||
type Hash = Hash;
|
||||
/// The hashing algorithm used.
|
||||
@@ -542,8 +542,8 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Index {
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
|
||||
use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
|
||||
|
||||
use parachains_common::{
|
||||
impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Index, Signature,
|
||||
impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature,
|
||||
AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION,
|
||||
};
|
||||
// XCM Imports
|
||||
@@ -180,7 +180,7 @@ impl frame_system::Config for Runtime {
|
||||
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
/// The index type for storing how many extrinsics an account has signed.
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
/// The type for hashing blocks and tries.
|
||||
type Hash = Hash;
|
||||
/// The hashing algorithm used.
|
||||
@@ -542,8 +542,8 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Index {
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ use bridge_runtime_common::{
|
||||
messages_xcm_extension::{XcmAsPlainPayload, XcmBlobMessageDispatch},
|
||||
};
|
||||
use parachains_common::{
|
||||
impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Index, Signature,
|
||||
impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature,
|
||||
AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION,
|
||||
};
|
||||
use xcm_executor::XcmExecutor;
|
||||
@@ -194,7 +194,7 @@ impl frame_system::Config for Runtime {
|
||||
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
/// The index type for storing how many extrinsics an account has signed.
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
/// The type for hashing blocks and tries.
|
||||
type Hash = Hash;
|
||||
/// The hashing algorithm used.
|
||||
@@ -723,8 +723,8 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Index {
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ use frame_system::{
|
||||
};
|
||||
pub use parachains_common as common;
|
||||
use parachains_common::{
|
||||
impls::DealWithFees, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Index, Signature,
|
||||
impls::DealWithFees, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature,
|
||||
AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, MINUTES, NORMAL_DISPATCH_RATIO,
|
||||
SLOT_DURATION,
|
||||
};
|
||||
@@ -159,7 +159,7 @@ impl frame_system::Config for Runtime {
|
||||
type AccountId = AccountId;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
type Hash = Hash;
|
||||
type Hashing = BlakeTwo256;
|
||||
type Block = Block;
|
||||
@@ -761,8 +761,8 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Index {
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ use frame_support::{
|
||||
use frame_system::limits::{BlockLength, BlockWeights};
|
||||
pub use parachains_common as common;
|
||||
use parachains_common::{
|
||||
impls::DealWithFees, AccountId, BlockNumber, Hash, Header, Index, Signature,
|
||||
impls::DealWithFees, AccountId, BlockNumber, Hash, Header, Nonce, Signature,
|
||||
AVERAGE_ON_INITIALIZE_RATIO, MAXIMUM_BLOCK_WEIGHT, MINUTES, NORMAL_DISPATCH_RATIO,
|
||||
SLOT_DURATION,
|
||||
};
|
||||
@@ -174,7 +174,7 @@ impl frame_system::Config for Runtime {
|
||||
type AccountId = AccountId;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
type Hash = Hash;
|
||||
type Hashing = BlakeTwo256;
|
||||
type Block = Block;
|
||||
@@ -484,8 +484,8 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Index {
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ impl frame_system::Config for Runtime {
|
||||
type AccountId = AccountId;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
type Hash = Hash;
|
||||
type Hashing = BlakeTwo256;
|
||||
type Block = Block;
|
||||
@@ -216,7 +216,7 @@ construct_runtime! {
|
||||
}
|
||||
|
||||
/// Index of a transaction in the chain.
|
||||
pub type Index = u32;
|
||||
pub type Nonce = u32;
|
||||
/// A hash of some data used by the chain.
|
||||
pub type Hash = sp_core::H256;
|
||||
/// An index to a block.
|
||||
@@ -348,8 +348,8 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Index {
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ impl frame_system::Config for Runtime {
|
||||
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
/// The index type for storing how many extrinsics an account has signed.
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
/// The type for hashing blocks and tries.
|
||||
type Hash = Hash;
|
||||
/// The hashing algorithm used.
|
||||
@@ -194,7 +194,7 @@ construct_runtime! {
|
||||
}
|
||||
|
||||
/// Index of a transaction in the chain.
|
||||
pub type Index = u32;
|
||||
pub type Nonce = u32;
|
||||
/// A hash of some data used by the chain.
|
||||
pub type Hash = sp_core::H256;
|
||||
/// An index to a block.
|
||||
|
||||
@@ -133,7 +133,7 @@ impl frame_system::Config for Runtime {
|
||||
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
/// The index type for storing how many extrinsics an account has signed.
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
/// The type for hashing blocks and tries.
|
||||
type Hash = Hash;
|
||||
/// The hashing algorithm used.
|
||||
@@ -232,7 +232,7 @@ impl sp_runtime::traits::SignedExtension for DisallowSigned {
|
||||
}
|
||||
|
||||
/// Index of a transaction in the chain.
|
||||
pub type Index = u32;
|
||||
pub type Nonce = u32;
|
||||
/// A hash of some data used by the chain.
|
||||
pub type Hash = sp_core::H256;
|
||||
/// An index to a block.
|
||||
|
||||
@@ -83,7 +83,7 @@ use xcm_executor::XcmExecutor;
|
||||
pub type Balance = u128;
|
||||
|
||||
/// Index of a transaction in the chain.
|
||||
pub type Index = u32;
|
||||
pub type Nonce = u32;
|
||||
|
||||
/// A hash of some data used by the chain.
|
||||
pub type Hash = sp_core::H256;
|
||||
@@ -317,7 +317,7 @@ impl frame_system::Config for Runtime {
|
||||
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
/// The index type for storing how many extrinsics an account has signed.
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
/// The type for hashing blocks and tries.
|
||||
type Hash = Hash;
|
||||
/// The hashing algorithm used.
|
||||
@@ -689,8 +689,8 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Index {
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ impl frame_system::Config for Runtime {
|
||||
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
/// The index type for storing how many extrinsics an account has signed.
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
/// The type for hashing blocks and tries.
|
||||
type Hash = Hash;
|
||||
/// The hashing algorithm used.
|
||||
@@ -587,7 +587,7 @@ construct_runtime! {
|
||||
/// Balance of an account.
|
||||
pub type Balance = u128;
|
||||
/// Index of a transaction in the chain.
|
||||
pub type Index = u32;
|
||||
pub type Nonce = u32;
|
||||
/// A hash of some data used by the chain.
|
||||
pub type Hash = sp_core::H256;
|
||||
/// An index to a block.
|
||||
@@ -724,8 +724,8 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Index {
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use parachains_common::{AccountId, Balance, Block, Index as Nonce};
|
||||
use parachains_common::{AccountId, Balance, Block, Nonce};
|
||||
use sc_client_api::AuxStore;
|
||||
pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor};
|
||||
use sc_transaction_pool_api::TransactionPool;
|
||||
|
||||
@@ -34,7 +34,7 @@ use sp_core::Pair;
|
||||
use jsonrpsee::RpcModule;
|
||||
|
||||
use crate::rpc;
|
||||
pub use parachains_common::{AccountId, Balance, Block, BlockNumber, Hash, Header, Index as Nonce};
|
||||
pub use parachains_common::{AccountId, Balance, Block, BlockNumber, Hash, Header, Nonce};
|
||||
|
||||
use cumulus_client_consensus_relay_chain::Verifier as RelayChainVerifier;
|
||||
use futures::lock::Mutex;
|
||||
|
||||
@@ -185,7 +185,7 @@ impl frame_system::Config for Runtime {
|
||||
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
|
||||
type Lookup = IdentityLookup<AccountId>;
|
||||
/// The index type for storing how many extrinsics an account has signed.
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
/// The type for hashing blocks and tries.
|
||||
type Hash = Hash;
|
||||
/// The hashing algorithm used.
|
||||
@@ -306,7 +306,7 @@ construct_runtime! {
|
||||
}
|
||||
|
||||
/// Index of a transaction in the chain.
|
||||
pub type Index = u32;
|
||||
pub type Nonce = u32;
|
||||
/// A hash of some data used by the chain.
|
||||
pub type Hash = sp_core::H256;
|
||||
/// Balance of an account.
|
||||
@@ -403,8 +403,8 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Index {
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user