Governance Contracts

The governance contracts can be found here:

Here is an overview of the params:

// Some code/*

    asset proposer_fee - fee to propose
    uint32_t accept_vote_per - min amount of total supply of token that must vote
    uint32_t approved_vote_per - percentage of voting tokens that must participate
    symbol tokensymbol - token symbol supported
    name tokencontract - token contract associated with symbol
    uint32_t timelock_hours - time before approved proposal can be deemed added to implementation que or rejected
    uint32_t approval_hours - time before accepted proposal can be approved or rejected
    uint32_t accepted_hours - time before created proposal is accepted or expires
    uint32_t unlock_hours - time before user funds can be unlocked
    name feecontract - contract to receive fees
    asset userreward - user reward for submitting proposal
    name rewardacc - account to receive rewards
    asset minlockamt - min amount that can be locked for governance purposes

*/

To initialize the contracts see the following cleos example:

cleos -u https://eos.greymass.com push transaction '{
  "delay_sec": 0,
  "max_cpu_usage_ms": 0,
  "actions": [
    {
      "account": "dappgovernor",
      "name": "setconfig",
      "data": {
        "proposer_fee": "1000.0000 DAPP",
        "accept_vote_per": 2,
        "approved_vote_per": 10,
        "tokensymbol": "4,DAPP",
        "tokencontract": "dappservices",
        "timelock_hours": 48,
        "approval_hours": 72,
        "accepted_hours": 720,
        "unlock_hours": 336,
        "feecontract": "dappgovfeess",
        "userreward": "1.0000 DAPP",
        "rewardacc": "dappgovfund1",
        "minlockamt": "1000.0000 DAPP"
      },
      "authorization": [
        {
          "actor": "dappgovernor",
          "permission": "active"
        }
      ]
    }
  ]
}'

And this example transaction: https://www.bloks.io/transaction/eb40c9cf55c7d285557b47650510629ff4fc8ab1180a22d939f3bf639f0a735e

Last updated