Commit Graph

13 Commits

Author SHA1 Message Date
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
Jack May a3f4071df6
Use https (#625) 2020-10-14 22:06:35 +00: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 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
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
Justin Starry 708bb430ab
Bump dependencies from 1.3.8 to 1.3.9 (#415) 2020-09-10 17:25:43 +08: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
Michael Vines 48b11fc01c Move up to v1.3.1 2020-08-08 08:05:00 -07:00
Michael Vines d4e1c47f64 Reduce bpf-sdk downloads in CI 2020-08-08 08:05:00 -07:00
Jack May c7858471c2
Pin bpf-sdk version to v1.2.17 (#218) 2020-08-05 11:39:34 -07:00
Jack May 46f0b42873
Programs can be client dependencies (#181) 2020-07-31 16:35:49 -07:00
Jack May 437d2d1c8b
Bump to Solana v1.2.3 and Solana-web3.js v0.60.0 (#46) 2020-06-18 11:02:42 -07:00
Tyera Eulberg dfbfc9367b
Reorganize repository in preparation for more programs (#20)
* Initial reorg

* Update READMEs

* Update CI

* Add CI build stages
2020-06-05 12:34:17 -06:00