* spl-governance: Add VoteTipping option
This allows two new tipping styles in addition to the previous "Strict"
mode:
- Early: Where a yes majority above the yes vote threshold will
complete the vote, even if below 50% of total possible votes.
- Disabled: Where votes never complete early.
* address review nits
* chore: change voter-weight-addin to mock
* chore: fix tests
* chore: add action, target and expiry validation tests
* chore: add full target test checks
* feat: add max community voter weight adding structures
* chore: move payer to last account position
* wip: update max_community_voter_weight_addin
* chore: simplify logic to update realm config
* wip: setup addins when realm is created
* wip: setup voter weights accounts
* chore: make clippy happy
* core: fix merge
* chore: remove old readme
* chore: add SetupMaxVoterWeightRecord to addin mock
* chore: test_create_realm_with_max_voter_weight_addin test
* chore: add SetRealmConfigArgs and refactor tests
* chore: update max voter weight tests
* chore: setup cast_vote_with_max_voter_weight_addin test
* wip: get max voter weight from plugin
* chore: update comments and make clippy happy
* wip: use max voter weight to tip proposals
* chore: rename get_max_voter_weight
* chore: load addins using different ids
* chore: add tests with all addins
* fix: coerce max vote weight when cast votes are higher
* chore: add tests with all adins being used
* chore: add test for expired max voter weight record
* chore: simplify addin mock
* wip: Create addin api crate
* chore: use native build order and dependency
* chore: fix build
* feat: add reserved space to addin records
* chore: bump versions
* fix: use [u8; 8] discriminator for addin account types
* chore: update instruction comments
* chore: use saturating_sub instead of checked_sub
Co-authored-by: Jon Cinque
* fix: transfer mint freeze authority for mint governance
* chore: update transfer_mint_authorities comments
* feat: transfer close_authority when creating token account governance
* chore: update spl-token function names
* chore: remove redundant set_spl_token_mint_authority
* chore: update governance chat program version to 0.2.0
* feat: support voter weight for chat
* chore: move ensure_voter_weight_addin_is_built to test sdk
* chore: add program version to logs
* fix: workaround for logs
* chore: add test for chat message using voter weight addin
* chore: remove logger overrides
Co-authored-by: Jon Cinque
* feat: add amount to Deposit instruction
* feat: use try_from_slice_unchecked to support forward compatibility
* chore: make clippy happy
* chore: update comments
* feat: setup and configure voter weight addin
feat: add use_voter_weight_add_in flag to realm config
chore: use spl-governance 1.1.1 version
chore: make clippy happy
chore: add test to deserialise v1 CreateRealm instruction from v2
feat: add voter-weight-addin skeleton project
chore: build voter-weight-addin before governance
fix: temp workaround to make spl_governance_voter_weight_addin available in CI
chore: add tests with voter-weight-addin
feat: implement deposit instruction for voter weight addin
feat: add voter_weight_expiry
fix: set voter_weight_expiry
chore: restore positive execute tests
chore: restore ignored tests
wip: pass voter weight accounts to create_account_governance2
wip: read voter weight account
chore: make clippy happy
wip: add realm and validation to voter_weight deposit
fix: update addin
chore: make clippy happy
chore: fix voter_weight_record names
feat: use voter weight provided by addin when governance created
chore: update addin
chore: remove governance stake pool program
feat: remove time offset from revise
chore: fix build
feat: create RealmAddins account when realm with addin is created
chore: make clippy happy
feat: set voter weight addin using SetRealmConfig instruction
chore: make clippy happy
chore: update comments
chore: reorder SetrealmConfig accounts
chore: infer use_community_voter_weight_addin
chore: infer use_community_voter_weight_addin
chore: update voter weight addin comments
feat: use voter weight addin id from RealmAddins account
* feat: use voter weight addin to create proposal
* feat: use voter weight addin to cast vote
* chore: make clippy happy
* feat: use voter weight addin to create token governance
* feat: use voter weight addin to create mint governance
* feat: use voter weight adding to create program governance
* chore: create assert_can_withdraw_governing_tokens() helper function
* chore: fix compilation
* fix: ensure governance authority signed transaction to create governance
* feat: implement CreateTokenOwnerRecord instruction
* chore: fix chat tests
* chore: update comments
* chore: rename RealmAddins account to RealmConfig account
* chore: add more reserved space to GovernanceConfig account
* chore: update instruction comments
* chore: update comments
* chore: fix compilation
* chore: remove ignore directive for tests
* feat: panic when depositing tokens into a realm with voter weight addin
* chore: rename community_voter_weight to community_voter_weight_addin
* feat: make payer account optional for SetRealmConfig