Skip to content

Fantom-foundation/fantom-govern

Repository files navigation

Governance contract

Governance contract supports on-chain voting by arbitrary members on arbitrary topics. Each voting topic is called a "proposal".

The contract is designed to be universal and flexible:

  • The governance isn't coupled to any specific staking contract, but relies on an interface to get voter weights.
  • It supports multi-delegations between voters. A voter can delegate their vote to another voter.
  • It supports on-chain execution of the proposals. On approval, each proposal may perform arbitrary actions on behalf of the governance contract.
  • The contract permits multiple options for proposals, and multiple degrees of an agreement for each vote.
  • An arbitrary number of proposal templates are permitted. Each proposal can specify its parameters (such as voting turnout or deadlines) within the boundaries of a template.
  • It can handle an arbitrary number of active proposals simultaneously.
  • The contract can also support an arbitrary number of active voters simultaneously.

Wiki

Check out the wiki to get more details.

Compile

Before compiling for the first time you need to install the dependencies using npm install.
To compile the contracts, run: make

Test

To run hardhat tests, run: make test