mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 06:27:58 +00:00
add frame_system::DefaultConfig to individual pallet DefaultConfigs (#14453)
* add frame_system::DefaultConfig to individual pallet DefaultConfigs * Fixes tests * Minor fix * ".git/.scripts/commands/fmt/fmt.sh" * Adds UI Tests --------- Co-authored-by: Nikhil Gupta <17176722+gupnik@users.noreply.github.com> Co-authored-by: command-bot <>
This commit is contained in:
@@ -23,16 +23,12 @@ use super::*;
|
||||
|
||||
use crate as pallet_multisig;
|
||||
use frame_support::{
|
||||
assert_noop, assert_ok,
|
||||
assert_noop, assert_ok, derive_impl,
|
||||
traits::{ConstU32, ConstU64, Contains},
|
||||
};
|
||||
use sp_core::H256;
|
||||
use sp_runtime::{
|
||||
traits::{BlakeTwo256, IdentityLookup},
|
||||
BuildStorage, TokenError,
|
||||
};
|
||||
use sp_runtime::{BuildStorage, TokenError};
|
||||
|
||||
type Block = frame_system::mocking::MockBlock<Test>;
|
||||
type Block = frame_system::mocking::MockBlockU32<Test>;
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
@@ -43,46 +39,28 @@ frame_support::construct_runtime!(
|
||||
}
|
||||
);
|
||||
|
||||
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
|
||||
impl frame_system::Config for Test {
|
||||
type BaseCallFilter = TestBaseCallFilter;
|
||||
type BlockWeights = ();
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Nonce = u64;
|
||||
type Hash = H256;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = u64;
|
||||
type Lookup = IdentityLookup<Self::AccountId>;
|
||||
type Block = Block;
|
||||
type BlockHashCount = ConstU32<250>;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type BlockHashCount = ConstU64<250>;
|
||||
type Version = ();
|
||||
type BaseCallFilter = TestBaseCallFilter;
|
||||
type PalletInfo = PalletInfo;
|
||||
type AccountData = pallet_balances::AccountData<u64>;
|
||||
type OnNewAccount = ();
|
||||
type OnKilledAccount = ();
|
||||
type SystemWeightInfo = ();
|
||||
type SS58Prefix = ();
|
||||
type OnSetCode = ();
|
||||
type MaxConsumers = ConstU32<16>;
|
||||
|
||||
type AccountData = pallet_balances::AccountData<u64>;
|
||||
}
|
||||
|
||||
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)]
|
||||
impl pallet_balances::Config for Test {
|
||||
type MaxLocks = ();
|
||||
type MaxReserves = ();
|
||||
type ReserveIdentifier = [u8; 8];
|
||||
type Balance = u64;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type DustRemoval = ();
|
||||
type ExistentialDeposit = ConstU64<1>;
|
||||
type AccountStore = System;
|
||||
type WeightInfo = ();
|
||||
type FreezeIdentifier = ();
|
||||
type MaxFreezes = ();
|
||||
type RuntimeHoldReason = ();
|
||||
type MaxHolds = ();
|
||||
type ReserveIdentifier = [u8; 8];
|
||||
type DustRemoval = ();
|
||||
type AccountStore = System;
|
||||
type ExistentialDeposit = ConstU64<1>;
|
||||
}
|
||||
|
||||
pub struct TestBaseCallFilter;
|
||||
@@ -120,7 +98,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities {
|
||||
ext
|
||||
}
|
||||
|
||||
fn now() -> Timepoint<u64> {
|
||||
fn now() -> Timepoint<u32> {
|
||||
Multisig::timepoint()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user