Yutaro Mori
9ddcd77f3e
Fix type definitions for TokenSwap class ( #809 )
2020-11-10 21:20:52 +01:00
Jon Cinque
75acddc100
Fix zero fee calculation ( #813 )
...
If a swap has a trading fee and a zero owner fee, when calculating the owner
fee to pool token conversion, the simulated trading fee will be non-zero
because we floor the trading fee to 1 token. If the input to trading
fee calculation is 0, then we will try to do `0 - 1` on an unsigned int,
which causes an underflow error. The fix is to simply return a 0 fee
for a 0 input.
2020-11-09 19:01:21 +01:00
dependabot[bot]
59b07f4896
Bump eslint from 7.12.1 to 7.13.0 in /token-swap/js ( #812 )
...
Bumps [eslint](https://github.com/eslint/eslint ) from 7.12.1 to 7.13.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.12.1...v7.13.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-09 11:30:47 +00:00
Michael Vines
238eabc1d0
Bump solana version to v1.4.5
2020-11-06 21:29:04 -08:00
Justin Starry
1f810787d0
Fix broken stake-pool docs link and make readme's consistent ( #805 )
2020-11-06 09:15:27 +08:00
dependabot[bot]
8ae0f927db
Bump @babel/node from 7.12.1 to 7.12.6 in /token-swap/js ( #804 )
...
Bumps [@babel/node](https://github.com/babel/babel/tree/HEAD/packages/babel-node ) from 7.12.1 to 7.12.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.12.6/packages/babel-node )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-05 11:25:49 +00:00
Michael Vines
89de77aad8
Bump spl-token to v3.0.0
2020-11-04 18:58:37 +00:00
dependabot[bot]
d59133d888
Bump @babel/runtime from 7.12.1 to 7.12.5 in /token-swap/js ( #799 )
...
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime ) from 7.12.1 to 7.12.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.12.5/packages/babel-runtime )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-04 11:27:54 +00:00
dependabot[bot]
b0834da178
Bump @solana/web3.js from 0.86.2 to 0.86.4 in /token-swap/js ( #792 )
...
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js ) from 0.86.2 to 0.86.4.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases )
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.86.2...v0.86.4 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-04 04:22:56 +00:00
Michael Vines
341149d0e9
Back to no-entrypoint feature name
2020-11-03 10:34:43 -08:00
Michael Huang
5bf4b76df4
Refactor curve.rs ( #754 )
...
* Refactor shared out of curve.rs
* Refactor out flat curve
* Refactor out constant product curve
* Cargo fmt
* More moving
* Fixup
* use::super -> user::create::curve
* cp -> constant_product
* Fix circular dependency
* Docs
* Trigger Build
2020-11-02 14:29:00 +01:00
dependabot[bot]
1a340b8f3c
Bump rollup from 2.32.1 to 2.33.1 in /token-swap/js ( #774 )
...
Bumps [rollup](https://github.com/rollup/rollup ) from 2.32.1 to 2.33.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.32.1...v2.33.1 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-02 11:04:28 +00:00
Michael Vines
2b5e9d1286
Drop lifetimes
2020-11-01 20:48:15 -08:00
Michael Vines
9f4e6d8beb
Update to solana v1.4.4
2020-11-01 20:48:15 -08:00
dependabot[bot]
6fde6e0cda
Bump @rollup/plugin-commonjs from 15.1.0 to 16.0.0 in /token-swap/js ( #741 )
...
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins ) from 15.1.0 to 16.0.0.
- [Release notes](https://github.com/rollup/plugins/releases )
- [Commits](https://github.com/rollup/plugins/compare/commonjs-v15.1.0...commonjs-v16.0.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-01 23:45:22 +08:00
dependabot[bot]
3cf2ae38ff
Bump flow-bin from 0.136.0 to 0.137.0 in /token-swap/js ( #752 )
...
Bumps [flow-bin](https://github.com/flowtype/flow-bin ) from 0.136.0 to 0.137.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-11-01 20:29:01 +08:00
Justin Starry
beaa05ece5
Bump npm token and token-swap versions ( #767 )
...
* Bump npm token and token-swap versions
* Bump npm token and token-swap versions
2020-11-01 05:43:55 +00:00
Tyera Eulberg
c312a0576a
Clippy suggestions ( #765 )
2020-10-31 19:10:33 -06:00
dependabot[bot]
3274ee2fce
Bump @solana/web3.js from 0.84.0 to 0.86.2 in /token-swap/js ( #759 )
...
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js ) from 0.84.0 to 0.86.2.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases )
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.84.0...v0.86.2 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-30 11:04:28 +00:00
Jon Cinque
9cd1cb0900
Token-swap: Add "production mode" hard-coded fee constraints ( #731 )
...
* Add statically configured program constraints
* Allow missing host fee account
* Run cargo fmt + clippy
* Update JS for new host fee account param
* Fix merge issues
* Add host fee to curve, constrain on curves
* Cleanup static variable
* Add production test to CI
Integrate review feedback
* Run cargo fmt, clippy, prettier
* Re-run cargo fmt
* Fix test for eslint / prettier clash
2020-10-29 12:52:17 +01:00
dependabot[bot]
46500ad5c0
Bump eslint from 7.12.0 to 7.12.1 in /token-swap/js ( #740 )
...
Bumps [eslint](https://github.com/eslint/eslint ) from 7.12.0 to 7.12.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.12.0...v7.12.1 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-27 11:27:00 +00:00
anatoly yakovenko
64a362c059
Use u128 for all the math but store in u64 ( #711 )
...
* Use u128 for all the math but store in u64
* tests
* missing changes
* bulds
* specific conversion failure
* fix tests
* use large numbers
* Rebase and fix merge issue from new tests
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2020-10-26 18:18:33 +01:00
dependabot[bot]
aed7439884
Bump @solana/web3.js from 0.83.0 to 0.84.0 in /token-swap/js ( #726 )
...
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js ) from 0.83.0 to 0.84.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases )
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.83.0...v0.84.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-26 12:17:40 +00:00
dependabot[bot]
b2fa509a86
Bump eslint from 7.11.0 to 7.12.0 in /token-swap/js ( #727 )
...
Bumps [eslint](https://github.com/eslint/eslint ) from 7.11.0 to 7.12.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.11.0...v7.12.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-26 11:19:42 +00:00
Justin Starry
a6cfc590e1
Prevent swap accounts being used as user accounts ( #719 )
2020-10-26 18:17:47 +08:00
Michael Vines
211f92e8c6
Groom Cargo.tomls
2020-10-25 07:52:33 +00:00
Michael Vines
fe627797c3
Use program_stubs to clean up invoke_signed stub
2020-10-25 03:29:01 +00:00
Michael Vines
80e29ef6b9
Port SPL to solana-program and `cargo build-bpf`
2020-10-24 19:21:38 -07:00
Jon Cinque
b0867c7e28
token-swap: Add fee account to receive withdraw / trading fees, trading token mints ( #695 )
...
* Add mints to swap info
* Add mints to JS
* Add fee account in SwapInfo / init
* Add test for 0 fee, init test fully
* Add withdraw command interface
* Add fee accounts to swap instruction
* Add calculations for swap and withdraw fees
* Run cargo fmt
* Add new fees to JS and test
* Review feedback: fixup instruction doc and clone
* Update order of accounts in instructions
* Run cargo fmt
* Fix owner fee pool token calculation to include trading fee
* Add owner fees to flat curve, per request
* Fix instruction comment numbering
* Add more errors types for clearer calculation errors
Add a check for withdrawing from fee account
* Cargo fmt
2020-10-23 18:31:58 +02:00
dependabot[bot]
8c3c124f31
Bump @solana/web3.js from 0.82.0 to 0.83.0 in /token-swap/js ( #703 )
...
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js ) from 0.82.0 to 0.83.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases )
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.82.0...v0.83.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-23 11:30:43 +00:00
Justin Starry
ee99fcf025
Check for close and freeze authorities in token-swap ( #686 )
2020-10-22 21:20:38 +08:00
Jon Cinque
db42f7abbe
token-swap: Add curve and pool token trait and integrate in processor ( #624 )
...
* Add SwapCurve trait and integrate in processor
* Add PoolTokenConverter trait to correspond
* Add curve type parameter to initialization and JS
* Refactor for flat curve test, fmt
* Update token-swap/program/src/curve.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Refactor swap curve to allow for any implementation
* Rename SwapCurveWrapper -> SwapCurve
* Run cargo fmt
* Update CurveType to enum in JS
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-10-21 20:46:50 +02:00
dependabot[bot]
781df85cbb
Bump rollup from 2.32.0 to 2.32.1 in /token-swap/js ( #682 )
...
Bumps [rollup](https://github.com/rollup/rollup ) from 2.32.0 to 2.32.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.32.0...v2.32.1 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-21 11:54:34 +00:00
dependabot[bot]
8b95867df4
Bump @solana/web3.js from 0.81.0 to 0.82.0 in /token-swap/js ( #683 )
...
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js ) from 0.81.0 to 0.82.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases )
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.81.0...v0.82.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-21 11:26:19 +00:00
dependabot[bot]
26dc5b959a
Bump @babel/cli from 7.11.6 to 7.12.1 in /token-swap/js ( #674 )
...
Bumps [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli ) from 7.11.6 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-cli )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-20 11:37:21 +00:00
dependabot[bot]
532d041bac
Bump @babel/plugin-transform-runtime in /token-swap/js ( #673 )
...
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime ) from 7.11.5 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-plugin-transform-runtime )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-20 11:33:40 +00:00
Justin Starry
0e8c4fb5bf
Bump @solana/web3.js to v0.81.0 ( #663 )
2020-10-19 23:54:29 +08:00
dependabot[bot]
df4ca7a0e3
Bump flow-bin from 0.135.0 to 0.136.0 in /token-swap/js ( #662 )
...
Bumps [flow-bin](https://github.com/flowtype/flow-bin ) from 0.135.0 to 0.136.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-19 13:08:31 +00:00
dependabot[bot]
b2ebc6a077
Bump @babel/runtime from 7.12.0 to 7.12.1 in /token-swap/js ( #661 )
...
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime ) 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-runtime )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-19 13:05:09 +00:00
dependabot[bot]
64f8f24961
Bump rollup from 2.30.0 to 2.32.0 in /token-swap/js ( #657 )
...
Bumps [rollup](https://github.com/rollup/rollup ) from 2.30.0 to 2.32.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.30.0...v2.32.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-19 11:52:12 +00:00
dependabot[bot]
150bbc0359
Bump @babel/core from 7.12.0 to 7.12.3 in /token-swap/js ( #656 )
...
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core ) from 7.12.0 to 7.12.3.
- [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.3/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-19 11:42:31 +00:00
dependabot[bot]
8e9503972b
Bump @babel/node from 7.10.5 to 7.12.1 in /token-swap/js ( #658 )
...
Bumps [@babel/node](https://github.com/babel/babel/tree/HEAD/packages/babel-node ) from 7.10.5 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-node )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-19 11:40:45 +00:00
Justin Starry
9a8fa8e845
Update SDK version to v1.3.17 ( #649 )
...
* Update SDK version to v1.3.17
* Fix clients
2020-10-19 18:07:45 +08:00
Yutaro Mori
641c27810c
Ensure that read only accounts in token-swap instructions are set correctly ( #648 )
2020-10-19 11:22:39 +02:00
dependabot[bot]
758cecaee2
Bump @babel/plugin-proposal-class-properties in /token-swap/js ( #641 )
...
Bumps [@babel/plugin-proposal-class-properties](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-class-properties ) from 7.10.4 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-plugin-proposal-class-properties )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-16 12:39:26 +00:00
dependabot[bot]
875ea6e847
Bump @babel/preset-flow from 7.10.4 to 7.12.1 in /token-swap/js ( #642 )
...
Bumps [@babel/preset-flow](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-flow ) from 7.10.4 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-flow )
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:50 +00:00
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