Colony SDK browser demo - Motion workflow

Using wallet address

1) Let's connect to the Colony first For testing, it is beneficial to set the period length of the motion phases to very low values (e.g. 2 minutes)

2) Now we approve some of the CLNY of the above wallet for the Colony and the VotingReputation staking, which will remove it from the user's wallet (you only need to do this once for this example)

3) Then, we create a motion to pay some of the native token to Carol: 0x42b9f8673a9187952a5dF24132eEa04268a14BCC (this will also incur reputation if the motion passes) (must be less than the amount that is in the Colony's root team!)

4) Next, we look at the motion more closely

You will see the domainId in which the motion was created, the altTarget (which is the OneTxPayment extension in this case, as we want to execute the `pay` function on it), the encoded action and the stakes remaining for activation.

5) Okay, now we're ready to stake. Feel free to stake any amount, then get the motion again and see how it goes up :)

6) We can also simulate voting. For that, we activate both sides by staking the required amount on both sides from a single address. That usually won't happen in the wild (except if someone wants to force voting for some reason). Stake on both sides and then get the motion data to see if remainingYayStakes and remainingNayStakes are both 0.0

7) Reveal the vote After the voting phase is over the votes can be revealed. Only if a vote is revealed it is counted and the voting reward is paid out

8) If the motion was successful, we can finalize it. In our example we can only finalize it if we wait long enough after staking was only activated for Yay or if we voted for Yay.

Message