mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-21 02:51:02 +00:00
Replace Index for Nonce (#7374)
* replace Index for Nonce
* remove extra Nonce
* update lockfile for {"substrate"}
---------
Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -83,7 +83,7 @@ macro_rules! construct_runtime_prelude {
|
||||
pub(crate) fn [<create_uxt_ $runtime>](
|
||||
raw_solution: EPM::RawSolution<EPM::SolutionOf<Runtime>>,
|
||||
signer: crate::signer::Signer,
|
||||
nonce: crate::prelude::Index,
|
||||
nonce: crate::prelude::Nonce,
|
||||
tip: crate::prelude::Balance,
|
||||
era: sp_runtime::generic::Era,
|
||||
) -> UncheckedExtrinsic {
|
||||
@@ -121,7 +121,7 @@ macro_rules! construct_runtime_prelude {
|
||||
|
||||
// NOTE: we might be able to use some code from the bridges repo here.
|
||||
fn signed_ext_builder_polkadot(
|
||||
nonce: Index,
|
||||
nonce: Nonce,
|
||||
tip: Balance,
|
||||
era: sp_runtime::generic::Era,
|
||||
) -> polkadot_runtime_exports::SignedExtra {
|
||||
@@ -140,7 +140,7 @@ fn signed_ext_builder_polkadot(
|
||||
}
|
||||
|
||||
fn signed_ext_builder_kusama(
|
||||
nonce: Index,
|
||||
nonce: Nonce,
|
||||
tip: Balance,
|
||||
era: sp_runtime::generic::Era,
|
||||
) -> kusama_runtime_exports::SignedExtra {
|
||||
@@ -158,7 +158,7 @@ fn signed_ext_builder_kusama(
|
||||
}
|
||||
|
||||
fn signed_ext_builder_westend(
|
||||
nonce: Index,
|
||||
nonce: Nonce,
|
||||
tip: Balance,
|
||||
era: sp_runtime::generic::Era,
|
||||
) -> westend_runtime_exports::SignedExtra {
|
||||
|
||||
@@ -26,8 +26,8 @@ pub type AccountId = core_primitives::AccountId;
|
||||
pub type BlockNumber = core_primitives::BlockNumber;
|
||||
/// The balance type.
|
||||
pub type Balance = core_primitives::Balance;
|
||||
/// The index of an account.
|
||||
pub type Index = core_primitives::AccountIndex;
|
||||
/// Index of a transaction in the chain.
|
||||
pub type Nonce = core_primitives::Nonce;
|
||||
/// The hash type. We re-export it here, but we can easily get it from block as well.
|
||||
pub type Hash = core_primitives::Hash;
|
||||
/// The header type. We re-export it here, but we can easily get it from block as well.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Wrappers around creating a signer account.
|
||||
|
||||
use crate::{prelude::*, rpc::SharedRpcClient, AccountId, Error, Index, Pair, LOG_TARGET};
|
||||
use crate::{prelude::*, rpc::SharedRpcClient, AccountId, Error, Nonce, Pair, LOG_TARGET};
|
||||
use frame_system::AccountInfo;
|
||||
use sp_core::{crypto::Pair as _, storage::StorageKey};
|
||||
|
||||
@@ -39,8 +39,8 @@ pub(crate) async fn get_account_info<T: frame_system::Config<Hash = Hash> + EPM:
|
||||
rpc: &SharedRpcClient,
|
||||
who: &T::AccountId,
|
||||
maybe_at: Option<T::Hash>,
|
||||
) -> Result<Option<AccountInfo<Index, T::AccountData>>, Error<T>> {
|
||||
rpc.get_storage_and_decode::<AccountInfo<Index, T::AccountData>>(
|
||||
) -> Result<Option<AccountInfo<Nonce, T::AccountData>>, Error<T>> {
|
||||
rpc.get_storage_and_decode::<AccountInfo<Nonce, T::AccountData>>(
|
||||
&StorageKey(<frame_system::Account<T>>::hashed_key_for(&who)),
|
||||
maybe_at,
|
||||
)
|
||||
@@ -52,7 +52,7 @@ pub(crate) async fn get_account_info<T: frame_system::Config<Hash = Hash> + EPM:
|
||||
pub(crate) async fn signer_uri_from_string<
|
||||
T: frame_system::Config<
|
||||
AccountId = AccountId,
|
||||
Index = Index,
|
||||
Nonce = Nonce,
|
||||
AccountData = pallet_balances::AccountData<Balance>,
|
||||
Hash = Hash,
|
||||
> + EPM::Config,
|
||||
|
||||
Reference in New Issue
Block a user