mirror of
https://github.com/pezkuwichain/pezkuwi-runtime-templates.git
synced 2026-06-14 02:51:01 +00:00
Pallet grouping macros (#300)
* init using relative paths for now * not working * cannot define same types with alias names in 2 places relalias todo * node compiles using impl oz system to abstract over frame system * clean * timestamp * parachain info * preimage and scheduler * proxy and balances * utility and parachain system * use construct openzeppelin runtime * generic runtime apis * pause construct runtime until other macros validated by cross template usage * hold runtime construction until inner macros validated * evm template impl openzeppelin system * revert back to generic construct runtime minimal wrapper for now * use the trivial versions for the construct runtime and impl runtime api macros for now * fix system grouping macro name * consensus wrapper in generic template * include ExistentialDeposit as explicit system parameter and add asset grouping for generic * wip governance * wip governnace for generic * rm placeholders for runtime api and construct runtime until implemented * fix evm template after latest changes to system grouping * whitelist * custom origins and referenda to finish governance grouping in generic template * init xcm grouping for generic template queue pallets first * more xcm * replace direct paths with git url and branch for the macro dep * update cargo locks and template fuzzer paths used for constants * use consensus macro for evm template * fix path in generic templates constant tests * fix more test imports for the generic template * fix template fuzzer build for generic template * evm template governance and clean generic governance config as well * impl xcm for evm template compiles w unused imports * clean evm template commented out code and init assets impl for evm template * progress on using impl assets for evm template * error persists despite moving from impls into scope of macro expansion * fix imports to fix errors for assets impl for evm template * init evm works * generic runtime compiles with most recent changeset * update to latest macro changes * move asset manager config into macro expansion as much as possible * fix and clean * update package name use git url and rename marker struct to OpenZeppelinRuntime * compiles * batch merge comment suggestions * expose ProxyType and move defn from macro expansion to types file for each runtime * generic single file config and minimal type aliases * single file evm config need to clean imports and minimize type aliasing next * clean evm template * evm compilation post macro updates * clean evm runtimes * clean generic * toml sort * fix * fmt fixes, supported the last changes --------- Co-authored-by: Nikita Khateev <nikita.khateev@openzeppelin.com>
This commit is contained in:
@@ -5,13 +5,12 @@ use std::{
|
||||
|
||||
// Local Imports
|
||||
use evm_runtime_template::{
|
||||
configs::MaxCandidates, constants::SLOT_DURATION, AccountId, AllPalletsWithSystem, Balance,
|
||||
Balances, EVMChainIdConfig, Executive, Runtime, RuntimeCall, RuntimeOrigin, SudoConfig,
|
||||
UncheckedExtrinsic,
|
||||
constants::SLOT_DURATION, AccountId, AllPalletsWithSystem, Balance, Balances, EVMChainIdConfig,
|
||||
Executive, Runtime, RuntimeCall, RuntimeOrigin, SudoConfig, UncheckedExtrinsic,
|
||||
};
|
||||
use frame_support::{
|
||||
dispatch::GetDispatchInfo,
|
||||
traits::{IntegrityTest, TryState, TryStateSelect},
|
||||
traits::{Get, IntegrityTest, TryState, TryStateSelect},
|
||||
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
|
||||
};
|
||||
use frame_system::Account;
|
||||
@@ -264,7 +263,9 @@ fn recursive_call_filter(call: &RuntimeCall, origin: usize) -> bool {
|
||||
) => false,
|
||||
RuntimeCall::CollatorSelection(
|
||||
pallet_collator_selection::Call::set_desired_candidates { max },
|
||||
) => *max < MaxCandidates::get(),
|
||||
) =>
|
||||
*max < <<Runtime as pallet_collator_selection::Config>::MaxCandidates as Get<u32>>::get(
|
||||
),
|
||||
RuntimeCall::Balances(pallet_balances::Call::force_adjust_total_issuance { .. }) => false,
|
||||
|
||||
_ => true,
|
||||
|
||||
Reference in New Issue
Block a user