Commit Graph

155 Commits

Author SHA1 Message Date
dependabot[bot] 5fac4a46f5
Bump @babel/preset-env from 7.12.0 to 7.12.1 in /token-swap/js (#643)
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.12.0 to 7.12.1.
- [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.12.1/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-10-16 11:19:26 +00:00
dependabot[bot] 66390fd703
Bump @babel/preset-env from 7.11.0 to 7.12.0 in /token-swap/js (#635)
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.11.0 to 7.12.0.
- [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.12.0/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-10-15 11:22:03 +00:00
dependabot[bot] a83392dcdb
Bump @babel/core from 7.11.6 to 7.12.0 in /token-swap/js (#633)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.6 to 7.12.0.
- [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.12.0/packages/babel-core)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-15 11:16:05 +00:00
dependabot[bot] 2c5b31936e
Bump @babel/runtime from 7.11.2 to 7.12.0 in /token-swap/js (#634)
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.11.2 to 7.12.0.
- [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.12.0/packages/babel-runtime)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-15 11:12:18 +00:00
dependabot[bot] ed1764973d
Bump rollup from 2.29.0 to 2.30.0 in /token-swap/js (#619)
Bumps [rollup](https://github.com/rollup/rollup) from 2.29.0 to 2.30.0.
- [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.29.0...v2.30.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-14 11:55:50 +00:00
dependabot[bot] d878c1a877
Bump @solana/web3.js from 0.80.1 to 0.80.2 in /token-swap/js (#618)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.80.1 to 0.80.2.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.80.1...v0.80.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-14 11:50:52 +00:00
Yutaro Mori 5f56635fde
Pass TokenSwap state into the constructor to simplify function calls (#586)
* Pass TokenSwap state into the constructor to simplify function calls

* WIP: Update program to return token_program_id

* Add tokenProgramId to js TokenSwapInfo object

* Address pr comments

* Remove TokenSwapInfo and use loadTokenSwap as the primary way to fetch TokenSwap metadata

* Fix module.d.ts

* Address pr comments

* Clarification on comments

Co-authored-by: Yutaro Mori <yutaro@umaproject.org>
2020-10-14 12:37:58 +02:00
dependabot[bot] f944faeced
Bump @solana/web3.js from 0.80.0 to 0.80.1 in /token-swap/js (#608)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.80.0 to 0.80.1.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.80.0...v0.80.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-13 11:36:07 +00:00
dependabot[bot] dc408c4e4c
Bump eslint from 7.10.0 to 7.11.0 in /token-swap/js (#601)
Bumps [eslint](https://github.com/eslint/eslint) from 7.10.0 to 7.11.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.10.0...v7.11.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-12 12:33:11 +00:00
dependabot[bot] f07e4ed931
Bump @solana/web3.js from 0.79.0 to 0.80.0 in /token-swap/js (#602)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.79.0 to 0.80.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.79.0...v0.80.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-12 11:39:37 +00:00
dependabot[bot] d5c99b35bc
Bump @solana/web3.js from 0.78.3 to 0.79.0 in /token-swap/js (#588)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.78.3 to 0.79.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.78.3...v0.79.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-09 07:35:05 +00:00
Jon Cinque 5bd2e1c98c
Update token / token-swap npm package version (#585) 2020-10-09 01:03:09 +02:00
dependabot[bot] 31161eac67
Bump rollup from 2.28.2 to 2.29.0 in /token-swap/js (#580)
Bumps [rollup](https://github.com/rollup/rollup) from 2.28.2 to 2.29.0.
- [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.28.2...v2.29.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-08 10:27:36 +00:00
Justin Starry 9e76189a42
Clean up JS test getConnection function (#577) 2020-10-08 09:27:06 +00:00
dependabot[bot] 2b3f71c1ae
Bump @solana/web3.js from 0.78.2 to 0.78.3 in /token-swap/js (#571)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.78.2 to 0.78.3.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.78.2...v0.78.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-07 10:21:39 +00:00
Michael Vines aa9984e0d0 Replace mkdirp-promise with mkdirp 2020-10-06 18:01:48 -07:00
Jon Cinque 2b07fc1064
token-swap: Assess swap fee on input token (#562)
* token-swap: Assess swap fee on input token

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

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

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

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

* Fix new var name everywhere

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-10-02 22:47:39 +02:00
Jon Cinque bbc5f57dcc
token-swap: Add slippage to swap / withdraw / deposit (#560)
* token-swap: Add slippage to swap / withdraw / deposit

* Update JS snake_case -> camelCase

* Run prettier
2020-10-02 10:40:33 +02:00
dependabot[bot] 01e3c193f1
Bump flow-bin from 0.134.0 to 0.135.0 in /token-swap/js (#557)
Bumps [flow-bin](https://github.com/flowtype/flow-bin) from 0.134.0 to 0.135.0.
- [Release notes](https://github.com/flowtype/flow-bin/releases)
- [Commits](https://github.com/flowtype/flow-bin/commits)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-01 08:43:15 +00:00
dependabot[bot] 06f30cc829
Bump @solana/web3.js from 0.78.1 to 0.78.2 in /token-swap/js (#550)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.78.1 to 0.78.2.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.78.1...v0.78.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-30 08:40:25 +00:00
dependabot[bot] 663390b727
Bump eslint-plugin-import from 2.22.0 to 2.22.1 in /token-swap/js (#547)
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.22.0 to 2.22.1.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.22.0...v2.22.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-28 09:18:51 +00:00
dependabot[bot] 431299016b
Bump eslint from 7.9.0 to 7.10.0 in /token-swap/js (#545)
Bumps [eslint](https://github.com/eslint/eslint) from 7.9.0 to 7.10.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.9.0...v7.10.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-28 08:40:15 +00:00
dependabot[bot] c24e8245ea
Bump @solana/web3.js from 0.78.0 to 0.78.1 in /token-swap/js (#539)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.78.0 to 0.78.1.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.78.0...v0.78.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-25 19:33:10 +00:00
Jon Cinque 0a059706c0
Upgrade web3 to 0.78.0 and sdk to 1.3.13 (#537)
* Update `sendAndConfirmTransaction` to use `preflightCommitment` of
  `recent`. For the token tests, on my machine, it took roughly 18.5
  seconds, and with `skipPreflight: true` it was about 21.5 seconds.
2020-09-25 20:49:05 +02:00
dependabot[bot] 254d36affe
Bump rollup from 2.28.1 to 2.28.2 in /token-swap/js (#533)
Bumps [rollup](https://github.com/rollup/rollup) from 2.28.1 to 2.28.2.
- [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.28.1...v2.28.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-25 08:39:00 +00:00
dependabot[bot] 1a3f93f9bc
Bump @solana/web3.js from 0.76.0 to 0.77.0 in /token-swap/js (#525)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.76.0 to 0.77.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.76.0...v0.77.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-24 09:19:39 +00:00
Jon Cinque 13de66817d
token-swap: Improve pool token supply on initialization, deposit, and withdrawal (#508)
* token-swap: Add token supply in invariant calculation

* Refactor state classes into curve components for future use
* Align pool initialization with Uniswap using geometric mean of token
  amounts
* Fix deposit and withdraw instruction to work as a proportion of pool
  tokens
* Add math utilities to calculate the geometric mean with u64

* Improve variable names

* Use a fixed starting pool size

* Run cargo fmt

* Update js tests with new pool numbers

* Run linting

* Remove math

* Fix BN type issues found by flow
2020-09-23 23:08:44 +02:00
Jon Cinque 51c4dc6951
Fix lint check in CI (#519)
* Fix lint check in CI

* `npm run lint` now checks that code is properly formatted, instead of
  running the formatter
* Add extra commands to run the linting, include ts definitions file
* Update flow-bin, fix type errors that come up

* Clarify lint vs lint:fix as requested
2020-09-23 18:20:37 +02:00
Daniel Kelleher af98c77839
Expose Layouts and instruction creation functions to allow more flexible use of the Token and TokenSwap clients. (#517) 2020-09-23 14:22:56 +02:00
dependabot[bot] 1fc9d017e8
Bump @rollup/plugin-commonjs from 15.0.0 to 15.1.0 in /token-swap/js (#514)
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins) from 15.0.0 to 15.1.0.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Commits](https://github.com/rollup/plugins/compare/commonjs-v15.0.0...commonjs-v15.1.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-22 08:53:09 +00:00
dependabot[bot] 476e89f007
Bump rollup from 2.27.1 to 2.28.1 in /token-swap/js (#486)
Bumps [rollup](https://github.com/rollup/rollup) from 2.27.1 to 2.28.1.
- [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.27.1...v2.28.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-21 08:42:00 +00:00
Jon Cinque ba76d520eb
token-swap js: Prepare package for npm (#475)
* Run `pretty` properly
* Add `build:program` like for spl-token
* Add TypeScript to CI
* snake_case -> camelCase variables
* Combine transactions on swap initialization
* Make instruction functions static
2020-09-18 19:10:21 +02:00
dependabot[bot] c1dbc1cab9
Bump @solana/web3.js from 0.75.2 to 0.76.0 in /token-swap/js (#471)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.75.2 to 0.76.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.75.2...v0.76.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-18 08:42:06 +00:00
Daniel Kelleher 23a393801f
Token-swap ts, flow bindings and build using rollup. (#463)
* Added token-swap ts and flow bindings and build pure JS versions using rollup, to match the token program

* Added references to the built files in token-swap package.json

* Added missing Account import

* Fix flow module syntax errors
2020-09-18 09:31:16 +02:00
Jon Cinque 9edf7304d2
token-swap: Remove tokenSwapAccount as signer (#462) 2020-09-17 16:00:23 +02:00
dependabot[bot] 1e3a66b001
Bump @babel/cli from 7.11.5 to 7.11.6 in /token-swap/js (#457)
Bumps [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli) from 7.11.5 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-cli)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-17 08:40:04 +00:00
dependabot[bot] 6cc41494c4
Bump prettier from 2.1.1 to 2.1.2 in /token-swap/js (#449)
Bumps [prettier](https://github.com/prettier/prettier) from 2.1.1 to 2.1.2.
- [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.1.1...2.1.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-16 08:39:56 +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
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
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] 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] 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
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
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
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
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] 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 b15eb09cfb Bump solana crates to 1.3.8 2020-09-04 01:18:44 -06:00
dependabot[bot] a808c86df4
Bump @babel/cli from 7.10.5 to 7.11.5 in /token-swap/js (#378)
Bumps [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli) from 7.10.5 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-cli)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-01 08:28:44 +00:00
Michael Vines 9e23bc94cb Update to Solana 1.3.6 2020-08-29 22:12:00 +00:00
dependabot[bot] d42eda8d68
Bump @babel/core from 7.11.1 to 7.11.4 in /token-swap/js (#337)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.1 to 7.11.4.
- [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.4/packages/babel-core)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-27 23:55:23 +08:00
dependabot[bot] 19152cfcb7
Bump prettier from 2.1.0 to 2.1.1 in /token-swap/js (#319)
Bumps [prettier](https://github.com/prettier/prettier) from 2.1.0 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.1.0...2.1.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-26 08:34:28 +00:00
dependabot[bot] c2da3dbd48
Bump eslint from 7.6.0 to 7.7.0 in /token-swap/js (#287)
Bumps [eslint](https://github.com/eslint/eslint) from 7.6.0 to 7.7.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.6.0...v7.7.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-25 16:40:30 +00:00
dependabot[bot] 6f70d642e6 Bump bn.js from 5.1.2 to 5.1.3 in /token-swap/js
Bumps [bn.js](https://github.com/indutny/bn.js) from 5.1.2 to 5.1.3.
- [Release notes](https://github.com/indutny/bn.js/releases)
- [Changelog](https://github.com/indutny/bn.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/indutny/bn.js/compare/v5.1.2...v5.1.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-25 09:06:43 -07:00
dependabot[bot] b9265b450c
Bump prettier from 2.0.5 to 2.1.0 in /token-swap/js (#313)
Bumps [prettier](https://github.com/prettier/prettier) from 2.0.5 to 2.1.0.
- [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.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-25 08:29:56 +00:00
Jack May 65aeff5b0b
Use deprecated bpf loader (#307)
* Use deprecated bpf loader

* bump web3.js to pick up fixed flow defs
2020-08-24 14:19:46 -07:00
dependabot[bot] d4a526a90b
Bump @solana/web3.js from 0.68.0 to 0.71.1 in /token-swap/js (#278)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.68.0 to 0.71.1.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.68.0...v0.71.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-14 22:28:27 +00:00
Michael Vines d87d056e61 Bump testnetDefaultChannel 2020-08-14 01:22:11 +00:00
dependabot[bot] 0cb64c8c67
Bump @solana/web3.js from 0.66.3 to 0.68.0 in /token-swap/js (#266)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.66.3 to 0.68.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.66.3...v0.68.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-12 09:28:34 +00:00
dependabot[bot] bbbc9044e1
Bump @solana/web3.js from 0.64.0 to 0.66.3 in /token-swap/js (#256)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.64.0 to 0.66.3.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.64.0...v0.66.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-10 08:42:43 +00:00
Michael Vines a22908bbd9 Relocate js 2020-08-08 15:25:47 -07:00
Michael Vines 26ab9bb26a Reorganize crates based on program 2020-08-08 15:25:47 -07:00
Michael Vines 48b11fc01c Move up to v1.3.1 2020-08-08 08:05:00 -07:00
Michael Vines a8c995bc79 Fix up target/ location 2020-08-08 08:05:00 -07:00
dependabot[bot] 4afde65d44
Bump flow-bin from 0.130.0 to 0.131.0 in /token-swap/js (#233)
Bumps [flow-bin](https://github.com/flowtype/flow-bin) from 0.130.0 to 0.131.0.
- [Release notes](https://github.com/flowtype/flow-bin/releases)
- [Commits](https://github.com/flowtype/flow-bin/commits)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-07 09:27:29 +00:00
dependabot[bot] 171a32a263
Bump @babel/runtime from 7.11.1 to 7.11.2 in /token-swap/js (#226)
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.11.1 to 7.11.2.
- [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.2/packages/babel-runtime)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-06 11:37:55 +00:00
dependabot[bot] c64e06948d
Bump @babel/runtime from 7.11.0 to 7.11.1 in /token-swap/js (#216)
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.11.0 to 7.11.1.
- [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.1/packages/babel-runtime)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-05 09:47:49 +00:00
dependabot[bot] eaeaad8178
Bump @babel/core from 7.11.0 to 7.11.1 in /token-swap/js (#214)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.0 to 7.11.1.
- [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.1/packages/babel-core)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-05 09:03:39 +00:00
Jack May 569185359e to bytes on client side 2020-08-04 16:10:05 -07:00
Michael Vines 902a9fb081 Bump testnetDefaultChannel 2020-08-04 16:10:05 -07:00
Justin Starry ef75a1d523
Return signature from sendAndConfirmTransaction (#203) 2020-08-04 01:22:54 +08:00
dependabot[bot] d79c7601f5
Bump eslint from 7.5.0 to 7.6.0 in /token-swap/js (#197)
Bumps [eslint](https://github.com/eslint/eslint) from 7.5.0 to 7.6.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.5.0...v7.6.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-02 18:34:40 +00:00
dependabot[bot] f499077fe2
Bump @babel/plugin-transform-runtime in /token-swap/js (#186)
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.10.5 to 7.11.0.
- [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.0/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-07-31 10:34:32 +00:00
dependabot[bot] cec939e4a1
Bump @babel/core from 7.10.5 to 7.11.0 in /token-swap/js (#184)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.10.5 to 7.11.0.
- [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.0/packages/babel-core)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-31 09:34:34 +00:00
dependabot[bot] bf5f640a3c
Bump @solana/web3.js from 0.63.2 to 0.64.0 in /token-swap/js (#185)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.63.2 to 0.64.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.63.2...v0.64.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-31 09:14:01 +00:00
Jack May 302855fa0a
Cleanup payer and remove use of instanceof (#176)
Co-authored-by: Justin Starry <justin@solana.com>
2020-07-31 11:37:33 +08:00
dependabot[bot] 729ff05574
Bump @babel/preset-env from 7.10.4 to 7.11.0 in /token-swap/js (#173)
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.10.4 to 7.11.0.
- [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.0/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-07-31 01:48:27 +00:00
dependabot[bot] c6110fbf8f
Bump @babel/runtime from 7.10.5 to 7.11.0 in /token-swap/js (#175)
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.10.5 to 7.11.0.
- [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.0/packages/babel-runtime)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-31 01:09:01 +00:00
dependabot[bot] d2d746323d
Bump @solana/web3.js from 0.62.0 to 0.63.2 in /token-swap/js (#171)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.62.0 to 0.63.2.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.62.0...v0.63.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-30 23:36:35 +00:00
dependabot[bot] fb7fa0dd13 Bump flow-bin from 0.129.0 to 0.130.0 in /token-swap/js
Bumps [flow-bin](https://github.com/flowtype/flow-bin) from 0.129.0 to 0.130.0.
- [Release notes](https://github.com/flowtype/flow-bin/releases)
- [Commits](https://github.com/flowtype/flow-bin/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-30 15:47:35 -07:00
Justin Starry 17d129a32a
Setup rollup, fix prettier, and clean dependencies (#166)
* Setup rollup, fix prettier, and clean dependencies

* Setup rollup specific babel config

* Fix token-swap config
2020-07-31 01:01:57 +08:00
Jack May a07935371f
Prep token/js for publishing (#165) 2020-07-30 02:07:55 -07:00
Tyera Eulberg bd2ea9ed55
Bump solana-sdk version (#145)
* Bump solana-sdk version

* Include program feature to enable entrypoint

* Bump default testnet
2020-07-22 20:34:15 +00:00
Tyera Eulberg f779495689
Remove unused dependencies (#133) 2020-07-21 18:27:02 -06:00
Jack May 96366cb4ff
Improve CI coverage (#141)
* Improve CI coverage

* install fmt
2020-07-21 14:37:34 -07:00
Jack May c44a149b47
Remove builtin flowconfig suppress_comments (#140) 2020-07-21 10:28:03 -07:00
dependabot[bot] cad4d1c577
Bump flow-bin from 0.128.0 to 0.129.0 in /token-swap/js (#118)
Bumps [flow-bin](https://github.com/flowtype/flow-bin) from 0.128.0 to 0.129.0.
- [Release notes](https://github.com/flowtype/flow-bin/releases)
- [Commits](https://github.com/flowtype/flow-bin/commits)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 13:04:33 -06:00
dependabot[bot] 370150c771
Bump eslint from 6.8.0 to 7.4.0 in /token-swap/js (#109)
Bumps [eslint](https://github.com/eslint/eslint) from 6.8.0 to 7.4.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/v6.8.0...v7.4.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-08 20:54:22 -07:00
dependabot-preview[bot] bf49233e0f
Bump eslint-loader from 3.0.4 to 4.0.2 in /token-swap/js (#96)
Bumps [eslint-loader](https://github.com/webpack-contrib/eslint-loader) from 3.0.4 to 4.0.2.
- [Release notes](https://github.com/webpack-contrib/eslint-loader/releases)
- [Changelog](https://github.com/webpack-contrib/eslint-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/eslint-loader/compare/v3.0.4...v4.0.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-08 18:12:15 +08:00
dependabot-preview[bot] cbba5e7b77
Bump superstruct from 0.8.4 to 0.10.12 in /token-swap/js (#95)
Bumps [superstruct](https://github.com/ianstormtaylor/superstruct) from 0.8.4 to 0.10.12.
- [Release notes](https://github.com/ianstormtaylor/superstruct/releases)
- [Changelog](https://github.com/ianstormtaylor/superstruct/blob/master/Changelog.md)
- [Commits](https://github.com/ianstormtaylor/superstruct/compare/v0.8.4...v0.10.12)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-08 17:16:27 +08:00
dependabot-preview[bot] d7f2130b6a
Bump flow-bin from 0.121.0 to 0.128.0 in /token-swap/js (#94)
Bumps [flow-bin](https://github.com/flowtype/flow-bin) from 0.121.0 to 0.128.0.
- [Release notes](https://github.com/flowtype/flow-bin/releases)
- [Commits](https://github.com/flowtype/flow-bin/commits)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-08 17:07:04 +08:00
Jack May 56dd582c6f
Remove supply from Token (#82) 2020-07-07 14:34:23 -07:00
Jack May a831eddb8d
Use variant fields (#90) 2020-07-07 13:55:56 -07:00
Jack May 767741c235
Fix automation (#81) 2020-07-07 02:09:19 -07:00