* 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.
* 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
* 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>