Appendix C: Governance DApps
Optional depending on setup (POSDAO does not use Governance DApps)
There are three DApps for governance:
Each of these DApps contains a src/utils/constants.js script which defines a path to poa-chain-spec repo containing the current addresses and ABIs of consensus contracts in the network (in the corresponding branches: core - for Core network, sokol - for Sokol network).
In order to use DApp in your network:
  1. 1.
    Fork poa-chain-spec repo and create the branch for your network.
    DApps use the following files and directories from poa-chain-spec:
    • abis (contains the ABIs of consensus contracts). Make sure you only have ABI in each *.abi.json file (not combined json obtained by solc compiler). The example of the correct .abi.json file;
    • contracts.json (contains the addresses of consensus contracts and the address of Master of Ceremony).
  2. 2.
    Edit src/utils/constants.js and adjust the following:
    • change constants.organization to the name of your organization on GitHub;
    • make constants.NETWORKS describe your network, e.g.:
      constants.NETWORKS = {
      '1234': { // network ID
      NAME: 'NetworkName',
      FULLNAME: 'Network Full Name', // only for Voting DApp and Validators DApp
      RPC: 'https://<rpc.address>', // only for Voting DApp and Validators DApp
      BRANCH: 'branch', // name of the branch in your poa-chain-spec repo
      TESTNET: true, // is it testnet or mainnet? Affects UI colors in Ceremony DApp
      SORTORDER: 4 // sort order for networks drop-down list on UI (for Voting DApp and Validators DApp)
      constants.NETWORKS can contain several networks.
  3. 3.
    Launch DApps on your domain names. To host DApps you can use Netlify (GitHub account is needed) or a similar platform.
Export as PDF
Copy link