Amar Singh 8e0feecc14 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>
2024-11-04 09:59:47 -04:00
2024-08-07 11:41:55 -04:00
2024-08-07 11:41:55 -04:00
2023-12-05 20:53:06 +03:00
2023-12-11 17:59:25 +04:00
2024-04-29 12:06:24 +04:00

OpenZeppelin Runtime Templates for Substrate

Polkadot SDK has a steep learning curve. In order to make it easier for newcomers to get started, OpenZeppelin is providing runtime templates that can be used to quickly bootstrap a Substrate project using Polkadot SDK.

Along with the templates, OpenZeppelin also provides a documentation website that explains the templates and the details.

About this repository and templates

This repository contains all of our templates. Each template has its own sub-directory, is completely standalone, and can be used independently.

For example: if you want to use our generic runtime template, you can just copy that subdirectory, and it will work on its own. You don't need anything from other templates nor from the root directory of this repository for your selected template to work.


Warning

Avoid using main for production deployments and use release branches instead. main is a development branch that should be avoided in favor of tagged releases. The release process involves security measures that the main branch does not guarantee.

Generic Runtime Template

This template has all the basic features you expect to find on a typical L1 blockchain or parachain. Basic, yet preserving the most important pallets that are used in the Polkadot ecosystem today and a safe runtime base configuration. You can find a full list of the pallets included in this template in our docs

EVM template

This template uses frontier pallets and has EVM compatibility out of the box. You can migrate your solidity contracts or EVM compatible dapps easily to your parachain using this template. Here are some of the key features included:

  • 20 byte addresses: Existing tooling works out of the box, no more awkward conversion, this template handles that for you.
  • Account Abstraction support: The Entrypoint contract is included as part of the pre-deployed contracts that will be in the genesis block.
  • Extensible pre-deployed contracts: In addition to the entrypoint, you can add your own smart contract to be included in the genesis block.

For a step by step guide on how to deploy this to your own local environment using Zombienet check this tutorial

How to use

Please refer to our docs for a quick start guide.

Security

Past audits can be found in /audits directory in the respective template's directory.

Refer to SECURITY.md for more details.

License

OpenZeppelin Runtime Templates are released under the GNU v3 License.

S
Description
No description provided
Readme GPL-3.0 8.2 MiB
Languages
Rust 97.9%
Python 1%
Shell 1%