mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 07:11:03 +00:00
Replace system config Index for Nonce (#14290)
* replace Index by Nonce * replace Index by Nonce * replace Index by Nonce * replace Index by Nonce * replace Index by Nonce * wip * remove index in lieu of nonce * wip * remove accountnonce in lieu of nonce * add minor improvement * rebase and merge conflicts
This commit is contained in:
@@ -51,7 +51,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = AccountId;
|
||||
|
||||
@@ -53,7 +53,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = u128;
|
||||
|
||||
@@ -43,7 +43,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 = u64;
|
||||
|
||||
@@ -52,7 +52,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = AccountId;
|
||||
|
||||
@@ -27,7 +27,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -45,7 +45,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = ::sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -231,7 +231,7 @@ mod tests {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = ::sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -125,7 +125,7 @@ mod tests {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -65,7 +65,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Version = ();
|
||||
|
||||
@@ -52,7 +52,7 @@ impl frame_system::Config for Runtime {
|
||||
type SS58Prefix = ();
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_core::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -92,7 +92,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = ::sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -64,7 +64,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -72,7 +72,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -342,7 +342,7 @@ mod mock {
|
||||
use sp_runtime::{testing::H256, BuildStorage};
|
||||
|
||||
type AccountId = u64;
|
||||
type AccountIndex = u32;
|
||||
type Nonce = u32;
|
||||
|
||||
type Block = frame_system::mocking::MockBlock<Test>;
|
||||
|
||||
@@ -360,7 +360,7 @@ mod mock {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = AccountIndex;
|
||||
type Nonce = Nonce;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = ::sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -180,7 +180,7 @@ mod mock {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u32;
|
||||
type Nonce = u32;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = ::sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -114,7 +114,7 @@ pub mod mock {
|
||||
use sp_runtime::{testing::H256, BuildStorage};
|
||||
|
||||
type AccountId = u64;
|
||||
type AccountIndex = u32;
|
||||
type Nonce = u32;
|
||||
|
||||
type Block = frame_system::mocking::MockBlock<Test>;
|
||||
|
||||
@@ -131,7 +131,7 @@ pub mod mock {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = AccountIndex;
|
||||
type Nonce = Nonce;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = ::sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -82,7 +82,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -92,7 +92,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = u64;
|
||||
|
||||
@@ -62,7 +62,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -65,7 +65,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -96,7 +96,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -309,7 +309,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -57,7 +57,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -56,7 +56,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -83,7 +83,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -208,7 +208,7 @@ impl frame_system::Config for Runtime {
|
||||
type SS58Prefix = ();
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -64,7 +64,7 @@ frame_support::construct_runtime!(
|
||||
);
|
||||
|
||||
pub(crate) type AccountId = u128;
|
||||
pub(crate) type AccountIndex = u32;
|
||||
pub(crate) type Nonce = u32;
|
||||
pub(crate) type BlockNumber = u64;
|
||||
pub(crate) type Balance = u64;
|
||||
pub(crate) type VoterIndex = u32;
|
||||
@@ -77,7 +77,7 @@ impl frame_system::Config for Runtime {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = AccountIndex;
|
||||
type Nonce = Nonce;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -190,6 +190,7 @@ mod tests {
|
||||
use sp_npos_elections::Support;
|
||||
use sp_runtime::Perbill;
|
||||
type AccountId = u64;
|
||||
type Nonce = u64;
|
||||
type BlockNumber = u64;
|
||||
|
||||
pub type Header = sp_runtime::generic::Header<BlockNumber, sp_runtime::traits::BlakeTwo256>;
|
||||
@@ -207,7 +208,7 @@ mod tests {
|
||||
type SS58Prefix = ();
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = AccountId;
|
||||
type Nonce = Nonce;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_core::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -1323,7 +1323,7 @@ mod tests {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -51,7 +51,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -137,7 +137,7 @@ pub mod tests {
|
||||
|
||||
// all of this is coming from `frame_system::config_preludes::TestDefaultConfig`.
|
||||
|
||||
// type Index = u32;
|
||||
// type Nonce = u32;
|
||||
// type BlockNumber = u32;
|
||||
// type Header =
|
||||
// sp_runtime::generic::Header<frame_system::pallet_prelude::BlockNumberFor<Self>,
|
||||
|
||||
@@ -45,7 +45,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -53,7 +53,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 = sp_core::sr25519::Public;
|
||||
|
||||
@@ -868,7 +868,7 @@ mod tests {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_core::H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -32,7 +32,7 @@ use pallet_staking::{Exposure, IndividualExposure, StakerStatus};
|
||||
use sp_std::prelude::*;
|
||||
|
||||
pub type AccountId = u128;
|
||||
pub type AccountIndex = u32;
|
||||
pub type Nonce = u32;
|
||||
pub type BlockNumber = u64;
|
||||
pub type Balance = u128;
|
||||
pub type T = Runtime;
|
||||
@@ -50,7 +50,7 @@ impl frame_system::Config for Runtime {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = AccountIndex;
|
||||
type Nonce = Nonce;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_core::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -44,7 +44,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -69,7 +69,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -49,7 +49,7 @@ impl frame_system::Config for Test {
|
||||
type BlockWeights = ();
|
||||
type BlockLength = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -119,7 +119,7 @@ impl frame_system::Config for Runtime {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -42,7 +42,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 = ::sp_runtime::traits::BlakeTwo256;
|
||||
type AccountId = u64;
|
||||
|
||||
@@ -195,7 +195,7 @@ mod tests {
|
||||
type BlockLength = BlockLength;
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -53,7 +53,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -556,7 +556,7 @@ mod tests {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -41,7 +41,7 @@ impl frame_system::Config for Test {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = sp_core::sr25519::Public;
|
||||
|
||||
@@ -56,7 +56,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -49,7 +49,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -49,7 +49,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -55,7 +55,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = AccountId;
|
||||
|
||||
@@ -52,7 +52,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = AccountId;
|
||||
|
||||
@@ -260,7 +260,7 @@ mod tests {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -56,7 +56,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = u64;
|
||||
|
||||
@@ -49,7 +49,7 @@ impl frame_system::Config for Test {
|
||||
type BlockWeights = ();
|
||||
type BlockLength = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -24,7 +24,7 @@ use sp_runtime::{
|
||||
};
|
||||
|
||||
type AccountId = u128;
|
||||
type AccountIndex = u32;
|
||||
type Nonce = u32;
|
||||
type BlockNumber = u64;
|
||||
type Balance = u128;
|
||||
|
||||
@@ -34,7 +34,7 @@ impl frame_system::Config for Runtime {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = AccountIndex;
|
||||
type Nonce = Nonce;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_core::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -168,7 +168,7 @@ impl frame_system::Config for Runtime {
|
||||
type SS58Prefix = ();
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_core::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -29,7 +29,7 @@ use sp_runtime::{
|
||||
};
|
||||
|
||||
type AccountId = u128;
|
||||
type AccountIndex = u32;
|
||||
type Nonce = u32;
|
||||
type BlockNumber = u64;
|
||||
type Balance = u128;
|
||||
|
||||
@@ -44,7 +44,7 @@ impl frame_system::Config for Runtime {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = AccountIndex;
|
||||
type Nonce = Nonce;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_core::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -34,7 +34,7 @@ use sp_runtime::{
|
||||
};
|
||||
|
||||
type AccountId = u64;
|
||||
type AccountIndex = u32;
|
||||
type Nonce = u32;
|
||||
type Balance = u64;
|
||||
|
||||
impl frame_system::Config for Test {
|
||||
@@ -43,7 +43,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = AccountIndex;
|
||||
type Nonce = Nonce;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_core::H256;
|
||||
type Hashing = ::sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -81,7 +81,7 @@ impl frame_system::Config for Runtime {
|
||||
type BlockLength = ();
|
||||
type DbWeight = RocksDbWeight;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -50,7 +50,7 @@ impl frame_system::Config for Test {
|
||||
type DbWeight = RocksDbWeight;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = u64;
|
||||
|
||||
@@ -53,7 +53,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -51,7 +51,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -48,7 +48,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 = u64;
|
||||
|
||||
@@ -65,7 +65,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -42,7 +42,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = u64;
|
||||
|
||||
@@ -87,7 +87,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -55,7 +55,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -125,7 +125,7 @@ impl system::Config for Test {
|
||||
type DbWeight = RocksDbWeight;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = u64;
|
||||
|
||||
@@ -56,7 +56,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -27,7 +27,7 @@ use frame_support::{
|
||||
use sp_runtime::{traits::IdentityLookup, BuildStorage};
|
||||
|
||||
type AccountId = u64;
|
||||
type AccountIndex = u32;
|
||||
type Nonce = u32;
|
||||
type Balance = u64;
|
||||
|
||||
type Block = frame_system::mocking::MockBlock<Test>;
|
||||
@@ -48,7 +48,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = AccountIndex;
|
||||
type Nonce = Nonce;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_core::H256;
|
||||
type Hashing = ::sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -238,7 +238,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -64,7 +64,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -43,7 +43,7 @@ pub const BLOCK_TIME: u64 = 1000;
|
||||
|
||||
/// The AccountId alias in this test module.
|
||||
pub(crate) type AccountId = u64;
|
||||
pub(crate) type AccountIndex = u64;
|
||||
pub(crate) type Nonce = u64;
|
||||
pub(crate) type BlockNumber = u64;
|
||||
pub(crate) type Balance = u128;
|
||||
|
||||
@@ -124,7 +124,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = RocksDbWeight;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = AccountIndex;
|
||||
type Nonce = Nonce;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = ::sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -1087,7 +1087,7 @@ mod mock {
|
||||
type BlockLength = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = u64;
|
||||
|
||||
@@ -54,7 +54,7 @@ impl frame_system::Config for Test {
|
||||
type DbWeight = RocksDbWeight;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = AccountId32;
|
||||
|
||||
@@ -115,7 +115,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 = u64;
|
||||
|
||||
@@ -873,7 +873,7 @@ pub fn storage_alias(_: TokenStream, input: TokenStream) -> TokenStream {
|
||||
/// type BlockWeights = ();
|
||||
/// type BlockLength = ();
|
||||
/// type DbWeight = ();
|
||||
/// type Index = u64;
|
||||
/// type Nonce = u64;
|
||||
/// type BlockNumber = u64;
|
||||
/// type Hash = sp_core::hash::H256;
|
||||
/// type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
@@ -908,7 +908,7 @@ pub fn storage_alias(_: TokenStream, input: TokenStream) -> TokenStream {
|
||||
/// type BlockWeights = <TestDefaultConfig as DefaultConfig>::BlockWeights;
|
||||
/// type BlockLength = <TestDefaultConfig as DefaultConfig>::BlockLength;
|
||||
/// type DbWeight = <TestDefaultConfig as DefaultConfig>::DbWeight;
|
||||
/// type Index = <TestDefaultConfig as DefaultConfig>::Index;
|
||||
/// type Nonce = <TestDefaultConfig as DefaultConfig>::Nonce;
|
||||
/// type BlockNumber = <TestDefaultConfig as DefaultConfig>::BlockNumber;
|
||||
/// type Hash = <TestDefaultConfig as DefaultConfig>::Hash;
|
||||
/// type Hashing = <TestDefaultConfig as DefaultConfig>::Hashing;
|
||||
|
||||
@@ -45,7 +45,6 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
pub type Signature = sr25519::Signature;
|
||||
pub type AccountId = <Signature as Verify>::Signer;
|
||||
pub type BlockNumber = u64;
|
||||
pub type Index = u64;
|
||||
|
||||
parameter_types! {
|
||||
pub const Version: RuntimeVersion = VERSION;
|
||||
@@ -55,7 +54,7 @@ impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = Everything;
|
||||
type BlockWeights = ();
|
||||
type BlockLength = ();
|
||||
type Index = u128;
|
||||
type Nonce = u128;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type Block = Block;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ impl pallet::Config for Runtime {}
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_runtime::testing::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use frame_support::construct_runtime;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
use sp_core::sr25519;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
@@ -18,22 +18,22 @@ mod pallet {
|
||||
|
||||
#[derive(scale_info::TypeInfo, frame_support::PalletError, codec::Encode, codec::Decode)]
|
||||
pub enum Nested1 {
|
||||
Nested2(Nested2)
|
||||
Nested2(Nested2),
|
||||
}
|
||||
|
||||
#[derive(scale_info::TypeInfo, frame_support::PalletError, codec::Encode, codec::Decode)]
|
||||
pub enum Nested2 {
|
||||
Nested3(Nested3)
|
||||
Nested3(Nested3),
|
||||
}
|
||||
|
||||
#[derive(scale_info::TypeInfo, frame_support::PalletError, codec::Encode, codec::Decode)]
|
||||
pub enum Nested3 {
|
||||
Nested4(Nested4)
|
||||
Nested4(Nested4),
|
||||
}
|
||||
|
||||
#[derive(scale_info::TypeInfo, frame_support::PalletError, codec::Encode, codec::Decode)]
|
||||
pub enum Nested4 {
|
||||
Num(u8)
|
||||
Num(u8),
|
||||
}
|
||||
|
||||
pub type Signature = sr25519::Signature;
|
||||
@@ -47,7 +47,7 @@ impl pallet::Config for Runtime {}
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_runtime::testing::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use frame_support::construct_runtime;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
use sp_core::sr25519;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
@@ -22,7 +22,7 @@ impl pallet::Config for Runtime {}
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_runtime::testing::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use frame_support::construct_runtime;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
use sp_core::sr25519;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
@@ -22,7 +22,7 @@ impl pallet::Config for Runtime {}
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_runtime::testing::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
use frame_support::construct_runtime;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
use sp_core::sr25519;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
@@ -22,7 +22,7 @@ impl pallet::Config for Runtime {}
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_runtime::testing::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use frame_support::construct_runtime;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
use sp_core::sr25519;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
@@ -22,7 +22,7 @@ impl pallet::Config for Runtime {}
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_runtime::testing::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use frame_support::construct_runtime;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
use sp_core::sr25519;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
@@ -22,7 +22,7 @@ impl pallet::Config for Runtime {}
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_runtime::testing::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ impl pallet::Config for Runtime {}
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_runtime::testing::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -656,7 +656,7 @@ frame_support::parameter_types!(
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_runtime::testing::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -291,7 +291,7 @@ pub mod pallet2 {
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_runtime::testing::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -5,7 +5,7 @@ mod pallet {
|
||||
#[pallet::config]
|
||||
pub trait Config: frame_system::Config
|
||||
where
|
||||
<Self as frame_system::Config>::Index: From<u128>,
|
||||
<Self as frame_system::Config>::Nonce: From<u128>,
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ mod pallet {
|
||||
#[pallet::config]
|
||||
pub trait Config: frame_system::Config
|
||||
where
|
||||
<Self as frame_system::Config>::Index: From<u128>,
|
||||
<Self as frame_system::Config>::Nonce: From<u128>,
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ mod pallet {
|
||||
#[pallet::config]
|
||||
pub trait Config: frame_system::Config
|
||||
where
|
||||
<Self as frame_system::Config>::Index: From<u128>,
|
||||
<Self as frame_system::Config>::Nonce: From<u128>,
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ mod pallet {
|
||||
#[pallet::config]
|
||||
pub trait Config: frame_system::Config
|
||||
where
|
||||
<Self as frame_system::Config>::Index: From<u128>,
|
||||
<Self as frame_system::Config>::Nonce: From<u128>,
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use frame_support::{
|
||||
traits::{
|
||||
ConstU32,
|
||||
},
|
||||
};
|
||||
use frame_support::traits::ConstU32;
|
||||
|
||||
pub use pallet::*;
|
||||
|
||||
@@ -60,7 +56,7 @@ pub mod pallet {
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_runtime::testing::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
@@ -96,17 +92,15 @@ frame_support::construct_runtime!(
|
||||
}
|
||||
);
|
||||
|
||||
impl pallet::Config for Runtime {
|
||||
|
||||
}
|
||||
impl pallet::Config for Runtime {}
|
||||
|
||||
fn main() {
|
||||
use frame_support::{pallet_prelude::*};
|
||||
use storage::unhashed;
|
||||
use frame_support::pallet_prelude::*;
|
||||
use sp_io::{
|
||||
hashing::{blake2_128, twox_128},
|
||||
TestExternalities,
|
||||
};
|
||||
use storage::unhashed;
|
||||
|
||||
fn blake2_128_concat(d: &[u8]) -> Vec<u8> {
|
||||
let mut v = blake2_128(d).to_vec();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use frame_support::construct_runtime;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
use sp_core::sr25519;
|
||||
use sp_runtime::{generic, traits::BlakeTwo256};
|
||||
|
||||
pub type Signature = sr25519::Signature;
|
||||
pub type BlockNumber = u32;
|
||||
@@ -13,7 +13,7 @@ impl test_pallet::Config for Runtime {}
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_runtime::testing::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -1,17 +1,24 @@
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
#[pallet::config]
|
||||
pub trait Config: frame_system::Config where <Self as frame_system::Config>::Index: From<u128> {}
|
||||
pub trait Config: frame_system::Config
|
||||
where
|
||||
<Self as frame_system::Config>::Nonce: From<u128>,
|
||||
{
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> where <T as frame_system::Config>::Index: From<u128> {}
|
||||
impl<T: Config> Pallet<T> where <T as frame_system::Config>::Nonce: From<u128> {}
|
||||
|
||||
impl<T: Config> Pallet<T> where <T as frame_system::Config>::Index: From<u128> {
|
||||
impl<T: Config> Pallet<T>
|
||||
where
|
||||
<T as frame_system::Config>::Nonce: From<u128>,
|
||||
{
|
||||
fn foo(x: u128) {
|
||||
let _index = <T as frame_system::Config>::Index::from(x);
|
||||
let _index = <T as frame_system::Config>::Nonce::from(x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ use scale_info::{form::MetaForm, meta_type};
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
|
||||
pub type BlockNumber = u64;
|
||||
pub type Index = u64;
|
||||
pub type Header = sp_runtime::generic::Header<u32, sp_runtime::traits::BlakeTwo256>;
|
||||
pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>;
|
||||
pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic<u32, RuntimeCall, (), ()>;
|
||||
@@ -36,7 +35,7 @@ impl frame_system::Config for Runtime {
|
||||
type DbWeight = ();
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_runtime::testing::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -58,7 +58,7 @@ pub mod pallet {
|
||||
}
|
||||
|
||||
pub type BlockNumber = u32;
|
||||
pub type Index = u64;
|
||||
pub type Nonce = u64;
|
||||
pub type AccountId = u64;
|
||||
pub type Header = sp_runtime::generic::Header<BlockNumber, sp_runtime::traits::BlakeTwo256>;
|
||||
pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic<u32, RuntimeCall, (), ()>;
|
||||
@@ -70,7 +70,7 @@ impl frame_system::Config for Runtime {
|
||||
type BlockLength = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = Index;
|
||||
type Nonce = Nonce;
|
||||
type Hash = sp_runtime::testing::H256;
|
||||
type Hashing = sp_runtime::traits::BlakeTwo256;
|
||||
type AccountId = AccountId;
|
||||
|
||||
@@ -33,7 +33,7 @@ The System module defines the following extensions:
|
||||
- [`CheckWeight`]: Checks the weight and length of the block and ensure that it does not
|
||||
exceed the limits.
|
||||
- [`CheckNonce`]: Checks the nonce of the transaction. Contains a single payload of type
|
||||
`T::Index`.
|
||||
`T::Nonce`.
|
||||
- [`CheckEra`]: Checks the era of the transaction. Contains a single payload of type `Era`.
|
||||
- [`CheckGenesis`]: Checks the provided genesis hash of the transaction. Must be a part of the
|
||||
signed payload of the transaction.
|
||||
|
||||
@@ -63,7 +63,7 @@ impl frame_system::Config for Runtime {
|
||||
type BlockLength = BlockLength;
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
|
||||
@@ -23,7 +23,7 @@ use codec::Encode;
|
||||
use sp_runtime::{traits::IdentityLookup, BuildStorage};
|
||||
|
||||
type AccountId = u64;
|
||||
type AccountIndex = u32;
|
||||
type Nonce = u32;
|
||||
|
||||
type Block = frame_system::mocking::MockBlock<Test>;
|
||||
|
||||
@@ -40,7 +40,7 @@ impl frame_system::Config for Test {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = AccountIndex;
|
||||
type Nonce = Nonce;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hash = sp_core::H256;
|
||||
type Hashing = ::sp_runtime::traits::BlakeTwo256;
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
sp_api::decl_runtime_apis! {
|
||||
/// The API to query account nonce (aka transaction index).
|
||||
pub trait AccountNonceApi<AccountId, Index> where
|
||||
/// The API to query account nonce.
|
||||
pub trait AccountNonceApi<AccountId, Nonce> where
|
||||
AccountId: codec::Codec,
|
||||
Index: codec::Codec,
|
||||
Nonce: codec::Codec,
|
||||
{
|
||||
/// Get current account nonce of given `AccountId`.
|
||||
fn account_nonce(account: AccountId) -> Index;
|
||||
fn account_nonce(account: AccountId) -> Nonce;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,11 +37,11 @@ use sp_std::vec;
|
||||
/// some kind of priority upon validating transactions.
|
||||
#[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo)]
|
||||
#[scale_info(skip_type_params(T))]
|
||||
pub struct CheckNonce<T: Config>(#[codec(compact)] pub T::Index);
|
||||
pub struct CheckNonce<T: Config>(#[codec(compact)] pub T::Nonce);
|
||||
|
||||
impl<T: Config> CheckNonce<T> {
|
||||
/// utility constructor. Used only in client/factory code.
|
||||
pub fn from(nonce: T::Index) -> Self {
|
||||
pub fn from(nonce: T::Nonce) -> Self {
|
||||
Self(nonce)
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,7 @@ where
|
||||
}
|
||||
.into())
|
||||
}
|
||||
account.nonce += T::Index::one();
|
||||
account.nonce += T::Nonce::one();
|
||||
crate::Account::<T>::insert(who, account);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user