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

Add support for staking contract #12

Merged
merged 20 commits into from
May 29, 2024

Conversation

nagdahimanshu
Copy link
Member

@nagdahimanshu nagdahimanshu commented Apr 23, 2024

What was the problem?

This PR resolves #9 #10

How was it solved?

  • Implement selector and handlers for reward contract functions
    • createPosition
    • initiateFastUnlock
    • claimRewards
    • pauseUnlocking
    • resumeUnlockingCountdown
    • increaseLockingAmount
    • extendDuration
  • Update readme
  • Add unit tests for all selectors

How was it tested?

  • Local:
    • By generating snapshots and running tests (Ledger VS code extension)

@nagdahimanshu nagdahimanshu self-assigned this Apr 23, 2024
@nagdahimanshu nagdahimanshu force-pushed the 9-add-support-for-staking-contract branch from ed31202 to e334ea3 Compare April 23, 2024 09:12
@nagdahimanshu nagdahimanshu force-pushed the 9-add-support-for-staking-contract branch from e334ea3 to 5382688 Compare April 23, 2024 09:49
@nagdahimanshu nagdahimanshu force-pushed the 9-add-support-for-staking-contract branch from 233b4b5 to a52b1b4 Compare April 23, 2024 12:33
@nagdahimanshu nagdahimanshu force-pushed the 9-add-support-for-staking-contract branch from 134189b to 2e88244 Compare April 23, 2024 17:29
@nagdahimanshu nagdahimanshu force-pushed the 9-add-support-for-staking-contract branch 2 times, most recently from 154857a to 412f792 Compare April 29, 2024 16:38
@nagdahimanshu nagdahimanshu force-pushed the 9-add-support-for-staking-contract branch 3 times, most recently from 80e7e40 to 4cf6ef9 Compare April 30, 2024 07:34
@nagdahimanshu nagdahimanshu force-pushed the 9-add-support-for-staking-contract branch from 4cf6ef9 to c36356e Compare April 30, 2024 08:25
@hrmhatef hrmhatef force-pushed the 9-add-support-for-staking-contract branch 2 times, most recently from 7fd22fd to c36356e Compare April 30, 2024 17:38
@nagdahimanshu nagdahimanshu force-pushed the 9-add-support-for-staking-contract branch 6 times, most recently from 6d8d0e2 to 9608522 Compare May 2, 2024 11:13
@nagdahimanshu nagdahimanshu force-pushed the 9-add-support-for-staking-contract branch from 9608522 to 8ef087f Compare May 2, 2024 12:04
@nagdahimanshu nagdahimanshu force-pushed the 9-add-support-for-staking-contract branch 3 times, most recently from a29915c to a966223 Compare May 2, 2024 20:10
@nagdahimanshu
Copy link
Member Author

CI is failing and its a issue from oss-fuzz.

@nagdahimanshu nagdahimanshu marked this pull request as ready for review May 3, 2024 11:02
@nagdahimanshu nagdahimanshu requested a review from shuse2 May 3, 2024 11:04
 - Add a new unit test for that
 - Generate snapshots
 - Add a new unit test for that
 - Generate snapshots
 - Add a new unit test for that
 - Generate snapshots
@hrmhatef hrmhatef force-pushed the 9-add-support-for-staking-contract branch 3 times, most recently from 996c4d8 to a8c9969 Compare May 19, 2024 14:59
.clang-format Outdated Show resolved Hide resolved
PLUGIN_SPECIFICATION.md Outdated Show resolved Hide resolved
@nagdahimanshu nagdahimanshu requested a review from shuse2 May 29, 2024 08:33
@hrmhatef hrmhatef force-pushed the 9-add-support-for-staking-contract branch 5 times, most recently from bc9c4ff to e7a6aee Compare May 29, 2024 12:22
@hrmhatef hrmhatef force-pushed the 9-add-support-for-staking-contract branch from e7a6aee to c7002d1 Compare May 29, 2024 12:31
@hrmhatef hrmhatef self-requested a review May 29, 2024 12:36
@shuse2 shuse2 merged commit d10a4a4 into feature/staking-contract May 29, 2024
35 of 36 checks passed
@shuse2 shuse2 deleted the 9-add-support-for-staking-contract branch May 29, 2024 12:40
shuse2 pushed a commit that referenced this pull request May 29, 2024
Add support for staking contract (#12)

* :WIP: Implement handler for staking lockAmount function

* :WIP: Revert and implement handler for reward createPosition function

* 🌱 Add a new unit test for create position for reward contract

* 🐛 Fix implementation and generate snapshots

* Implement handler for fast unlock

* 🌱 Add a new unit test for the fast unlock method

* Fix handler for initFastUnlock

* Add handlers for claimRewards, pauseUnlocking and resumeUnlocking

* 🔨 Code refactoring

* 🐛 Fix CI

* 🌱 Update to support the increaseLockingAmount method

 - Also add a new unit test for that

* 🌱 Update to support the extendDuration method

 - Also add a new unit test for that

* Update Readme

* 💅 Rename a method name

* 🌱 Update to support the deletePositions method

 - Add a new unit test for that
 - Generate snapshots

* 💅 Rename some consts

* 🌱 Update to support the addUnusedRewards method

 - Add a new unit test for that
 - Generate snapshots

* 🌱 Update to support fundStakingRewards method

 - Add a new unit test for that
 - Generate snapshots

* 👌 Applied suggestions

* 🐛 Fix the Makefile

---------

Co-authored-by: hatef <[email protected]>
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.

3 participants