hanako mumei
f3f9995484
token-cli: impl display for interest and transfer fee
2022-09-14 11:36:40 -07:00
hanako mumei
bdd0d4938a
token-cli: impl display for half of extensions
2022-09-14 11:36:40 -07:00
hanako mumei
b90903c990
token-cli: impl two extensions for display
...
also indent all the displys cutely
2022-09-14 11:36:40 -07:00
hanako mumei
6d61b8e3e4
token-cli: impl `spl-token display` for mint
...
also show decimals for accounts, because we can
2022-09-14 11:36:40 -07:00
hanako mumei
00b8e7a8b1
token-cli: modernize account-info, impl display
2022-09-14 11:36:40 -07:00
hanako mumei
f8d1503acf
token-cli: convert multisig display to UiMultisig
2022-09-14 11:36:40 -07:00
hanako mumei
bdc3087533
token-cli: modernize multisig display
2022-09-14 11:36:40 -07:00
hanako mumei
065a04788d
token-cli: remove unnecessary program_id logic
2022-09-09 09:56:19 -07:00
hanako mumei
4dfd23e0b6
token-client: memo now explicitly declares signers
2022-09-07 18:17:54 -07:00
hanako mumei
8e6caf45ac
token-cli: new config function get_account_checked
...
this replaces all instances of rpc_client.get_account -> check_owner
also we convert from rpc_client to program_client to further enforce offlineness
2022-09-07 14:36:39 -07:00
hanako mumei
d2c33e26a4
token-cli: infer program_id based on cli args
2022-09-07 14:36:39 -07:00
hanako mumei
191977e2c6
token-cli: normalize argument names/descriptions
...
we now strictly adhere to the pattern:
* positional arg named `token`: a mint, described `TOKEN_MINT_ADDRESS`
* positional arg named `account`: an account, described `TOKEN_ACCOUNT_ADDRESS`
* positional arg named `address`: a mint or account, described `TOKEN_ADDRESS`, or a multisig, described `MULTISIG_ACCOUNT_ADDRESS`
* `--address` flag, named `address`: an account, described `TOKEN_ACCOUNT_ADDRESS`
normalize burn, unwrap, and supply to follow this convention
2022-09-07 14:36:39 -07:00
hanako mumei
b9cab85d81
token-cli: final cleanups on client refactor
...
use mint for Token objects whenever possible, rework multisig_signers to be prettier
2022-08-31 13:57:41 -07:00
hanako mumei
5e494c63e0
token-cli: promote fee_payer to Arc<dyn Signer>
2022-08-31 13:57:41 -07:00
hanako mumei
cf25381108
token-cli: use token client for approve
2022-08-31 13:57:41 -07:00
hanako mumei
b91972debb
token-cli: use token client for freeze/thaw/revoke
2022-08-31 13:57:41 -07:00
hanako mumei
46206fe64c
token-cli: support memo on command_mint
2022-08-31 13:57:41 -07:00
hanako mumei
8e196e5e77
token-cli: use token client for command_burn
2022-08-31 13:57:41 -07:00
hanako mumei
e540b172db
token-cli: use token client for command_mint
...
* client: change mint_to to accept decimals and prefer mint_checked
* client: move multisig key winnowing into utility function
2022-08-31 13:57:41 -07:00
hanako mumei
8d1e57018a
token-cli: finish interest bearing mint
...
minor cleanups, guards on set-interest-rate, impl set-authority for interest-bearing mints
2022-08-30 21:12:59 -07:00
Udbhav Muthakana
fbae99fe2c
token-cli: Support the InterestBearingMint extension
2022-08-30 21:12:59 -07:00
Andrii Tretyakov
d65ab18fbd
token-cli: Removed usage of Account::LEN as a verificaton for token account ( #3527 )
...
replaced with Account::valid_account_data to support token2022
2022-08-29 12:42:33 -07:00
hanako mumei
84c566b13e
bump token-cli to 2.0.17
...
release has already been made and lives in the `token-cli-v2.0.17-branch` branch
2022-08-25 17:54:38 -07:00
hanako mumei
9382641da2
token-cli: remove #[allow(deprecated)] from toplevel
...
also remove ArcSigners temp code
2022-08-25 09:53:29 -07:00
hana
e03a013184
token-cli: support `MintCloseAuthority` ( #3487 )
...
* cli: add --enable-close flag to create-token which sets its close authority to mint authority
* cli: add support to changing a mint close authority to authorize
* cli: add close-mint, a new command for closing a mint
* cli: update authorize and close-account to go through the token client
* client: change set_authority and close_account to support multisigners
2022-08-23 15:54:10 -07:00
hanako mumei
e06506b40b
token-cli: dont push duplicates to bulk_signers
2022-08-22 16:28:43 -07:00
hanako mumei
c426ed9749
Refactor create-token to go through token client
...
* cli: remove offline args from commands that create accounts
* cli: implement finish_tx, to be a replacement for handle_tx, which branches on the client return
* client: validate a transaction is fully signed before sending over rpc
* client: convert payer from Signer to Arc<dyn Signer> to support cli signers
* client: support nonce mode
* client: change create_mint to be an object method that returns SendTransaction::Output
* client: rename S2 to S everywhere that Token<T, S> is Token<T>
2022-08-18 17:35:55 -07:00
hana
65769ce23d
Update rust to 1.60, solana to 1.11.6 ( #3492 )
...
also change bpf to sbf throughout the codebase
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2022-08-18 12:16:02 -07:00
Tyera Eulberg
3c54aecfe9
Bump solana to v1.10.35 ( #3485 )
2022-08-16 12:33:24 -06:00
hanako mumei
c5caba0d63
token-cli: use program_client for blockhash
2022-08-15 16:06:50 -07:00
Jon Cinque
3d42786e6e
token-cli: Add no-op client
2022-08-15 16:06:50 -07:00
Justin Malčić
cc2739fce1
token-cli: Clone signers ( #3290 )
...
* Switch to Arc
* Add temporary structs
To be removed upon upstream changes
* Get multisig signers earlier
* Build SignerFromPathConfig with multisig pubkeys
* Get default signer and address
* Store default signer and address
* Use stored default address
* Use stored default signer
* Avoid rereading signer for fee payer
* Clean up use statements
* Rename to ArcSigner
* Remove default_keypair
* Remove default_address
* Add comment for temporary newtype
* Refactor config
* Create config from args in tests
* Remove unused params
* Fix clippy warnings
* Fix rustfmt warnings
* Fix clippy warnings
* Move imports
2022-08-08 23:40:08 +02:00
Tyera Eulberg
7c6235d9e7
Bump token to v3.5.0 and ata to v1.1.1 ( #3430 )
2022-08-04 01:09:38 -06:00
Jon Cinque
f5ce86d43d
token/ata: Bump versions to 3.4.0 and 1.1.0, respectively ( #3427 )
2022-08-04 01:03:04 +02:00
hana
abc63ad946
token-cli: don't error when missing default config ( #3424 )
2022-08-03 14:58:24 -07:00
Jon Cinque
93ec6cf74a
token-cli: Split out CI into separate step, run tests in serial ( #3425 )
...
* token-cli: Split out CI into separate step, run tests in serial
* Remove dependency on cargo-test-bpf to speed things up
* Don't download programs since they won't be available
2022-08-03 21:54:35 +02:00
Jon Cinque
8f74ba517c
token-cli: Run fewer tests at once ( #3414 )
2022-08-03 01:14:55 +02:00
Jon Cinque
674b0ac70e
token-cli: Add token-client dependency for token-2022 support ( #3386 )
2022-08-01 17:13:42 +02:00
Jon Cinque
80b8ff3b1d
token-cli: Run tests in batches ( #3396 )
2022-07-30 00:34:49 +02:00
Tyera Eulberg
c00194d225
Bump solana crates to v1.10.33 ( #3385 )
2022-07-27 11:28:14 -06:00
Jon Cinque
48e6acb53f
token-cli: Support base token-2022 (without extensions) ( #3071 )
2022-07-27 10:47:43 +02:00
Jon Cinque
60117fd9c5
token-cli: Figure out program_id dynamically ( #3354 )
...
* Resolve program id with mint info, use it where possible
* Avoid using `config.program_id` when we can figure it out
* Rename function
2022-07-25 23:22:47 +02:00
Jon Cinque
37280ce2e6
token-cli: Move everything to async ( #3353 )
2022-07-25 21:05:01 +02:00
Jon Cinque
725430d81c
Revert "token-cli: Downgrade to crates.io versions for release ( #3371 )" ( #3372 )
...
This reverts commit 1c9e2a540c
.
2022-07-23 20:16:24 +02:00
Jon Cinque
1c9e2a540c
token-cli: Downgrade to crates.io versions for release ( #3371 )
2022-07-23 19:14:14 +02:00
Jon Cinque
4d1f8169a9
token-cli: Make BPF program builds in build.rs dependent on env var ( #3362 )
...
* token-cli: Make BPF program build dependent on env var
* Do it during `build` and not `test`
2022-07-22 09:30:30 +02:00
Justin Malčić
04954d0a1e
Add delegation tests ( #3316 )
...
* Add transfer test
* Add burn test
* Fix formatting
2022-07-21 14:51:45 +02:00
Jon Cinque
b709607271
token-cli: Bump version to 2.0.16 for release ( #3360 )
2022-07-20 20:15:03 +02:00
Alisamar Husain
b39efe8fb8
token-cli: Fix unexpected behavior when closing a wrapped SOL account with another wrapped SOL account as recipient ( #3278 )
...
* Check if recipient is a wrapped account
* Make clippy and fmt happy
* Avoided mutable, more functional clarity
* Add test for closing wrapped sol account
* wrap the default account
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
* Fix formatting and failing tests
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2022-07-17 16:50:39 +02:00
Jon Cinque
5874a14584
token-cli: Move cmd test into a separate file ( #3306 )
2022-07-01 19:41:27 -04:00