Commit Graph

9 Commits

Author SHA1 Message Date
Sebastian Bor 51df704edb
Governance: Capture realm authority and proposal mint vote supply (#2129)
* chore: move config towards account end to allow potential future grow

* feat: add realm authority to the account

* feat: add governing_token_mint_supply to proposal account

* feat: save realm authority when realm is created

* feat: capture governing mint supply when voting starts

* chore: update comments

* feat: capture governing_token_mint_supply when voting is decided

* Revert "feat: capture governing mint supply when voting starts"

This reverts commit c8d786d322f6c2907fa58b650100021bada9486e.

* chore: update comments on governing_token_mint_vote_supply

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-07-23 12:06:18 +01:00
Sebastian Bor cf4b264c3d
Governance: future proofing for v2 (#2002)
* chore: upgrade instruction serialisation

* chore: add assert for base64 encoded instruction

* chore: move fields with dynamic size to account  end

* chore: Add VoteThresholdPercentageType to support quorum votes in future versions

* chore: Add VoteWeightSource to support account snapshots as voter weights in future versions

* chore: Add InstructionExecutionStatus to support failing proposal instructions in future versions

* fix: update voting_at_slot when proposal enters voting state

* fix: change min_tokens_to_create_proposal to u64 to support large mints

* chore: add InstructionExecutionFlags to support ordered and transactional instruction in future versions

* chore: add withdraw tests with relinquished and unrelinquished votes

* chore: add placeholder for proposal_cool_off_time

* chore: add padding to permanent accounts to use in future versions

* chore: add ProposalCoolOffTimeNotSupported error

* chore: start governance errors from 500

* chore: update versions

* chore: update comments

* chore: use slice for reserved account space

* chore: use VoteThresholdPercentage enum to store percentage value

* chore: use enum None value instead of Option for execution_status

* chore: use enum None instead of Option for execution_flags

* chore: make clippy happy

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-07-07 14:43:31 +01:00
Sebastian Bor 3c561381fd
Governance: Create token governance (#1968)
* feat: implement CreateTokenGovernance instruction

* chore: update readme

* chore: add execute transfer instruction test

* chore: update readme

* chore: update comments

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>

* chore: update readme

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-06-29 22:22:42 +01:00
Sebastian Bor 329d7e38ee
Governance: Create mint governance (#1953)
* feat: implement CreateMintGovernance instruction

* fix: ensure mint is initialised in assert_is_valid_spl_token_mint

* fix: ensure token account is initialised in assert_is_valid_spl_token_account

* chore: move account type and instruction to the end to avoid breaking changes

* chore: make clippy happy

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-06-25 21:31:14 +01:00
Sebastian Bor c9e3689a94
Governance: Instructions (#1833)
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-06-05 14:06:57 +01:00
Sebastian Bor f59e43757b
Governance: Voting workflow
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-05-29 22:51:48 +01:00
Sebastian Bor 94350d0e8e
Governance: Create Proposals and Sign Off workflow (#1767)
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-05-26 16:40:18 +01:00
Sebastian Bor b488aee067
Governance: Create governance accounts
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-05-23 00:36:02 +01:00
Sebastian Bor addc6bf4b4
Governance: Implement Realms
Implemented instructions:
- CreateRealm
- DepositGoverningTokens
- WithdrawGoverningTokens
-SetVoteAuthority

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
2021-05-19 12:20:53 +01:00