-
Install package
yarn
-
Create .env file from .env.example
-
Fill value in .env:
ETHERSCAN_API_KEY
: Etherscan api key to verify contractRPC_URL
: rpc for deploymentACC_PRIVATE_KEY
: account which deploy all contract. This account will be setadmin
inCHNTimelock
andguardian
inCHNGovernance
. Need deposit ETH to deploy contractCHN_STAKING_ADDRESS
: address staking contract.POOl_ID_STAKING
: pool id in staking contract. Weight vote of user will be calculate by amount staking in this pool ofCHN_STAKING_ADDRESS
.QUORUM_VOTES
: The required minimum number of votes in support of a proposal for it to succeed.PROPOSAL_THRESHOLD
: The minimum number of votes required for an account to create a proposal.PROPOSAL_MAXOPERATIONS
: The maximum number of actions that can be included in a proposal. Actions are functions calls that will be made when a proposal succeeds and executesVOTING_DELAY
: The number of Ethereum blocks to wait before voting on a proposal may begin. This value is added to the current block number when a proposal is created.VOTING_PERIOD
: The duration of voting on a proposal, in Ethereum blocks.TIMELOCK_DELAY
: Time delay to queue transaction in timelock. The unit is in seconds.
-
Compile
yarn hardhat compile
-
Deploy + verify:
yarn hardhat deploy --reset --tags deploy-verify --network rinkeby
This script will deploy + verify both timelock contract and governance contract. After that, this will queue transaction which set chn governance address as a pending admin for time lock. After
TIMELOCK_DELAY
+ 1000 seconds, you need excute it in queue + confirm it in chn governance contract.
-
Notifications
You must be signed in to change notification settings - Fork 3
Onyx-Protocol/governance
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
XCN governance smart contract
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published