Commit Graph

19 Commits

Author SHA1 Message Date
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
Jon Cinque 28f1ba9be5
token-2022: Add freeze / thaw through StateWithExtensions (#2848) 2022-02-01 00:24:59 +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 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
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
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 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
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 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
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
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
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