Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(aux-ts): stake sdk localnet example #303

Merged
merged 8 commits into from
Nov 28, 2022

Conversation

misungson
Copy link
Contributor

No description provided.

@leina05 leina05 changed the title Misung/stake sdk localnet example feat(aux-ts): stake sdk localnet example Nov 28, 2022
@misungson misungson merged commit 3e62c98 into main Nov 28, 2022
@misungson misungson deleted the misung/stake-sdk-localnet-example branch November 28, 2022 22:01
leina05 added a commit that referenced this pull request Dec 5, 2022
* feat(aux): simple staking contract, modeled after sushiswap masterchef

* chore(aux): reward_debt -> last_acc_reward_per_share

* chore(aux): abort only contract

feat(aux-ts): sdk support for stake pools (#296)

* add timestamps to stake pool events

stake pools sdk

* chore(aux-ts): stake pool tests
feat(aux): add end_reward_early function to stake.move

* fast forward start time in stake tests

* update all tests to use duration instead of end_time in pool creation

* replace endTimeUs with durationUs

* Co-authored-by: Misung Son <misungs@gmail.com>

Apply suggestions from code review

feat(aux-ts): stake sdk localnet example (#303)

* Initial commit of stake sdk localnet example.

* add examples section to CONTRIBUTING.md

* Added start:localnet-stake-example to package.json.

* Changed the example to staker allocating between two pools (seems more relevant to me) instead of staking in one pool above threshold.

* fix(localnet-stake-allocator.ts): set up other staking account

* Switched to a brute-force method to find optimal staker positions.

* Minor change in comments.

* A little generalization using M in computing x1Optimal.

Co-authored-by: Leina McDermott <leina05@gmail.com>
leina05 added a commit that referenced this pull request Dec 6, 2022
* feat(aux): simple staking contract, modeled after sushiswap masterchef

* chore(aux): reward_debt -> last_acc_reward_per_share

* chore(aux): abort only contract

feat(aux-ts): sdk support for stake pools (#296)

* add timestamps to stake pool events

stake pools sdk

* chore(aux-ts): stake pool tests
feat(aux): add end_reward_early function to stake.move

* fast forward start time in stake tests

* update all tests to use duration instead of end_time in pool creation

* replace endTimeUs with durationUs

* Co-authored-by: Misung Son <misungs@gmail.com>

Apply suggestions from code review

feat(aux-ts): stake sdk localnet example (#303)

* Initial commit of stake sdk localnet example.

* add examples section to CONTRIBUTING.md

* Added start:localnet-stake-example to package.json.

* Changed the example to staker allocating between two pools (seems more relevant to me) instead of staking in one pool above threshold.

* fix(localnet-stake-allocator.ts): set up other staking account

* Switched to a brute-force method to find optimal staker positions.

* Minor change in comments.

* A little generalization using M in computing x1Optimal.

Co-authored-by: Leina McDermott <leina05@gmail.com>
leina05 added a commit that referenced this pull request Dec 6, 2022
* feat(aux): simple staking contract, modeled after sushiswap masterchef

* chore(aux): reward_debt -> last_acc_reward_per_share

* chore(aux): abort only contract

feat(aux-ts): sdk support for stake pools (#296)

* add timestamps to stake pool events

stake pools sdk

* chore(aux-ts): stake pool tests
feat(aux): add end_reward_early function to stake.move

* fast forward start time in stake tests

* update all tests to use duration instead of end_time in pool creation

* replace endTimeUs with durationUs

Apply suggestions from code review

feat(aux-ts): stake sdk localnet example (#303)

* Initial commit of stake sdk localnet example.

* add examples section to CONTRIBUTING.md

* Added start:localnet-stake-example to package.json.

* Changed the example to staker allocating between two pools (seems more relevant to me) instead of staking in one pool above threshold.

* fix(localnet-stake-allocator.ts): set up other staking account

* Switched to a brute-force method to find optimal staker positions.

* Minor change in comments.

* A little generalization using M in computing x1Optimal.

Co-authored-by: Misung Son <misungs@gmail.com>
Co-authored-by: Leina McDermott <leina05@gmail.com>
leina05 added a commit that referenced this pull request Dec 6, 2022
* feat(aux): simple yield farming contract (masterchef) (#260)

* feat(aux): simple staking contract, modeled after sushiswap masterchef

* chore(aux): reward_debt -> last_acc_reward_per_share

feat(aux-ts): sdk support for stake pools (#296)

* add timestamps to stake pool events

stake pools sdk

* chore(aux-ts): stake pool tests
feat(aux): add end_reward_early function to stake.move

* fast forward start time in stake tests

* update all tests to use duration instead of end_time in pool creation

* replace endTimeUs with durationUs

Apply suggestions from code review

feat(aux-ts): stake sdk localnet example (#303)

* Initial commit of stake sdk localnet example.

* add examples section to CONTRIBUTING.md

* Added start:localnet-stake-example to package.json.

* Changed the example to staker allocating between two pools (seems more relevant to me) instead of staking in one pool above threshold.

* fix(localnet-stake-allocator.ts): set up other staking account

* Switched to a brute-force method to find optimal staker positions.

* Minor change in comments.

* A little generalization using M in computing x1Optimal.

Co-authored-by: Misung Son <misungs@gmail.com>
Co-authored-by: Leina McDermott <leina05@gmail.com>

* fix(aux): remove support for duplicate stake pool type creation

* feat(aux): add wrapped st coin to support stake coin rehypothecation

* chore(aux): add st coin balance checks to tests and add test for double dip

* fix(aux): stash initialized coin caps when deleting pool to allow to reuse for new pools

Co-authored-by: Misung Son <misungs@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants