Commit Graph

8 Commits

Author SHA1 Message Date
Jon Cinque 182c0532e4
associated-token-account: Add recover nested account ix (#2889)
* associated-token-account: Add transfer / close nested accounts

* Swap wallet and wrong_wallet in test

* Use new error

* Force destination to wallet and ATA

* Fix merge conflicts

* Add more vanilla spl-token tests

* Improve test, fix instruction comments

* Address feedback

* Rename CloseNested -> RecoverNested, add comment

* Fix typo in comment
2022-03-22 22:58:10 +01:00
Jon Cinque 20864c0be7
token: Support both token programs in associated-token-account (#2904)
* token: Support both token programs in associated-token-account

* Rename spl-token -> spl-token-2022, spl-token-legacy -> spl-token

* Use spl-token by default

* Check mint in get_account_data_len

* Add checks for either token program

* Rebase fix

* Update version comments in tests
2022-02-15 14:20:14 +01:00
Tyera Eulberg 5b0e0c12e6
Single use stmts (#2850) 2022-01-31 15:04:47 -07:00
Tyera Eulberg eaaed0d3c4
Handle extended token Accounts in ATA program (#2738)
* 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
2022-01-28 15:40:39 -07:00
Jon Cinque 78e7a9538e
associated-token-account: Bump dependent token version to 3.3 (#2766)
* associated-token-account: Bump dependent token version to 3.3

* Fix uses of deprecated instruction
2022-01-21 11:01:06 +01:00
Jon Cinque 6ee008d256
Update SDK to 1.9.2, fix warnings (#2674)
* Update SDK to 1.9.2, fix warnings

* Upgrade honggfuzz

* Use `get_latest_blockhash` correctly
2021-12-28 23:02:47 -05:00
Sebastian Bor 1db4604c8d
ATA: update token dependency comments (#2415) 2021-09-15 12:25:26 +01:00
Sebastian Bor 886e7e6540
ATA: Create explicit CreateAssociatedTokenAccount instruction (#2397)
* feat: create explicit CreateAssociatedTokenAccount instruction

* feat: add create_associated_token_account for explicit instruction

* chore: update comments and make clippy happy

* chore: redirect legacy instruction creator to new instruction

* chore: update comments

* wip: scaffold mint to instruction creator and test

* Revert "wip: scaffold mint to instruction creator and test"

This reverts commit f8254050f8dd0c1b3d103277697be3d1037c8a5e.

* chore: flag legacy create_associated_token_account as deprecated

* chore: rename CreateAssociatedTokenAccount to Create

* chore: move create_pda_account to tools:account

* chore: comment deprecated attribute to prevent warnings until 1.0.4 is released

* chore: fix test name

* feat: remove Rent account from explicit instruction

* chore: use current spl_token for implicit instruction test

* chore: replicate legacy implicit instruction in test

* chore: remove program name from instruction msg
2021-09-13 10:41:18 +01:00