Commit Graph

118 Commits

Author SHA1 Message Date
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 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
Michael Vines 1c417ffa4f Fork Token 2022 program 2021-10-12 10:43:58 -07:00