Michael Vines
1b369e1cf7
Bump spl-token-2022 version to 0.2.0
2022-02-10 16:03:45 -08:00
Michael Vines
2e968115ab
Add CreateNativeMint instruction
2022-02-09 20:03:21 -08:00
Tyera Eulberg
428d93bdcb
Move program-2022 tests to new crate ( #2892 )
2022-02-09 15:02:33 -07:00
Michael Vines
f36e973697
Update program id
2022-02-08 11:59:50 -08:00
Tyera Eulberg
c3ad86dc2c
token-2022: fixup set_account_type to confirm AccountType ( #2885 )
...
* Add failing test
* Prevent cross-type set_account_types
2022-02-08 10:06:23 -07:00
Jon Cinque
edec44180c
token-2022: Force refresh blockhash on no-op transaction ( #2884 )
2022-02-07 23:01:33 +01:00
Harsh Ghodkar
37a6db89db
shifted dotenv to dev dependancies
2022-02-07 08:57:37 -08:00
Harsh Ghodkar
c03de12813
update
2022-02-07 08:08:10 -08:00
Tyera Eulberg
482a9281f6
token-2022: Add MemoTransfer extension ( #2822 )
...
* 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>
2022-02-04 17:12:01 -07:00
Tyera Eulberg
c7ec4427b6
token-2022: Add Reallocate instruction ( #2864 )
...
* 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
2022-02-04 15:23:16 -07:00
Jon Cinque
129b35609a
token-2022: Support approve / revoke with extensions ( #2870 )
2022-02-04 23:07:48 +01:00
Jon Cinque
d3539c19f9
token-2022: Fail to close account with withheld fees ( #2871 )
...
* token-2022: Fail to close account with withheld fees
* Add comment to use `get_extension`
2022-02-04 23:07:22 +01:00
Jon Cinque
93c7ad7618
token-2022: Support extensions in burn ( #2869 )
2022-02-04 22:25:36 +01:00
Jon Cinque
9b52455213
token-2022: Add delegate self-revoke ( #2872 )
...
* token-2022: Add delegate self-revoke
* Address feedback
2022-02-04 22:23:41 +01:00
Jon Cinque
0a0a6d9380
token-2022: Try to fix flaky test ( #2874 )
2022-02-04 20:11:01 +01:00
Jon Cinque
2d357e85f5
token-2022: Add transfer tests with extension too ( #2868 )
2022-02-04 19:16:39 +01:00
Michael Vines
43b9a37836
Remove TODO
2022-02-04 09:58:06 -08:00
Michael Vines
0df75ab5e8
Freezing -> Thawing
2022-02-04 09:55:36 -08:00
Jon Cinque
eb048559eb
token-2022: Add withdraw withheld tokens from accounts ( #2857 )
...
* 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?
2022-02-03 00:08:13 +01:00
Tyera Eulberg
27b0df1159
token-2022: add StateWithExtensionsMut::unpack_after_realloc ( #2859 )
...
* Add unpack_after_realloc
* Dedupe with internal fn
2022-02-02 15:20:54 -07:00
Tyera Eulberg
3863914b10
token-2022: fix handling for extensions with no data ( #2858 )
...
* Add failing test
* Fix
2022-02-01 20:53:37 -07:00
Tyera Eulberg
448e75f8ec
token-2022: fixup realloc_needed ( #2856 )
...
* 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
2022-02-01 19:31:10 -07:00
Michael Vines
115c3c4703
Add ImmutableOwner extension to block ATA owner authority changes
2022-02-01 12:53:45 -08:00
Jon Cinque
ab05e4e597
token-2022: Fix flaky test ( #2851 )
2022-02-01 11:57:02 +01:00
Michael Vines
809c1a1a77
GetAccountDataSize instruction now accepts user-provided extension types
2022-01-31 23:03:22 -08:00
Michael Vines
4ddd6c81cc
Permit new token accounts to be overallocated
2022-01-31 22:48:16 -08:00
Jon Cinque
ccebd8d4c8
token-2022: Add transfer fee withdrawal from mint ( #2849 )
2022-02-01 01:00:20 +01:00
Jon Cinque
28f1ba9be5
token-2022: Add freeze / thaw through StateWithExtensions ( #2848 )
2022-02-01 00:24:59 +01:00
Jon Cinque
1f77ba09ed
token-2022: DRY out the transfer fee tests ( #2845 )
2022-01-31 22:08:44 +01:00
Jon Cinque
95f6c4f501
token-2022: Add harvest from accounts to mint ( #2820 )
...
* token-2022: Add harvest from accounts to mint
* Address feedback
2022-01-29 12:21:57 +01:00
Tyera Eulberg
f9e6f66758
Add extension realloc helper ( #2821 )
2022-01-28 15:41:22 -07:00
Tyera Eulberg
8a2d3cc227
token-2022: fix panics due to small buffers ( #2824 )
...
* 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
2022-01-28 09:47:47 -07:00
Tyera Eulberg
76b59b6dc1
Fixup use stmts ( #2816 )
2022-01-26 15:02:07 -07:00
Tyera Eulberg
c4de9e35f2
token-2022: remove split_at usages ( #2813 )
...
* Add helper and remove split_at usage
* Rework helpers for TransferFee extension ix unpacking
* Refactor pubkey unpacking, remove magic numbers
2022-01-26 14:11:15 -07:00
Tyera Eulberg
2daa6e645f
token-2022: add DefaultAccountState mint extension ( #2810 )
...
* Add DefaultAccountState extension
* Check DefaultAccountState in InitializeAccount
* Add rust client functionality
* Add tests
* Simplify ix variants
* Fixup freeze-auth signing state for multisig
* Add InitializeMint check to prevent freeze_authority.is_none() and default AccountState::Frozen
* Use separate freeze_authority in program_test
* Add docs for default-state instruction data
* Rebase on #2807
2022-01-26 13:30:24 -07:00
Jon Cinque
e2d56f403d
token-2022: Assess transfer fees ( #2807 )
...
* Refactor transfer to use StateWithExtensionsMut
* Add basic transfer tests
* Add transfer fee calculation and use in transfer
* Add specific transfer fee tests
* Add self-transfer test + rename test
2022-01-26 19:25:10 +01:00
Jon Cinque
82d862ebde
token-2022: Enforce maximum transfer fee of 10k bps ( #2808 )
2022-01-26 14:02:24 +01:00
Tyera Eulberg
8eaaafed54
Refactor TestContext to enable unwrap_err ( #2805 )
2022-01-25 13:45:53 -07:00
Tyera Eulberg
87fe3793ea
token-2022: implement SetAuthority for TransferFeeConfig and WithheldWithdraw ( #2801 )
...
* Make comment more explicit
* Support setting TransferFeeConfig and WithheldWithdraw authorities
* Add tests
2022-01-25 10:23:34 -07:00
Michael Vines
6d62ea6cc7
Drop _program_id
2022-01-24 17:41:47 -08:00
Michael Vines
679e9b1212
spl-token-client no longer hard codes the token program id
2022-01-24 17:41:47 -08:00
Michael Vines
8e559ce69c
Add --program-id argument
2022-01-24 17:41:47 -08:00
Michael Vines
a46a198404
Document authority restriction
2022-01-24 17:41:47 -08:00
Jon Cinque
8bac649302
token-2022: Implement set transfer fee instruction ( #2797 )
...
* token-2022: Implement set transfer fee instruction
* Address feedback
2022-01-25 02:03:12 +01:00
Tyera Eulberg
cc8826ac70
token-2022: plumb program_id through instruction builders ( #2792 )
...
* Plumb program_id into ix builders
* Don't unwrap extension instructions
2022-01-24 14:14:21 -07:00
Tyera Eulberg
a98977f5fd
token-2022: add more tests ( #2783 )
...
* Add extended-mint case to test_get_account_data_size()
* Add missing account-type init
* Add basic init-acct ProgramTest tests
2022-01-24 11:39:13 -07:00
Tyera Eulberg
c03c1fc7b4
token-2022: make extension instruction builders consistent with vanilla token ( #2782 )
...
* Make TransferFee and MintClose ix builders consistent with vanilla token
* Make ConfidentialTransfer ix builders consistent with vanilla token
2022-01-24 11:03:37 -07:00
Jordan Sexton
66770345eb
alpha version bump
2022-01-22 00:29:56 -06:00
Jordan Sexton
0cfedde82d
version bump: 0.2.0-alpha.1
2022-01-22 00:29:56 -06:00
Jordan Sexton
5afaae7a60
add decoded instruction type guard functions
2022-01-22 00:29:56 -06:00