Commit Graph

84 Commits

Author SHA1 Message Date
Jon Cinque d0bd3342e2
token-2022: Bump program, cli, and client for release (#4039) 2023-02-09 00:27:05 +01:00
Jon Cinque 3136a49850
token-cli: Remove multisig owner as signer (#4017) 2023-02-06 20:53:26 +01:00
samkim-crypto 394c930f18
[token-2022, confidential-extension] Add confidential transfer authority type (#4025) 2023-02-06 12:50:35 +09:00
joeaba 891b4bdad8
chore: update maintainer references (#4008) 2023-01-31 08:06:36 -05:00
Jon Cinque 88684d52a2
ci: Update repo to Solana 1.14.12 (#3989) 2023-01-19 21:47:03 +01:00
samkim-crypto b9aba3fb8d
[confidential-extension] Use `OptionalNonZeroPubkey` and `OptionalNonZeroEncryptionPubkey` for confidential extension (#3943)
* use OptionalNonZeroPubkey for the confidential mint authority pubkey

* add OptionalNonZeroEncryptionPubkey

* update tests

* Update token/program-2022/src/pod.rs

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

* remove unnecessary COption convertion for OptionalNonZeroEncryptionPubkey

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2022-12-23 11:06:18 +09:00
samkim-crypto 6386f24253
[confidential-extension] Restrict `InitializeMint` and `UpdateMint` instructions (#3938)
* restrict `UpdateMint` instruction

* update tests and token client for `UpdateMint`

* restrict `InitializeAccount` instruction

* update client and tests for `InitializeMint` instruction
2022-12-20 14:24:31 +09:00
samkim-crypto ba2b7951fc
remove ElGamal pubkey from confidential transfer `ConfigureAccount` data (#3927) 2022-12-19 11:58:46 +09:00
Jon Cinque ae994afa3e
Update repo to `edition = "2021"` (#3900) 2022-12-13 23:46:26 +01:00
samkim-crypto bb404a6af5
update solana to 1.14.10 (#3872) 2022-12-06 12:59:00 +09:00
hanako mumei 0de5f7339a bump token-cli to 2.2 and token-client to 0.3 2022-11-21 12:41:53 -08:00
hanako mumei 3c4267be06 token-2022: bump version to 0.5 2022-11-21 09:29:18 -08:00
samkim-crypto 6725958c26
[token-2022] Enable confidential payments only feature (#3790)
* add allow_non_confidential_credits field

* add tests for disabling non-confidential transfers

* Apply suggestions from code review

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* clarify comment wording

* Update token/program-2022/src/extension/confidential_transfer/processor.rs

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

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2022-11-17 13:10:21 +09:00
Jon Cinque 8d0a2e1000
token-2022: Add PermanentDelegate extension (#3725)
* token-2022: Add PermanentDelegate extension

* Address feedback

* Refactor getting permanent delegate

* Rename function

* More cleanup

* Fix ATA
2022-11-15 14:10:59 +01:00
Jon Cinque d50f2745f8
token-cli: Support transfer fee extension (#3792)
* token-cli: Add transfer fee to create-token

* Add `expected-fee` arg to transfer

* Add withdraw-withheld-tokens implementation

* Add optional `Harvest` call while closing account

* Add `set-transfer-fee` command

* Fix rebase issues
2022-11-11 19:16:51 +01:00
samkim-crypto abc77af1d9
Require pubkey validity proof when initializing confidential account (#3784) 2022-10-30 14:51:22 +09:00
samkim-crypto 0c8fb24d47
upgrade solana-program to 1.14.6 (#3765) 2022-10-27 07:59:25 +09:00
hanako mumei 836c9e67a6 token-2022: implement CpiGuard
(this is a reversion of a previous reversion of the original CpiGuard commit)
2022-10-25 19:31:15 -07:00
Trent Nelson 2c28eaa036
Revert "token-2022: implement CpiGuard (#3712)"
This reverts commit 126fb93be2.
2022-10-25 00:46:00 -06:00
hana 126fb93be2
token-2022: implement CpiGuard (#3712)
token-2022: implement CPI Guard

CPI Guard is an extension to block certain unsafe token operations from being done by programs through CPI
2022-10-24 18:36:57 -07:00
hanako mumei 88b147506d bump token-cli to 2.1.1 and token-client to 0.2.1 2022-10-12 10:48:23 -07:00
hanako mumei 3a87c8fc0a update solana to 1.14.4 2022-10-12 10:48:23 -07:00
hanako mumei 5f189d1fc0 bump token-client to 0.2.0 and token-cli to 2.1.0 2022-10-10 17:36:34 -07:00
hanako mumei 51f5e93e4e token-client: clean up useless temp vecs 2022-10-07 14:08:27 -07:00
hanako mumei a5a565b56c token-client: move decimals from Token methods to struct 2022-10-07 12:24:36 -07:00
hanako mumei 200b2acab4 token-cli: final fixes for client conversion 2022-10-06 17:33:34 -07:00
hanako mumei 2c6fbf7c67 token-cli: make gc transfer tokens from uncloseable
also change client transfer to use idempotent associated account instruction
2022-10-06 17:33:34 -07:00
hanako mumei 7847f35f1e token-cli: convert transfer to client 2022-10-06 17:33:34 -07:00
hanako mumei e6739b5bae token-cli: convert gc to client
add new client function empty_and_close_auxiliary_account which does what it says
also remove sign-only mode from command_close to permit client close behave more sensibly
2022-10-06 17:33:34 -07:00
hanako mumei 186303a9d2 token-cli: convert create_multisig to client 2022-10-06 17:33:34 -07:00
hanako mumei 7e3a62473b token-client: convert extended functions to new interface
covers all extensions except confidential transfers
2022-10-06 17:33:34 -07:00
hanako mumei 2ae2a6bdf3 token-cli: test --immutable, final cleanups 2022-09-21 10:37:53 -07:00
hanako mumei 5756e7f9b7 token-cli: convert unwrap and sync_native to client
also allow client to control its own nativeness (nativity?)
2022-09-21 10:37:53 -07:00
hanako mumei 953e06b3a2 token-client: support wrap
also convert cli to use client for wrap
2022-09-21 10:37:53 -07:00
Jon Cinque f97a3dc7cf
clippy: Deny integer arithmetic, add allows where needed (#3606) 2022-09-15 13:16:53 +02:00
samkim-crypto 7633f6f81d
token-2022: Add support for non transferable and immutable ownership in token client (#3582)
* add token client support for non transferable mint

* resolve conflict

* add basic tests for non transferable token account

* add test for fees for non-transferable accounts

* resolve test failure from rebase
2022-09-14 17:37:09 +09:00
samkim-crypto 4587da1eab
confidential-extension: Restrict deposit source and withdraw dest to base accounts (#3540)
* resolve conflict

* update token client for new deposit syntax

* resolve conflict

* update tests

* address doc comments
2022-09-14 16:22:52 +09:00
Jon Cinque 49a119b105
token-client: Add fmt::Display implementation to RpcClientResponse (#3594)
* token-client: Add Display to RpcClientResponse

* Handle crates defined as `{ version = "...", ... }
2022-09-12 22:09:55 +02:00
Jon Cinque 6bcd051d38
token-client: Change create_account to return T::Output (#3584) 2022-09-10 16:01:50 +02:00
hanako mumei 4dfd23e0b6 token-client: memo now explicitly declares signers 2022-09-07 18:17:54 -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 b91972debb token-cli: use token client for freeze/thaw/revoke 2022-08-31 13:57:41 -07:00
hanako mumei db4a950ca8 token-client: convert freeze/thaw interface 2022-08-31 13:57:41 -07:00
hanako mumei 1fb05454e7 token-client: convert approve/revoke interface 2022-08-31 13:57:41 -07:00
hanako mumei b30aac80a6 token-client: convert transfer interface 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
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 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