Governance Contracts
The governance contracts can be found here:
dappgovernance/contract at main Β· liquidapps-io/dappgovernance
GitHub
Here is an overview of the params:
1
// Some code/*
2
​
3
asset proposer_fee - fee to propose
4
uint32_t accept_vote_per - min amount of total supply of token that must vote
5
uint32_t approved_vote_per - percentage of voting tokens that must participate
6
symbol tokensymbol - token symbol supported
7
name tokencontract - token contract associated with symbol
8
uint32_t timelock_hours - time before approved proposal can be deemed added to implementation que or rejected
9
uint32_t approval_hours - time before accepted proposal can be approved or rejected
10
uint32_t accepted_hours - time before created proposal is accepted or expires
11
uint32_t unlock_hours - time before user funds can be unlocked
12
name feecontract - contract to receive fees
13
asset userreward - user reward for submitting proposal
14
name rewardacc - account to receive rewards
15
asset minlockamt - min amount that can be locked for governance purposes
16
​
17
*/
Copied!
To initialize the contracts see the following cleos example:
1
cleos -u https://eos.greymass.com push transaction '{
2
"delay_sec": 0,
3
"max_cpu_usage_ms": 0,
4
"actions": [
5
{
6
"account": "dappgovernor",
7
"name": "setconfig",
8
"data": {
9
"proposer_fee": "1000.0000 DAPP",
10
"accept_vote_per": 2,
11
"approved_vote_per": 10,
12
"tokensymbol": "4,DAPP",
13
"tokencontract": "dappservices",
14
"timelock_hours": 48,
15
"approval_hours": 72,
16
"accepted_hours": 720,
17
"unlock_hours": 336,
18
"feecontract": "dappgovfeess",
19
"userreward": "1.0000 DAPP",
20
"rewardacc": "dappgovfund1",
21
"minlockamt": "1000.0000 DAPP"
22
},
23
"authorization": [
24
{
25
"actor": "dappgovernor",
26
"permission": "active"
27
}
28
]
29
}
30
]
31
}'
Copied!
Last modified 1mo ago
Copy link