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:
Amar Singh
2024-11-04 08:59:47 -05:00
committed by GitHub
parent 2515d4ea2a
commit 8e0feecc14
20 changed files with 555 additions and 1850 deletions
@@ -197,7 +197,7 @@ mod runtime_tests {
#[cfg(feature = "async-backing")]
assert!(AllowMultipleBlocksPerSlot::get());
assert_eq!(MaxAuthorities::get(), 100_000);
assert_eq!(<Runtime as pallet_aura::Config>::MaxAuthorities::get(), 100_000);
}
#[test]
@@ -212,17 +212,17 @@ mod runtime_tests {
assert_eq!(StakingAdminBodyId::get(), BodyId::Defense);
assert_eq!(MaxCandidates::get(), 100);
assert_eq!(<Runtime as pallet_collator_selection::Config>::MaxCandidates::get(), 100);
assert_eq!(MaxInvulnerables::get(), 20);
assert_eq!(<Runtime as pallet_collator_selection::Config>::MaxInvulnerables::get(), 20);
assert_eq!(MinEligibleCollators::get(), 4);
assert_eq!(<Runtime as pallet_collator_selection::Config>::MinEligibleCollators::get(), 4);
}
}
mod xcm_tests {
use frame_support::weights::Weight;
use generic_runtime_template::configs::xcm_config::*;
use generic_runtime_template::configs::*;
#[test]
fn xcm_executor_constants() {