Collectives: Creating New Collectives - frequency-chain/frequency GitHub Wiki

HOW TO: Add a New Collective

when democracy/collectives are already present

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.
  1. Edit all runtime configs, in our case, frequency/src/lib.rs and frequency-rococo/src/lib.rs:
    1. Create a new instance where “N” is the next incremental instance number: GreatCouncilInstance = pallet_collective::InstanceN
    2. Set up the configuration for the instance similarly to the other collectives.
    3. Add the new instance to construct_runtime!
  2. Update initial members:
    • Prelaunch: Edit all chain spec files - in our case frequency.rs, frequency_rococo.rs, and frequency_local.rs:
      1. Import the C> onfig: add GreatCouncilConfig to the use frequency_runtime::{} import line at the top of the file.
      2. Update the genesis functions: Add a parameter (e.g. great_council_members) for the collective to each genesis function:
        • frequency_genesis
        • frequency_rococo_genesis
        • testnet_genesis
      3. 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,
        • frequency
        • frequency_rococo_testnet
    • Postlaunch: TBD
  3. Update Spec Version: See https://github.com/LibertyDSNP/frequency/wiki/Forkless-Upgrades

You should have changes to:

  • All files in node/service/src/chain_spec/<runtime>.rs
  • all <runtime>/src/lib.rs files
  • Note: The js/api-augment package is updated automatically in CI, but would also have changes.
⚠️ **GitHub.com Fallback** ⚠️