* Style nits
* Initial MemoTransfer extension
* Stub in check for memo
* Add memo-transfer token-client method
* Add MemoTransfer tests
* Add immutable get_extension, and clean up mod
* Update token/program-2022/src/extension/memo_transfer/instruction.rs
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
* Update token/rust/src/token.rs
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
* Pass by ref
* Dedupe ExtensionTypes in length apis
* Depend on deduplication in ExtensionType::get_account_len
* Add Reallocate instruction
* Remove unneeded api
* Add set_account_type helper and remove unneeded StateWithExtensionsMut api
* fix: realm deserialisation
* chore: update spl-gov version for chat
* chore: update spl-governance-tools version to 0.1.2
* chore: upgrade Anchor to 0.20.1
* chore: update addin-api version
* chore: update spl-governance-test-sdk version
* token-2022: Add withdraw withheld tokens from accounts
* Add instruction field for number of signers
* Update instruction field
* Rename field and update comment
* Fix test?
* Add failing test cases and fix buggy method
* Add extension initializations to ensure buffers are long enough
* Add extra checks
* Move multisig check lower
* Add missing test case and fix
* chore: use exhaustive check for governance account type
* fix: realm v1 deserialisation
* chore: use exhaustive check for multiple account types
* chore: use exhaustive check for seeds
* chore: update comments
* 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
* feat: allow proposal owner to sign off proposal directly
* chore: add proposal by owner sign off tests
* chore: add test for owner trying to sign off proposal with signatory
* feat: make it possible for realm authority to create governances
* chore: refactor create governance authority check into a single instruction
* chore: add tests to create governance with ream authority signer
* chore: make clippy happy
* chore: update comments
* chore: fix merge conflicts
Co-authored-by: Jon Cinque jon.cinque@gmail.com
* 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
* Use token-2022 in ProgramTest
* Add get_account_len() helper with CPI to spl_token::get_account_data_size()
* Add test for extended mints/accounts using transfer_fee
* Add browser build commands and documentation
* Improve rollup configuration
* Remove unused external import from rollup configuration
* Move from Babel to Typescript plugin
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
* Add panicking test
* Fix panic
* Add another panicking case
* Fix panic
* Add another panicking case
* Fix panics
* Add another panicking case
* Fix
* Add another case
* Move existing fix outside if clause
* Add some helpful comments