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: function claim_rewards for claiming DeFi Spring rewards #118

Merged
merged 25 commits into from
Oct 29, 2024

Conversation

SoarinSkySagar
Copy link
Contributor

@SoarinSkySagar SoarinSkySagar commented Oct 26, 2024

Closes #102

  • Created ClaimData struct
  • Written claim_rewards function
    • Checking if position is open
    • Claim all rewards one by one and transfer them to some address
  • Written test for claim_rewards

Tests Running

image

@djeck1432 djeck1432 linked an issue Oct 26, 2024 that may be closed by this pull request
@SoarinSkySagar SoarinSkySagar marked this pull request as ready for review October 27, 2024 22:28
Copy link
Collaborator

@faurdent faurdent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small changes required, mostly looks good

src/deposit.cairo Outdated Show resolved Hide resolved
src/deposit.cairo Outdated Show resolved Hide resolved
src/deposit.cairo Outdated Show resolved Hide resolved
src/interfaces.cairo Show resolved Hide resolved
src/types.cairo Outdated Show resolved Hide resolved
src/deposit.cairo Outdated Show resolved Hide resolved
tests/test_loop.cairo Outdated Show resolved Hide resolved
Copy link
Collaborator

@faurdent faurdent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djeck1432 LGTM, approved

Copy link
Owner

@djeck1432 djeck1432 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@djeck1432 djeck1432 merged commit 351caf8 into djeck1432:fix/audit-preparation Oct 29, 2024
@SoarinSkySagar
Copy link
Contributor Author

thank you @djeck1432 and @faurdent, would love to contribute to spotnet again 🚀

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.

Claiming DeFI Spring rewards
6 participants