-
Notifications
You must be signed in to change notification settings - Fork 24
Collectives: Creating New Collectives
Wil Wade edited this page Jan 8, 2025
·
3 revisions
There will be three structs generated by this process, say for a collective called "GreatCouncil", you will have:
-
GreatCouncil = this is what it's called in
construct_runtime! -
GreatCouncilInstance =
pallet_collective::InstanceN - GreatCouncilConfig = the config that is automatically generated, which must be defined in the chain specs.
-
Edit all runtime configs, in our case,
frequency/src/lib.rsandfrequency-rococo/src/lib.rs:- Create a new instance where “N” is the next incremental instance number:
GreatCouncilInstance = pallet_collective::InstanceN - Set up the configuration for the instance similarly to the other collectives.
- Add the new instance to
construct_runtime!
- Create a new instance where “N” is the next incremental instance number:
- Update initial members:
- Prelaunch: Edit all chain spec files - in our case
frequency.rs,frequency_rococo.rs, andfrequency_local.rs:-
Import the C> onfig: add
GreatCouncilConfigto theuse frequency_runtime::{}import line at the top of the file. -
Update the genesis functions: Add a parameter (e.g.
great_council_members) for the collective to each genesis function:frequency_genesisfrequency_rococo_genesistestnet_genesis
-
Pass and use the values for the new parameters: Add values for the new parameter to all the functions that call the genesis files:
development_config-
local_testnet_config, frequencyfrequency_rococo_testnet
-
Import the C> onfig: add
- Postlaunch: TBD
- Prelaunch: Edit all chain spec files - in our case
- Update Spec Version: See https://github.com/frequency-chain/frequency/wiki/Forkless-Upgrades
- All files in
node/service/src/chain_spec/<runtime>.rs - all
<runtime>/src/lib.rsfiles - Note: The
js/api-augmentpackage is updated automatically in CI, but would also have changes.