mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user