Commit Graph

1094 Commits

Author SHA1 Message Date
Jordan Sexton f2134f36e8 remove usage 2022-02-15 16:33:36 -06:00
Jordan Sexton 16aa92df0a fix faq link 2022-02-15 16:33:36 -06:00
Jordan Sexton 292153ad40 increase mocha timeout 2022-02-15 16:33:36 -06:00
Jon Cinque 9698c2b481 Remove `js-old` 2022-02-15 16:33:36 -06:00
Jon Cinque f9a93e5636 Port e2e tests to mocha 2022-02-15 16:33:36 -06:00
Jordan Sexton 70f2333e98 update version 2022-02-15 16:33:36 -06:00
Jordan Sexton 118bd047aa move ts to js 2022-02-15 16:33:36 -06:00
Jordan Sexton ca17166471 move js to js-old 2022-02-15 16:33:36 -06:00
Jordan Sexton da7a97c76e fix argument order 2022-02-15 16:33:36 -06:00
Jordan Sexton b37390433c update path 2022-02-15 16:33:36 -06: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
Michael Vines 93c8086e13 Rename token/rust to token/client 2022-02-11 21:47:43 -08:00
Tyera Eulberg ab4b9fb779
Add rust token client support for memo (#2901)
* Remove unnecessary fee-payer repeat signing

* Add with_memo api
2022-02-11 14:27:18 -07:00
samkim-crypto 7330b17482
token-2022: add fee for confidential extension (#2897)
* token-2022: add fee for confidential extension

* token-2022: change receiver to dest for consistency

* token-2022: addressing readability review comments for confidential extension
2022-02-11 08:37:30 -05:00
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
Jordan Sexton 55b1732731 add DecodedInstruction type 2022-01-22 00:29:56 -06:00
Jordan Sexton 65cd045523 update deps 2022-01-22 00:26:44 -06:00
Jordan Sexton b55986b16b update tsconfig 2022-01-22 00:26:44 -06:00
steveluscher f090e55642 Build ESModules with typescript-esm 2022-01-22 00:26:44 -06:00
steveluscher eda6998654 Import indexes, explicitly 2022-01-22 00:26:44 -06: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 54cb4ad1d8
associated-token-account: Revert to using spl-token-2022 (#2769)
* associated-token-account: Revert to using spl-token-2022

* Clear up no-entrypoint feature for rust client
2022-01-21 19:17:44 +01: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 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 81f50127f1
token: Bump version to 3.3.0 (#2765) 2022-01-21 01:47:02 +01:00
Jon Cinque 3eccf25ece
token: Zeroize data on account close (#2763) 2022-01-21 01:03:00 +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 9aa859c929 Display RPC transport stats 2022-01-10 11:54:22 -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
Michał Piotrowski fe7b848024
token tests p1 (#2700)
* token tests p1

* token tests - address review comments

* fix cs
2022-01-05 17:11:31 -05: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
Jordan Sexton 78b8ef9688 remove dist tag from package version 2021-12-27 20:09:33 -06:00
Jordan Sexton 14952a75ba organize config 2021-12-27 20:03:13 -06:00
Jordan Sexton 0cd82ce775 fix default arg 2021-12-27 20:03:13 -06:00
Jordan Sexton ad0525ebfe remove watch command 2021-12-27 20:03:13 -06:00
Jordan Sexton afaef4c141 update yarn.lock 2021-12-27 20:03:13 -06:00
Jordan Sexton 9378b1ed94 set lower compatible version of web3js 2021-12-27 20:03:13 -06:00
Jordan Sexton 074ef06126 update buffer-layout-utils 2021-12-27 20:03:13 -06:00
Jordan Sexton bba59e9e05 update dev deps 2021-12-27 20:03:13 -06:00
Jordan Sexton a8b27006b4 update version to 0.2.0-alpha.0@next 2021-12-27 20:03:13 -06:00
Jordan Sexton 537bfe3efe add checked + unchecked decode functions 2021-12-27 20:03:13 -06:00
Jordan Sexton 6e7b7d7faa InitializeAccount doesn't have multisigners 2021-12-27 20:03:13 -06:00
Jordan Sexton 7ac61bc957 target esnext with esm build, es6 with cjs 2021-12-27 20:03:13 -06:00
Jordan Sexton 1844efe298 fix comments 2021-12-27 20:03:13 -06:00
Colin Ogoo 70893b0299 build(cjs/esm): create cjs/esm bundles
- update build script to build both esm and cjs compatible packages
- add postbuild script to delegate the module type check to package.json within lib/esm and lib/cjs directory
2021-12-27 20:03:13 -06:00
Colin Ogoo cc074a1b5e build(rollup): remove rollup and related packages
step one of removing rollup from the build pipeline
2021-12-27 20:03:13 -06:00
Jordan Sexton 0db9c3dc00 fix decoded type 2021-12-27 20:03:13 -06:00
Jordan Sexton 8ca7381402 fix argument order 2021-12-27 20:03:13 -06:00
Jordan Sexton 931befabb0 add more decode functions, refactor 2021-12-27 20:03:13 -06:00
Jordan Sexton 8cca13cecf add initial instruction decoding functions 2021-12-27 20:03:13 -06:00
Jordan Sexton 7f8d04cdeb add instruction errors 2021-12-27 20:03:13 -06:00
Jordan Sexton e97f51031f fix doc comments 2021-12-27 20:03:13 -06:00
Jordan Sexton 3dc18b2f19 strictly type and expose instruction data layouts 2021-12-27 20:03:13 -06:00
Jordan Sexton 20463a7a6b change get*Info method names 2021-12-27 20:03:13 -06:00
Jordan Sexton 0b586a2809 include license in published package 2021-12-27 20:03:13 -06:00
Jordan Sexton 2cd6f68de8 add rollup to build 2021-12-27 20:03:13 -06:00
Jordan Sexton 60b8340ed4 add published files 2021-12-27 20:03:13 -06:00
Jordan Sexton 95c3ab4e4b build for node 14 (LTS) 2021-12-27 20:03:13 -06:00
Jordan Sexton d7d3f08a5e AccountInfo::data should already be a Buffer 2021-12-27 20:03:13 -06:00
Jordan Sexton e02d632b36 fix build from source directions 2021-12-27 20:03:13 -06:00
Jordan Sexton da6c573b0c organize imports 2021-12-27 20:03:13 -06:00
Kirill Fomichev dcf91e9ae8
Add token/rust: spl-token-api (#2102)
* Init spl-token-api

* rename token/rust

* add mint_to, transfer

* add BoxFuture

* fmt + Send + Sync

* TokenBanksClient::new_from_client

* add trait SendTransaction

* deps

* add enum for TokenBanksClient

* update to 1.7.11

* fix Token::mint_to

* fix transfer and add get_account_info

* unstrict deps

* add get_or_create_associated_account_info

* add set_authority and split tests

* set_authority for mint/account

* re-export spl_token

* add Token::new

* update solana crates

* remove comments

* change generic names

* change process_ixs method

* add Token::get_mint_info

* fix same mint tx

* add Token::with_payer

* fmt

* TokenClient::send_transaction accept ref

* rename Token* to Program*
2021-12-21 12:16:20 -07:00
Dmitri Makarov e039957fc4
Increase compute max units in program-2022 assert_instruction_count (#2655) 2021-12-21 10:59:44 -08:00
Dmitri Makarov 28d0aa7759
Increase compute max units due to changes in handling of memory ops (#2653) 2021-12-20 15:29:36 -08:00
Jordan Sexton fef4438cd1 fix test 2021-12-14 16:49:30 -06:00
Jordan Sexton 4179acbf8b
Rewrite spl-token-js in TypeScript (#2539)
* first draft

* restructuring

* fix imports

* move errors to constants

* fmt

* fix ata

* finish core implementation

* don't export internal utils

* rename internal util files

* token account is owned by token program

* docs

* docs

* port example

* add basic tests from current implementation

* enable es6 features in lint config

* don't build tests into lib dir

* doc tweaks

* add preinstall script

* add types, don't postinstall

* allow keypairs to create accounts, and default to using ATAs

* add explicit enum values

* remove unused dependency

* expose allowOwnerOffCurve option to getOrCreateAssociatedTokenAccount action

* make multisigners optional

* WIP, undo

* update buffer-layout and buffer-layout-utils from npm

* update dev dependencies
2021-12-14 16:47:57 -06: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
Abhimanyu Singh Gaur e29bc53c5f
Migrate to @solana/buffer-layout (#2624)
* Update package.json

* Fix build errors

* More fixes

* Add flow definitions
2021-12-09 16:26:14 +01:00
Victor Pontis 801b4e59f8 Update comment on state.rs regarding is_native
I was confused when reading this comment and had to read the code to realize that the comment isn't a typo. 

(Btw, let me know if this kind of small changes are helpful or not 👍.)
2021-11-28 20:39:45 -08:00
Paul 7393f1de43
spl-token: provide more useful output when using create-token with the output option and small redesign of token cli architecture (#2593)
* spl-token: WIP

* Remove and_then, move tx handling in separate function- output handling still missing

* spl-token: add basic output handling for all calls, add detailed output to create-token

* spl-token: remove changes in bench that are not strictly necessary to remove # of files touched in this PR

* [spl-token] cli: HandleTxReturn is now TransactionReturnData

* [spl-token] cli: Make commands return output String that is printed in fn main()

* [spl-token] cli: remove old todos

* [spl-token] cli: only use no_wait arg in command_transfer and use constant for "create-token"
2021-11-24 12:08:46 -07: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
Jon Cinque 02d2736797
token-js: Add test for disabling mint authority (#2582) 2021-11-15 18:56:23 +01:00
Ikko Ashimine 707382ee96
Fix typo in main.rs (#2569)
auxillary -> auxiliary
2021-11-10 11:18:07 -07:00
MarkSackerberg 81c90f5c73
Allow GC to close empty associated accounts (#2554)
* Allow GC to close empty associated accounts

Empty associated accounts will only be closed in case the new flag del_associated_accounts is set. Otherwise behaviour is as before.

Useage:
spl-token gc --del_associated_accounts

* use kebab-case

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>

* align coding style

Thank you jon!

* Add sanity check

* correcting amount check before closing

* formatting correcly

using cargo fmt

* changing sanity check to assert!

Co-authored-by: Sack <none>
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
Co-authored-by: Mark Sackerberg <Contact@Discord>
2021-11-04 22:49:23 +01:00
Michael Vines 9acb082dc3 Upgrade to Solana v1.8.1 2021-10-20 22:52:19 -07:00