Commit Graph

2657 Commits

Author SHA1 Message Date
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
Jon Cinque 6e125f88a9
token[-2022]: Change `target_arch` to `target_os` (#3493) 2022-08-18 13:38:10 +02:00
Justin Malčić 8d88fb6c88
Add slippage constraint to borrow instruction (#3423)
* Add slippage limit to instruction

* Add slippage error

* Return error if below slippage limit

* Add tests

* Remove TODO

* Split instruction

* Fix test name

* Test limit case

* Update test

* Revert "Split instruction"

This reverts commit 3eba4942bd51f2402bf112edb514882636f0e401.

# Conflicts:
#	token-lending/program/tests/borrow_obligation_liquidity.rs

* Allow missing slippage_limit

* Fix limits

* Remove assertion
2022-08-17 15:58:04 +02:00
Justin Malčić e8bafb4b3f
Handle invalid fee account in `token-swap` (#3484)
* Add pool fee account checking

* Add checks for closed account

* Fix clippy warning

* Fix clippy warnings (again)

* Remove assertions
2022-08-17 15:56:43 +02:00
Jordan Sexton d6297495ea
token/js - make unpack functions consistent (#3486)
* make argument order and comments consistent for unpack functions

* add function to unpack multisig for parity

* update spl-memo version

* patch version bump

* run prettier

* fix comment

* update lockfile
2022-08-16 16:20:54 -05:00
Jon Cinque 10a70ddb3c
memo-ts: Make everything like token/js (#3479)
* memo-ts: Make everything like token/js

* Address feedback

* Update memo/js/README.md

* Update memo/js/README.md

Co-authored-by: Jordan Sexton <jordan@jordansexton.com>
2022-08-16 14:31:48 -05:00
Tyera Eulberg 3c54aecfe9
Bump solana to v1.10.35 (#3485) 2022-08-16 12:33:24 -06:00
Noah Gundotra d685fe1918
Introduce Concurrent Merkle Tree Implementation (#3455) 2022-08-16 10:54:37 -07:00
Tyera Eulberg 5d03efbabe
Bump token-2022 to 0.4.3 (#3480) 2022-08-15 22:08:32 -06:00
Jon Cinque d611db6a01
docs: Add token-2022 extension docs and JS examples (#3457)
* token-js: Add examples for all extensions

* docs: Add token-2022 extensions guide for JS

* Address feedback

* Fix extension
2022-08-16 01:07:21 +02:00
hanako mumei 2ea6dfa1de token-cli: let clients return signature or txn 2022-08-15 16:06:50 -07: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
Jon Cinque 008809e8d6 Add docs for migrating a program to two token programs 2022-08-15 23:53:26 +02:00
Jon Cinque da27180b31 Fixup client bindings and otherwise 2022-08-15 23:53:26 +02:00
Jon Cinque 25556ce680 Step 4: Use appropriate token program 2022-08-15 23:53:26 +02:00
Jon Cinque e77efb3927 Step 3: Write tests using multiple token programs at once 2022-08-15 23:53:26 +02:00
Jon Cinque b13a7cab89 Step 2: Update instruction processors 2022-08-15 23:53:26 +02:00
Jon Cinque 16b441edb8 Step 1: Update all instruction interfaces 2022-08-15 23:53:26 +02:00
Pierre 730b628c57
token-js: expose unpack methods (#3471)
* feat: expose unpack methods

* default program id

Co-authored-by: Arrowana <8245419+Arrowana@users.noreply.github.com>
2022-08-15 15:30:51 +02:00
Jon Cinque d9a284f85f
toolchain: Pin repo to 1.59.0 using rust-toolchain.toml (#3466) 2022-08-12 16:59:23 +02:00
Jon Cinque 5050257541
ci: Disable twoxtx for now (#3460) 2022-08-11 23:42:23 +02:00
Jon Cinque 10addb2c16
ci: Add rocksdb to ignore audit (for now) (#3458) 2022-08-11 22:47:07 +02:00
Jon Cinque 6f2fc9965f
stake-pool: Bump versions to 0.7.0 (#3456) 2022-08-11 19:52:23 +02:00
samkim-crypto cccce80e65
Confidential transfer zk doc (#3437)
* docs: transfer and sigma proof discussions

* docs: add sigma proof notes

* docs: add transfer with fee notes

* docs: minor wording
2022-08-11 22:53:03 +09:00
Jon Cinque 1970356887
token-js: Version bump to 0.3.0 (#3448)
* token-js: Bump version 0.3.0 for release

* Improve README with support info
2022-08-09 18:54:46 +02:00
Jon Cinque 6b5e7cbbeb
token-js: Add reallocate instruction implementation (#3447) 2022-08-09 17:26:31 +02:00
Sumeet 3f25f59c96
Issue 2243 comments and source for system program instruction (#3439) 2022-08-09 17:10:57 +02: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
Mike MacCana 3e104df32f Rename e to tokenAccount / error as appropriate 2022-08-08 16:16:32 +02:00
Jon Cinque b096cdecc1 Address feedback 2022-08-05 20:42:41 +02:00
Jon Cinque 3b63824a60 Add doc file 2022-08-05 20:42:41 +02:00
Jon Cinque fdf7786be0 Step 6: Use `StateWithExtensions` instead of `Mint` and `Account` 2022-08-05 20:42:41 +02:00
Jon Cinque b3c432a0f3 Step 5: Add extensions to tests 2022-08-05 20:42:41 +02:00
Jon Cinque 4b4214e1aa Step 4: Replace spl_token::id() with a parameter 2022-08-05 20:42:41 +02:00
Jon Cinque 3955c3f994 Step 3: Update instruction creators to use spl_token_2022 2022-08-05 20:42:41 +02:00
Jon Cinque a07ec0a615 Step 2: Update all tests to test cases for token and token-2022 2022-08-05 20:42:41 +02:00
Jon Cinque 5539bad023 Step 1: Update dependencies for tests 2022-08-05 20:42:41 +02:00
Pierre 52d329ee53
fix reference to the field hold_up_time in the governance README (#3428)
* fix reference to the field hold_up_time

* remove incorrect space

Co-authored-by: Arrowana <8245419+Arrowana@users.noreply.github.com>
2022-08-05 00:38:44 +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
Tyera Eulberg 4a56a4b840
Prep for spl-token v3.5.0 (#3426)
* check that unpack is tolerant of small sizes (#3416)

* Refactor unpack and make test more robust (#3417)

* Refactor hasty fix to match token-2022

* Make test exhaustive

* cargo fmt

Co-authored-by: Michael Vines <mvines@gmail.com>

* Readd proptests without losing unit test, #3421

Co-authored-by: anatoly yakovenko <anatoly@solana.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
2022-08-04 00:25:07 -06:00
Tyera Eulberg 3d53fa259c
Move ATA tests to separate crate (#3429) 2022-08-04 00:24:37 -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 4fadd553e1
token: Reassign and reallocate accounts on close (#3415)
* token: Reassign and reallocate accounts on close

* Revert "Refactor unpack and make test more robust (#3417)"

This reverts commit c618de374e.

* Revert "check that unpack is tolerant of small sizes (#3416)"

This reverts commit 22faa05f18.

* Also revert d7f352bd78
2022-08-03 23:49:36 +02: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 d7f352bd78
token[-2022]: Add proptest for unpacking (#3421) 2022-08-03 20:01:08 +02:00
Jon Cinque 4aa529d194
ci: Separate twoxtx build step, match Rust version (#3422)
* ci: Separate twoxtx build step, match Rust version

* Make a change to trigger CI

* Really trigger CI this time

* Fixup yaml issue

* Also set RUST_STABLE_VERSION

* Define env variable earlier
2022-08-03 19:53:35 +02:00
Tyera Eulberg c618de374e
Refactor unpack and make test more robust (#3417)
* Refactor hasty fix to match token-2022

* Make test exhaustive

* cargo fmt

Co-authored-by: Michael Vines <mvines@gmail.com>
2022-08-03 01:44:55 -06:00