Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support token_2022 program #5

Merged
merged 14 commits into from
Sep 6, 2024
Merged

Support token_2022 program #5

merged 14 commits into from
Sep 6, 2024

Conversation

tiendv89
Copy link

@tiendv89 tiendv89 commented Aug 5, 2024

This PR will add support for token_2022 program, with below tasks:

  • Upgrade to Solana 1.18.21
  • Upgrade to Anchor 0.29 (to support memo transfer)
  • Migrate to Interface & InterfaceAccount type
  • Add v2 instructions
    • create_vesting_escrow
    • initialize_config
    • initialize_token_badge
    • delete_token_badge
    • claim
  • Add test cases
    • create_vesting_escrow
    • initialize_config
    • initialize_token_badge
    • claim
  • Handle Transfer Fee
    • Add Logic
    • Add test cases
  • Handle Transfer Memo
    • Add Logic
  • Handle FreezeAuthority & PermanentDelegate
    • Add Logic
    • Add test cases
  • Handle MintCloseAuthority
    • Add Logic
    • Add test cases
  • Handle TransferHook
    • Add Logic
    • Add test TransferHook program
    • Add test cases
  • Handling NON-confidential transfer
    • Add Logic (No additional implementation to support non-confidential transfer only)
    • Add test cases

@tiendv89 tiendv89 changed the title [Draft] Support token_2022 program Support token_2022 program Aug 18, 2024
@andrewsource147 andrewsource147 changed the base branch from main to staging August 27, 2024 09:28
programs/locker/src/util/token2022.rs Outdated Show resolved Hide resolved
programs/locker/src/util/token2022.rs Outdated Show resolved Hide resolved
programs/locker/src/util/token2022.rs Outdated Show resolved Hide resolved
@codewithgun
Copy link

require!(escrow.cancelled_at > 0, LockerError::CancelledAtIsZero);

Doesn't this forever true?

…erHook / MintCloseAuthority & update feedbacks
@andrewsource147 andrewsource147 merged commit 83ac59a into staging Sep 6, 2024
3 checks passed
@andrewsource147 andrewsource147 deleted the token-2022 branch September 6, 2024 07:46
andrewsource147 pushed a commit that referenced this pull request Oct 24, 2024
* Support token-2022 program

* Add `cancel_vesting_escrow_v2` to support token_2022

* refactor

* Update fixes for feedbacks

* Remove Unauthorized

* remove unused errors

* add staging CI

* fix typo

* Fix feedbacks

* Revert constraint checking for sender_token

* Add support for ConfidentialTransferMint / PermanentDelegate / TransferHook / MintCloseAuthority & update feedbacks

* Fix feedbacks

* Update Feedbacks

* Fix feedback
urieltan pushed a commit that referenced this pull request Oct 24, 2024
* Add `cancel_vesting_escrow` instruction (#15)

* Add `cancel_vesting_escrow` instruction

* Fix feedbacks

* Fix feedbacks

* Fix feedback + refactor code

* Update error msg & declaration

* Minor

* Support token_2022 program (#5)

* Support token-2022 program

* Add `cancel_vesting_escrow_v2` to support token_2022

* refactor

* Update fixes for feedbacks

* Remove Unauthorized

* remove unused errors

* add staging CI

* fix typo

* Fix feedbacks

* Revert constraint checking for sender_token

* Add support for ConfidentialTransferMint / PermanentDelegate / TransferHook / MintCloseAuthority & update feedbacks

* Fix feedbacks

* Update Feedbacks

* Fix feedback

* Add change log + increase compute unit for cancel instruction (#17)

* Add change log + increase compute unit for cancel instruction

* Update detailed changes

* fix comments

* Increase anchor to 0.30.1 & Add support for group/member token extensions (#18)

* Increase anchor to 0.30.1

* Implement support for GroupPointer & GroupMemberPointer

* Minor

* Remove support for Group & GroupMember

* Add changelog

* Update changelog

* change transfer hook error text (#20)

* harvest fees when closing token2022 token account (#19)

* harvest fees when closing token2022 token account

* remove signer for harvesting fees

* fix harvesting fees

* add test for harvest fee during cancelation

* fix test to include transfer_fee calculation

* nit: fix comments and function name

* update packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants