Commit Graph

21 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
Jon Cinque 89aa9475ba
associated-token-account: Fail idempotent for non-ata (#2903) 2022-02-11 23:44:41 +01:00
Jon Cinque 290d8d880a
associated-token-account: Add "CreateIdempotent" instruction (#2883)
* associated-token-account: Add "CreateIfNonExistent" instruction

* Address feedback

* Move ownership check
2022-02-10 00:35:46 +01:00
Michael Vines 115c3c4703 Add ImmutableOwner extension to block ATA owner authority changes 2022-02-01 12:53:45 -08: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
Michael Vines 6d62ea6cc7 Drop _program_id 2022-01-24 17:41:47 -08: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
Tyera Eulberg d3a597d2f7
Use spl-token-2022 in ATA program (#2737)
* Bump ATA to spl-token-2022

* Use latest program to fix id mismatch in deprecated ix test
2022-01-13 18:40:35 -07:00
Tyera Eulberg 7fd1b6b75f
Fixup tests to use rent-exempt accounts (#2717) 2022-01-10 09:49:32 -07: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
Michael Vines a477895f02 program-test now adds SPL Token automatically 2020-12-03 05:39:55 +00:00
Michael Vines e0a6292bd6 Employ test-bpf feature to make 'cargo test' pass 2020-11-06 21:29:04 -08:00
Michael Vines 4ab5fd3f23 Use banks_client.get_rent() 2020-11-06 21:29:04 -08:00
Michael Vines a80f8e49f7 Clean up comments 2020-11-03 19:53:46 +00:00
Michael Vines f2da427631 Revert "Adapt to https://github.com/solana-labs/solana/pull/13355"
This reverts commit 9a383e24a2792e4ae04a470a9c94a29e518f8945.
2020-11-03 04:13:36 +00:00
Michael Vines 20551f9fbc Adapt to https://github.com/solana-labs/solana/pull/13355 2020-11-03 04:13:36 +00:00
Michael Vines 4da9cb3631 Add associated-token-account program 2020-11-03 04:13:36 +00:00