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
Tyera Eulberg
83c3ffad25
Bump solana crates to v1.9.5 ( #2780 )
...
* Bump solana crates to v1.9.5
* Update sol_set_return_data type signature and un-ignore test
2022-01-21 22:52:10 -07:00
Tyera Eulberg
defdca2201
Comment SyscallStubs sol_set_return_data and ignore test for now ( #2777 )
2022-01-21 16:32:37 -07:00
Tyera Eulberg
bf96dd43bf
token-2022: overwrite with init_extension using default state ( #2746 )
...
* Overwrite extension data when init is called
* Update comments
2022-01-21 16:28:04 -07:00
Tyera Eulberg
fbd3dd4247
Bump solana-zk-token-sdk ( #2772 )
2022-01-21 15:57:55 -07:00
Tyera Eulberg
821ad120d8
Bump zk-token-sdk and impl Default for confidential-transfer extensions ( #2771 )
2022-01-21 13:33:41 -07:00
Tyera Eulberg
498d347cdd
token-2022: bump compute limit for close test ( #2770 )
2022-01-21 11:54:02 -07:00
Jon Cinque
f5a6dc671c
token-2022: Zeroize account data on close ( #2764 )
...
* token-2022: Zeroize account data on close
* Address feedback
2022-01-21 02:47:48 +01:00
Jon Cinque
ba46fedafb
token-2022: Add init transfer fee config ( #2757 )
2022-01-20 13:29:40 +01:00
Jon Cinque
db0b2c5295
token-2022: Add mint close authority support everywhere ( #2754 )
...
* token-2022: Add mint close authority support everywhere
* Address feedback
2022-01-19 18:40:00 +01:00
Jon Cinque
480dc6870f
token-2022: Add init mint close authority ( #2744 )
2022-01-19 12:44:45 +01:00
Trent Nelson
f3704db5ff
Bump token-2022 test CUs again for tip of 1.9
2022-01-18 18:19:52 -07:00
Jon Cinque
0a61bc4ea3
token: Bump compute units in tests ( #2752 )
2022-01-18 13:15:08 +01:00
Tyera Eulberg
00b8a4b332
token-2022: Support extensions in InitializeAccount variations ( #2743 )
...
* Prep helper fn to reuse code
* Adjust error to match current _initialize_account handling
* Add new helper to initialize extension from ExtensionType
* Include required extensions in InitializeAccount processing
* Initialize native mint
* Add missing native-mint test case for get_account_data_size
* Remove superfluous mint unpack
* Limit scope of StateWithExtensionsMut method
* Update comments to be correct
* Check account length vis-a-vis required extensions in Initialize
* Noop confidential-transfer case, add comments, and make fn name more explicit
* gt -> ne
2022-01-15 13:59:03 -07:00
Jon Cinque
3e1dd73396
token-2022: Basic integration with rust client ( #2739 )
...
* token-2022: Basic integration with rust client
* Rename ExtenstionType -> Self
* Fix merge conflicts
2022-01-14 20:34:43 +01:00
Tyera Eulberg
cad24e502a
Add GetAccountDataSize implementation ( #2736 )
...
* Add helper to get required Account extensions
* Add GetAccountDataSize processor
* Add get_account_data_size instruction
* Add test harness to check return data
* Add test of basic mint/account get-len
* Move method inside impl ExtensionType
2022-01-13 18:50:01 -07:00
Michael Vines
e7737760ee
Port the remainder of the zk-token program to the ConfidentialTransfer extension
2022-01-13 10:44:42 -08:00
Jon Cinque
ac85fca43d
token: Refactor transfer fee instructions + processor ( #2733 )
2022-01-13 12:08:17 +01:00
Michael Vines
db9f89828b
Allow the confidential transfer extension to block `CloseAccount`
2022-01-12 09:54:53 -08:00
Jon Cinque
c85373aa3e
token: Check self-ownership in `validate_owner`
2022-01-12 08:20:10 -08:00
Michael Vines
583afbd35f
Drop `new_base` argument, `pack_base()` now works on `self.base`
2022-01-11 21:11:19 -08:00
Jon Cinque
f2056358b7
token: Add checks for mixed type initialization ( #2723 )
...
* token: Add checks for mixed type initialization
* Address feedback
2022-01-12 01:33:02 +01:00
Michael Vines
991eb83a67
Confidential transfer extension
2022-01-11 13:22:20 -08:00
Michael Vines
2caec406bc
Rename StateWithExtensionsMut::get_extension()
2022-01-10 13:15:02 -08:00
Michael Vines
7f0e86cc0f
Harden StateWithExtensions unpacking
2022-01-08 09:20:02 -08:00
Tyera Eulberg
d166e28836
Strip extension account-type prefixes ( #2715 )
...
* Strip account-type prefixes
* Edit comment
2022-01-07 16:46:01 -07:00
Michael Vines
3cc92d294a
How about ConfidentialTransferState and ConfidentialTransferAuditor?
2022-01-07 14:58:41 -08:00
Michael Vines
5fe1eb6a9d
Add Confidential Transfer Extension boilerplate
2022-01-07 14:58:41 -08:00
Michael Vines
7cc9bd7013
Move each extension into its own module
2022-01-06 09:41:06 -08:00
Jon Cinque
eedcbd8602
token: Extension state packing ( #2642 )
...
* token: Extension state packing
* Move to bytemuck
* Cleanup a bit
* Remove all unsafe, address feedback
* Address feedback
* Add test for multisig-length account
* Add tests for Account and multi-extension
* Remove last todo
* Add more tests
2022-01-04 17:55:51 -05: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
Dmitri Makarov
e039957fc4
Increase compute max units in program-2022 assert_instruction_count ( #2655 )
2021-12-21 10:59:44 -08:00
Jon Cinque
2cd68d3f5c
token-2022: Add transfer fee types and instructions ( #2608 )
...
* token-2022: Add transfer fee accounts and instructions
* Address feedback
* More feedback
* Move to mixins
* Separate instructions for mixin initialization
* Feedback again again again!
* Getting there...
* More more feedback again again
* Add `WithdrawWithheldTokensFromAccounts` instruction
* Add instruction serde, fix all errors
2021-12-14 23:36:02 +01:00
Michael Vines
1a0155e34b
Update to Rust 1.57.0
2021-12-09 23:56:47 -08:00
Jon Cinque
7764a9d5c7
token: Transition perf-monitor to solana-program-test ( #2586 )
...
* token: Transition perf-monitor to solana-program-test
* fmt
* Refactor for clarity
2021-11-16 23:15:45 +01:00
Michael Vines
9acb082dc3
Upgrade to Solana v1.8.1
2021-10-20 22:52:19 -07:00
Michael Vines
1c417ffa4f
Fork Token 2022 program
2021-10-12 10:43:58 -07:00