Commit Graph

1309 Commits

Author SHA1 Message Date
Maximilian Schneider 80f4414b5f fixes to make test build 2023-03-09 00:20:44 +01:00
Maximilian Schneider 0cf6a2154d update dependencies 2023-03-09 00:05:21 +01:00
Maximilian Schneider 22f639c361 disable single sided withdraw and deposit 2022-12-24 14:56:19 +01:00
Maximilian Schneider bd33fef3d3 Simplify fees 2021-04-01 10:56:47 +00:00
Justin Starry 5473494f24
spl-token: Bump web3.js to v1.2.2 (#1516) 2021-03-30 00:11:12 +08:00
dependabot[bot] c5e4f64351
build(deps-dev): bump rollup from 2.41.2 to 2.43.1 in /token-lending/js (#1518)
Bumps [rollup](https://github.com/rollup/rollup) from 2.41.2 to 2.43.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.41.2...v2.43.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-29 11:40:50 +00:00
dependabot[bot] b43cf9ff5c
build(deps): bump @solana/web3.js in /token-lending/js (#1517)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.94.2 to 1.2.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Changelog](https://github.com/solana-labs/solana-web3.js/blob/master/.releaserc.json)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.94.2...v1.2.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-29 10:55:05 +00:00
Justin Starry 03b44da260 Add solana-vote-program to update script 2021-03-29 14:46:27 +08:00
Jon Cinque d815ba9b8e
stake-pool: Add borsh support and specify size on creation (#1505)
* lending: Update JS tests to solana-test-validator

* Add solana tools install

* Fix oopsie on the path

* Move where deployed programs go

* stake-pool: Add borsh support and size on creation

We can't specify the size in the instruction unfortunately, since we'd
only have 10kb max for the validator list. At roughly 50 bytes per
validator, that only gives us 200 validators.

On the flip side, using Borsh means we can allow the validator stake list
to be any size!

* Add AccountType enum

* Remove V1 everywhere

* Add max validators as parameter and get_instance_packed_len

* Add test for adding too many validators

* Clippy
2021-03-27 13:42:29 +01:00
Jon Cinque 34e66c6bad
lending: Update JS tests to solana-test-validator (#1513)
* lending: Update JS tests to solana-test-validator

* Add solana tools install

* Fix oopsie on the path

* Move where deployed programs go
2021-03-27 13:42:16 +01:00
Michael Vines d54fe03181 Add more solana crates to patch scripts 2021-03-26 20:17:44 -07:00
Derek Anderson 938dd01e9b bumped version of cli-tools 2021-03-26 11:12:47 -07:00
Derek Anderson 914b65d52c adding a dep i needed when building on Ubuntu 20.10
when building for the first time:
```
error: failed to run custom build command for `hidapi v1.2.5`

Caused by:
  process didn't exit successfully: `solana-program-library/target/debug/build/hidapi-81175f45ee69e1c2/build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=LIBUDEV_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=LIBUDEV_STATIC
  cargo:rerun-if-env-changed=LIBUDEV_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at 'Unable to find libudev: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"libudev\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package libudev was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libudev.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'libudev\' found\n" } }', ~/.cargo/registry/src/github.com-1ecc6299db9ec823/hidapi-1.2.5/build.rs:53:54
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
```
2021-03-26 11:12:47 -07:00
dependabot[bot] 0a25996efa
build(deps-dev): bump @types/node in /token-lending/js (#1509)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.34 to 14.14.36.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-26 09:46:40 +00:00
B 76f0523e60
Add pausable proposal (#1506)
* feat: add pausable proposal

* fix: update proposal
2021-03-25 16:38:36 -05:00
Derek Anderson 3858d0ae25
fixed formula to match referenced doc [1] + formatting (#1474)
`P_{margin}=iRP` didn't make sense, as P isn't defined, and i is already defined as the price (from the oracle).
the references doc contains `P_{margin}=iR`, so I assume this is a typo.
2021-03-25 09:31:25 -05:00
B bec876dcdc
Proposal for token-swap curve using stake pool account (#1504)
* feat: add new curve proposal

* Update StakePoolStableCurve.md
2021-03-24 11:07:00 -05:00
Tyera Eulberg 6969ad199a
Add separate docs workflow (#1491) 2021-03-23 23:27:48 -06:00
Tyera Eulberg 75e122061e
Accounts: check mint if provided, use helper (#1503) 2021-03-24 00:06:39 +00:00
Tyera Eulberg a3e8af2068
spl-token-cli: use ATA by default in wrap/unwrap commands (#1492)
* Wrap to ATA by default

* Unwrap ATA by default

* Review comments
2021-03-23 15:48:27 -06:00
dependabot[bot] 5df346163f
build(deps-dev): bump @babel/node in /token-swap/js (#1489)
Bumps [@babel/node](https://github.com/babel/babel/tree/HEAD/packages/babel-node) from 7.12.17 to 7.13.12.
- [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.13.12/packages/babel-node)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-23 10:42:30 +00:00
Tyera Eulberg 80819fa05a
Transfer from ATA by default (#1487)
* Transfer from ATA by default

* Update token/cli/src/main.rs
2021-03-23 04:12:29 +00:00
Tyera Eulberg 603a94327f
Add spl-token address command (#1484) 2021-03-22 23:58:09 +00:00
Jon Cinque d336b8b714
stake-pool: Use checked_ceil_div for withdraw calc (#1482)
* stake-pool: Use checked_ceil_div for withdraw calc

When a stake account is totally removed from a stake pool by the
manager, there's a chance that the operation would not take enough of
the manager's pool tokens by 1 due to truncation.

Do a ceiling division instead, and refactor ceiling division into the
math library.

* Use new function name on CLI

* Cargo fmt
2021-03-23 00:33:51 +01:00
Tyera Eulberg 04fc247b2e
Reorder App subcommands (#1485) 2021-03-22 22:47:25 +00:00
Michael Vines bb05462d59 Rename --allow-empty-recipient to --allow-unfunded-recipient 2021-03-22 13:45:18 -07:00
Jon Cinque 7316e0fbc3
Ignore test-ledger directory for swap (#1480) 2021-03-22 20:00:40 +01:00
Tyera Eulberg 0ab541bc40
Update accounts examples (#1478) 2021-03-22 18:37:10 +00:00
Tyera Eulberg ed4ef42c8b
Remove explicit tokio (#1470) 2021-03-18 20:38:09 +00:00
Vadim cd57d1cf10
Binary oracle implementation (#1347)
* oracle pair init

* update

* updates

* progress

* update

* update

* progress

* builds

* update

* progress

* update

* copy pasta

* Refactor and add Instruction serializing/deserializing

* Add pack/unpack for Pool struct

* Implement InitPool instruction

* Add unit test and refactor InitPool instruction

* Minor changes

* Add using deposing token mint decimals in pass and fail mints

* Add Deposit instruction processing

* Add test for Deposit instruction

* Add Withdraw instruction processing

* Add test for Withdraw instruction

* Add Decide instruction with test

* Changes in Withdraw instruciton and add time travel to Decide instruction test

* Fix clippy warning

* Fix warning with if operator

* Fix clippy warnings

* Update libs version and minor fixes

* Minor changes

* Add user_transfer_authority to withdraw instruction and other minor changes

* Fix clippy warns

* Change return value after serialization

* Update tokio and solana-program-test libs version

Co-authored-by: Anatoly Yakovenko <anatoly@solana.com>
2021-03-18 18:18:20 +01:00
Yuriy Savchenko d0bf7157cf
Set staking authority instruction removed (#1469)
* Set staking authority instruction removed

* Fixed fmt errors
2021-03-18 12:21:01 +01:00
Michael Vines 662f38f939 Bump Solana version to 1.6.1 2021-03-18 04:07:16 +00:00
Michael Vines 0a63d33988 Detect pinned versions 2021-03-18 04:07:16 +00:00
Michael Vines eb163ab0c7 Bump lending compute units more 2021-03-17 13:04:55 -07:00
Michael Vines 52e4ccee5b Relax some `set_bpf_compute_max_units` to unblock testing against the solana master 2021-03-17 09:31:37 +00:00
Michael Vines a156a10051 Adjust test_memo_compute_limits to account for toolchain differences 2021-03-17 00:37:20 -07:00
Michael Vines 58807c5f8b Back out clippy::manual_map for now 2021-03-16 22:22:59 -07:00
Michael Vines af5fdb3146 Bump Rust version to 1.50.0 2021-03-16 22:22:59 -07:00
Michael Vines ced24cb55a Adapt to AccountSharedData 2021-03-16 20:07:33 -07:00
Michael Vines 626376653d Clippy 2021-03-16 18:33:37 -07:00
Michael Vines 686444088b Bump Solana version to 1.5.15 2021-03-16 18:33:37 -07:00
Michael Vines 1bc52c30fd Remove yelling 2021-03-16 18:33:37 -07:00
Michael Vines 64edd0ba76 Remove unknown_clippy_lints 2021-03-16 18:33:37 -07:00
Michael Vines 995d4a029f Remove tokio dev-dependency 2021-03-16 18:33:37 -07:00
Michael Vines c63d854ac7 Switch to Instruction::new_with_bincode 2021-03-16 18:33:37 -07:00
Tyera Eulberg 82a385b7c3
Bump spl-token-cli for new release (#1463) 2021-03-16 18:24:04 -06:00
Justin Starry 4107c17a3b
Bump token-cli to v2.0.8 (#1458) 2021-03-16 17:44:36 -06:00
Tyera Eulberg 81ad7407d0
Remove debug dir between bpf and host crates (#1461) 2021-03-16 22:51:45 +00:00
Michael Vines 723aacadb7 Pin Solana versions used by spl-token-cli 2021-03-16 15:07:56 -07:00
Tyera Eulberg d65d2eac41
Token cli: Improve authorize command (#1445)
* Return clear error message if auth type is incompatible with account

* Report real current authority

* Prevent reauth of owner's ATA

* Fix typo, messaging improvements

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2021-03-16 13:59:21 -06:00