Documentation

Preswparing a contract for an election

There are helper scripts for initializing a new community, inducting the slate of genesis members, and opting them in/out of an election. These are located in the /scripts directory in Github.

If you need to deploy contracts to a testnet, see the contracts documentation in Github here.

Election States

Manipulating election state

For development purposes, we can manipulate election state (mostly timelines) using the contracts settablerows action. But this action is only available if you deployed the contract built using the EDEN_ENABLE_SET_TABLE_ROWS=yes flag. This is useful for testing locally and on testnets. Obviously, it should never be deployed in production.

Moving an election to an earlier date

Elections are automatically scheduled 6 months from the end of the completion of an election. But, this can be moved forward!

When an election is scheduled, the election state (elect.curr table) is in the current_election_state_registration state. During this time and up to 24 hours prior to the scheduled election time, users can opt in and further update their registration status.

A minimum of 12 members must opt in for an election to be held. Use the electopt action for this. Before you start an election, make sure you've registered 12+ members.

Once you have your members registered, it's time to move up the election start time. Modify the start_time value in the elect.curr table. To do that:

  1. Modify the start_time in the variant below, keeping in mind times are UTC. (Copy the variant value from the table and modify that one.) You want to leave time for you to seed the randomizer before the election begins, so give yourself a comfortable 10 minutes from now.