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.
current_election_state_registration_v1
- election state while election registration is open and after registration closes up until someone has seeded the randomizercurrent_election_state_seeding_v1
- election state before election has begun and after a seed has been submitted to the randomizer successfullycurrent_election_state_init_voters_v1
- election state when someone calls electprocess
but it needs to be called again, and possibly with a higher value.current_election_state_active
- election is in progresscurrent_election_state_post_round
- electprocess
has been called after round time is up, however it needs to be called again, and possible with a higher value.current_election_state_final
- chiefs are known...pending sortition (this is the same state both before and after a seed has been submitted.) After time for this round elapses, electprocess
will complete the election, select a Head Chief, and move us back to the top (registration.) A new election is also scheduled 6 months out.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.
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:
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.