Commit Graph

27 Commits

Author SHA1 Message Date
Michael Vines 158fa1dea6 Upgrade to Solana v1.4.14 2020-12-03 05:39:55 +00:00
Michael Vines a477895f02 program-test now adds SPL Token automatically 2020-12-03 05:39:55 +00:00
dependabot[bot] 6aa1d8cce1
Bump solana-program from 1.4.9 to 1.4.13 (#916)
Bumps [solana-program](https://github.com/solana-labs/solana) from 1.4.9 to 1.4.13.
- [Release notes](https://github.com/solana-labs/solana/releases)
- [Changelog](https://github.com/solana-labs/solana/blob/master/RELEASE.md)
- [Commits](https://github.com/solana-labs/solana/compare/v1.4.9...v1.4.13)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-02 12:54:42 +00:00
Yuriy Savchenko 90698e4be9
Added negative tests for stake pool (#857)
* Added negative tests for stake pool

* Claim refactoring, error codes fixed

* Linter errors fixed
2020-11-18 22:47:42 +01:00
Michael Vines c6a4ac9a82 Bump solana version to v1.4.9 2020-11-17 20:02:17 -08:00
Michael Vines f4af9054a2 Update to Solana 1.4.8 2020-11-14 02:35:20 +00:00
Jon Cinque b9fed1116b
stake-pool: Add end-to-end testing using ProgramTest (#828)
* WIP: stake-pool: Add end-to-end testing using ProgramTest

* Run cargo fmt

* Add deposit test and extra requirements

* Update Cargo.lock after rebuild

* Bring token program sdk version back to 1.4.7
2020-11-13 13:11:39 +01:00
Michael Vines 5030a87021 Upgrade to Solana 1.4.7 2020-11-12 11:05:20 -08:00
Yuriy Savchenko b9c2bbc275
Added set-staking-auth and set-owner commands to stake pool CLI (#827)
* Added set-staking-auth and set-owner commands to stake pool CLI

* Error handling refactored, fixed new fee owner setting, fixed set owner arg group settings

* Added check for fee account mint to stake pool initialization and set owner methods
2020-11-12 16:44:08 +01:00
dependabot[bot] b71456a8f1
Bump solana-program from 1.4.5 to 1.4.6 (#826)
Bumps [solana-program](https://github.com/solana-labs/solana) from 1.4.5 to 1.4.6.
- [Release notes](https://github.com/solana-labs/solana/releases)
- [Changelog](https://github.com/solana-labs/solana/blob/master/RELEASE.md)
- [Commits](https://github.com/solana-labs/solana/compare/v1.4.5...v1.4.6)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-11 12:39:52 +00:00
Yuriy Savchenko fec7794c22
Stake pool CLI added (#806)
* Implemented stake-pool CLI with create-pool, deposit, list and withdraw commands, fixed several bugs in underlying smart contract

* Several typos fixed, some error text clarifications.

* Fee parameter in stake pool creation changed into two: numarator and demoninator

* Refactoring to resolve pool request comments

* Added merge to stake_receiver account when claiming whole stake account

* Removed unused import

* Withdraw bump seed calculation fixed
2020-11-10 15:36:05 +01:00
Michael Vines 238eabc1d0 Bump solana version to v1.4.5 2020-11-06 21:29:04 -08:00
Yuriy Savchenko 87129a93ac
Added positive tests in stake pool and fixed several bugs in instructions (#788)
* Added positive tests for withdraw, claim, set owner, set authority, several bugs fixed

* Fixed PR comments

* Fixed constant with leading zero

* Deposit tests refactoring
2020-11-04 13:34:25 +01:00
Michael Vines 341149d0e9 Back to no-entrypoint feature name 2020-11-03 10:34:43 -08:00
Yuriy Savchenko 480f6604b7
Added missing accounts to the interface to call stake account program (#763)
* Interface accounts added as read-only, fixed mint authority on deposit, fixed stake pool stake deserializing

* Unit test refactoring, added success tests for deposit, updated stake account program id

* Warnings fixed

* Removed random key generation, used Pubkey::new_unique instead

* Imports optimization

* Unit test architecture updated to remove separate invoke_signed declarations

* Added missing accounts (sysvar clock and stake account program id) to calls to stake account program

* Fixed formatting

* Fixed stake pool deposit unit test

* Temporarily removed stake-pool cli from main workspace

* Fixed warning in token program

* Fixed warning in token program v3

* Fixed warnings in token swap program

* Fixed warning in token cli

* Sysvar and program id params reordered
2020-11-02 22:03:54 +01: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
Yuriy Savchenko a5babd6cbe
Unit tests refactoring and success deposit test added to stake pool program (#718)
* Interface accounts added as read-only, fixed mint authority on deposit, fixed stake pool stake deserializing

* Unit test refactoring, added success tests for deposit, updated stake account program id

* Warnings fixed

* Removed random key generation, used Pubkey::new_unique instead

* Imports optimization

* Unit test architecture updated to remove separate invoke_signed declarations
2020-10-29 17:19:48 +01:00
Michael Vines 211f92e8c6 Groom Cargo.tomls 2020-10-25 07:52:33 +00:00
Michael Vines f9b4616bb6 Clean up stake-pool copypasta 2020-10-25 03:40:21 +00:00
Michael Vines 80e29ef6b9 Port SPL to solana-program and `cargo build-bpf` 2020-10-24 19:21:38 -07:00
Yuriy Savchenko 100e930f2c
Interface accounts added as read-only, fixed mint authority on deposit, fixed stake pool stake deserializing (#702) 2020-10-23 14:25:53 +02:00
Yuriy Savchenko bb54cf0dc6
Added stake pool instruction interface methods (#684)
* Added address type in programm address generation for the stake pool, renamed nonce to bump seed

* Formatting fixed

* Bump seed calculation moved to the smart contract, test for fee > 1 added, state length public constant added

* Added claim method to stake pool, fixed program address generation in token mint and burn calls

* Refactored signers management when calling other contracts

* Signers formation put back into calling functions, deposit/withdraw/claim method reworked, state serialization bug fixed

* Added instruction interface methods

* Fixed signer flags for accounts in stake pool instruction creation
2020-10-21 14:21:54 +02:00
Yuriy Savchenko df63d6a0f0
Stake pool improvements and fixes (#665)
* Added address type in programm address generation for the stake pool, renamed nonce to bump seed

* Formatting fixed

* Bump seed calculation moved to the smart contract, test for fee > 1 added, state length public constant added

* Added claim method to stake pool, fixed program address generation in token mint and burn calls

* Refactored signers management when calling other contracts

* Signers formation put back into calling functions, deposit/withdraw/claim method reworked, state serialization bug fixed
2020-10-20 21:02:05 +02:00
dependabot[bot] 1dfebe929d
Bump serde from 1.0.116 to 1.0.117 (#660)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.116 to 1.0.117.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.116...v1.0.117)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-19 13:47:45 +00:00
ysavchenko b5b3c56226
Changes to stake pool program address generation (#647)
* Added address type in programm address generation for the stake pool, renamed nonce to bump seed

* Formatting fixed
2020-10-19 13:26:05 +02:00
anatoly yakovenko 44b95aecdb
Token stake pool (#493)
* init

* instructions

* instruction progress

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* update

* wip

* update

* wip

* clippy

* builds

* builds

* wip test

* init testcargo fmt

* update

* wip stake instructions

* wip

* comment

* update

* update

* update

* init cli

* Address review comments

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2020-10-16 19:38:12 +02:00