Commit Graph

874 Commits

Author SHA1 Message Date
dependabot[bot] 59676cb8d1
Bump @solana/web3.js from 0.75.0 to 0.75.2 in /token/js (#447)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.75.0 to 0.75.2.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.75.0...v0.75.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-15 08:41:02 +00:00
dependabot[bot] e1ea855f36
Bump @babel/core from 7.11.4 to 7.11.6 in /token/js (#446)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.4 to 7.11.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.6/packages/babel-core)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-15 08:40:29 +00:00
dependabot[bot] 30b29320ac
Bump eslint from 7.8.1 to 7.9.0 in /token-swap/js (#445)
Bumps [eslint](https://github.com/eslint/eslint) from 7.8.1 to 7.9.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.8.1...v7.9.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-15 08:39:47 +00:00
Tyera Eulberg e7a876f280
Remove Pack mutable unpack methods (#443)
* Remove Pack::unpack_mut

* Remove Pack::unpack_unchecked_mut
2020-09-14 15:08:14 -06:00
Michael Vines cf50a55586 create-token/create-account now accept an optional keypair 2020-09-14 19:11:05 +00:00
Jon Cinque 4dd9754624
Re-enable token-swap ci (#442) 2020-09-14 16:56:00 +02:00
dependabot[bot] 3899b8ee7b
Bump @babel/preset-env from 7.11.0 to 7.11.5 in /token/js (#440)
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.11.0 to 7.11.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.5/packages/babel-preset-env)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-14 08:50:33 +00:00
dependabot[bot] c3631d2592
Bump @solana/web3.js from 0.75.0 to 0.75.2 in /token-swap/js (#439)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.75.0 to 0.75.2.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.75.0...v0.75.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-14 08:50:27 +00:00
Tyera Eulberg 7515187d17
Allow source account to be its own owner in Approve, Approve2, and Revoke (#434)
* Add failing test

* No need to hold source RefMut in process_approve

* Add revoke cases

* No need to hold source RefMut in process_revoke
2020-09-11 20:53:23 -06:00
Tyera Eulberg 4c0e4606c2
Allow Account or Mint to be its own authority in SetAuthority (#435)
* Add failing test

* No need to hold account or mint RefMut in process_set_authority
2020-09-11 20:53:07 -06:00
Tyera Eulberg 288b438868
Allow destination or mint to be mint_authority in MintTo and MintTo2 (#436)
* Add failing test

* No need to hold dest or mint RefMut in process_mint_to
2020-09-11 20:52:53 -06:00
Tyera Eulberg 179be4a590
Allow source or mint to be account owner or delegate in Burn and Burn2 (#437)
* Add failing test

* No need to hold source or mint RefMut in process_burn
2020-09-11 20:52:39 -06:00
Tyera Eulberg 6c9e8ac1ce
Allow source to be owner/close_authority in CloseAccount (#438)
* Add failing tests

* No need to hold source RefMut in process_close_account and process_toggle_freeze_account
2020-09-11 20:52:09 -06:00
Tyera Eulberg 1fcc84beb3
Allow source account to be its own owner in Transfer and Transfer2 (#433)
* Add failing test

* Add Transfer2 to failing test

* Add source-delegate to failing test

* No need to hold source RefMut in process_transfer

* Fixup comments

* Add destination-owner test case

* Add source-multisig test case
2020-09-11 18:56:42 +00:00
Jack May 72c59056e5
Fix spelling (#430) 2020-09-11 09:32:49 -07:00
Jon Cinque 759cbb3866
Pack instructions and state more efficiently (#420)
* Pack instructions and state more efficiently

* SwapInfo and SwapInstruction are more memory-efficient, following the
  example from SPL Token
* Remove unnecessary helper structs to make instructions clearer
* Error -> SwapError
* Update JS tests to reflect the change

* Integrate review feedback
2020-09-11 18:19:06 +02:00
dependabot[bot] 330bf3f98f
Bump eslint from 7.7.0 to 7.8.1 in /token/js (#425)
Bumps [eslint](https://github.com/eslint/eslint) from 7.7.0 to 7.8.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.7.0...v7.8.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-11 08:40:12 +00:00
dependabot[bot] b967728073
Bump rollup from 2.26.5 to 2.26.11 in /token/js (#424)
Bumps [rollup](https://github.com/rollup/rollup) from 2.26.5 to 2.26.11.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v2.26.5...v2.26.11)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-11 08:40:05 +00:00
dependabot[bot] 89abd07e7a
Bump eslint from 7.7.0 to 7.8.1 in /token-swap/js (#423)
Bumps [eslint](https://github.com/eslint/eslint) from 7.7.0 to 7.8.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.7.0...v7.8.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-11 08:39:59 +00:00
dependabot[bot] 793930c835
Bump prettier from 2.0.5 to 2.1.1 in /token/js (#322)
Bumps [prettier](https://github.com/prettier/prettier) from 2.0.5 to 2.1.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.0.5...2.1.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-10 23:18:33 +00:00
Tyera Eulberg a8df113101
Add token/program2 for next changeset (#412)
* Add token/program2 for next changeset

* Use version number instead of index
2020-09-10 16:04:50 -06:00
Tyera Eulberg 20d8685249
Rebase on solana-web3 bump (#421)
* Rebase on solana-web3 v0.75.0

* Doc cleanup
2020-09-10 21:20:23 +00:00
Daniel Kelleher ac3004b3c7
Wrapped SOL support (#416)
* Add support for wrapped native token account generation in the Token JS client.

* Some small changes to the token test script as per review comments
2020-09-10 13:16:24 -06:00
dependabot[bot] 2ffc5289bb
Bump node-fetch from 2.6.0 to 2.6.1 in /token-swap/js (#417)
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-10 18:54:56 +00:00
dependabot[bot] 55c8ae85e0
Bump node-fetch from 2.6.0 to 2.6.1 in /token/js (#418)
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-10 18:54:01 +00:00
Jon Cinque f5e0d793a9
token-swap: Swap instruction fix and update libs for CI (#408)
* token-swap: Fix swap instruction

* Update SDK libs and fix outstanding issues

* Run lint in token/js

* Disable CI token-swap js tests

* Update code for web3.js 0.75.0

* Update output -> destination verbiage for clarity / consistency
2020-09-10 20:16:50 +02:00
Tyera Eulberg 7141298b2f
Flesh out @solana/spl-token with token2 instructions (#410)
* Fix token-js docs

* Add Freeze/Thaw instructions

* Add v2 instructions

* Add new instructions to js test

* Bump @solana/spl-token to v0.0.8

* Fix didThrow and remove invalidApprove
2020-09-10 17:17:45 +00:00
Justin Starry 708bb430ab
Bump dependencies from 1.3.8 to 1.3.9 (#415) 2020-09-10 17:25:43 +08:00
dependabot[bot] 638f652529
Bump @solana/web3.js from 0.73.0 to 0.75.0 in /token-swap/js (#413)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.73.0 to 0.75.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.73.0...v0.75.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-10 08:38:20 +00:00
Greg Fitzgerald 0ca4a61e4d
Javascript -> JavaScript (#409) 2020-09-09 17:57:30 -06:00
Trent Nelson 72fc795f90 Bump SPL Token CLI version to 2.0.1 2020-09-09 17:14:13 +00:00
Jon Cinque f6fc53c311
token-swap: Fix withdraw instruction (#405)
* Include pool mint in instruction, required for burning
* Add simple Rust test
* Fix js withdraw test
2020-09-09 18:00:03 +02:00
Daniel Kelleher b8066f2e08
Fix for token ts declarations - import the correct Account object (#400) 2020-09-09 09:35:38 -06:00
Jon Cinque db729af089
Fix deposit instruction (#399)
* Fix deposit instruction

* Refactor tests for easier composibility
* Add deposit instruction and test
* Deposit JS test works again

* Fix js lint
2020-09-09 10:59:27 +02:00
dependabot[bot] 85b28cbe82
Bump @solana/web3.js from 0.71.11 to 0.73.0 in /token-swap/js (#404)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.71.11 to 0.73.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.71.11...v0.73.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-09 08:59:12 +00:00
dependabot[bot] f842f276e5
Bump solana-cli-config from 1.3.8 to 1.3.9 (#402)
Bumps [solana-cli-config](https://github.com/solana-labs/solana) from 1.3.8 to 1.3.9.
- [Release notes](https://github.com/solana-labs/solana/releases)
- [Changelog](https://github.com/solana-labs/solana/blob/master/RELEASE.md)
- [Commits](https://github.com/solana-labs/solana/compare/v1.3.8...v1.3.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-09 08:45:25 +00:00
dependabot[bot] 5bb0a04960
Bump solana-logger from 1.3.8 to 1.3.9 (#403)
Bumps [solana-logger](https://github.com/solana-labs/solana) from 1.3.8 to 1.3.9.
- [Release notes](https://github.com/solana-labs/solana/releases)
- [Changelog](https://github.com/solana-labs/solana/blob/master/RELEASE.md)
- [Commits](https://github.com/solana-labs/solana/compare/v1.3.8...v1.3.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-09 08:45:19 +00:00
R. M. Shea b5cbedc51c
Update logos (#389)
Co-authored-by: Ryan Shea <rmshea@users.noreply.github.com>
2020-09-08 09:59:15 -06:00
dependabot[bot] cb2370f332
Bump @babel/core from 7.11.4 to 7.11.6 in /token-swap/js (#396)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.4 to 7.11.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.6/packages/babel-core)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-08 08:34:08 +00:00
dependabot[bot] cd774fc3e7
Bump @babel/plugin-transform-runtime in /token-swap/js (#394)
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.11.0 to 7.11.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.5/packages/babel-plugin-transform-runtime)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-07 08:36:15 +00:00
dependabot[bot] 11b1e3eefd
Bump @solana/web3.js from 0.71.10 to 0.71.11 in /token-swap/js (#392)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.71.10 to 0.71.11.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.71.10...v0.71.11)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-05 22:46:30 +00:00
Jon Cinque ac73bd2e73
Fix token-swap tests (#388)
* Fix local token-swap tests

* Change generation of program address to use a nonce
* Accept nonce properly in initialization
* Include nonce in TokenSwap structure
* Fixup serialization with new parameter (padding used for now)
* Update dependencies

Update toml / lock files

Fix token swap initialization end-to-end

Cleanup unit test to use `find_program_address`

Add / refactor tests

Most importantly, added a special test to make sure that
token_program_id is provided at the end of CPI instructions, since
unit testing did not pick up that problem, and it was tough to debug
during end-to-end testing

* Revert some testing changes for PR

* Update token-swap/program/src/processor.rs

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

* Integrate review comments

* Fmt and clippy

* Refactor for clippy

* Fmt again

* Fix npm lint error

* Clarify signers line as requested

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-09-06 00:09:05 +02:00
Trent Nelson 9eb10d9144 Unrelated clippy... 2020-09-04 01:18:44 -06:00
Trent Nelson e00a6f1add Bump Token version to 2.0.4 2020-09-04 01:18:44 -06:00
Trent Nelson b15eb09cfb Bump solana crates to 1.3.8 2020-09-04 01:18:44 -06:00
Trent Nelson ddc47a6d86 Fix TokenSwap initialization test 2020-09-04 01:18:44 -06:00
Tyera Eulberg 07dcf3a1ec
Fix up spl-token docs (#379)
* Fixup spl-token docs

* Apply suggestions from code review

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

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-09-02 01:41:05 +00:00
Jack May 0637e358bc
Add back token perf monitor (#380) 2020-09-01 17:27:11 -07:00
Trent Nelson 5f425e5a3e
Token CLI: Use Token2 instructions (#375) 2020-09-01 14:29:12 -06:00
Trent Nelson b011698251 Token CLI: Support arbitrary signers
eg. Ledger
2020-09-01 17:47:55 +00:00