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

Added 'send-many' Function To sBTC Token #969

Merged
merged 10 commits into from
Dec 10, 2024
Merged

Added 'send-many' Function To sBTC Token #969

merged 10 commits into from
Dec 10, 2024

Conversation

setzeus
Copy link
Collaborator

@setzeus setzeus commented Nov 27, 2024

Description

This PR adds the ability to send multiple(many), specifically up to 200, sBTC transactions at once. This feature is particularly useful for DeFi apps that need to send to many recipients at once. A good example of this is a stacking app that wants to pay stacking rewards in sBTC.

Closes: #934

Changes

Adds one public & one private function to the sbtc-token.clar Clarity contract.

Testing Information

A unit test has been added here.

Checklist:

  • I have performed a self-review of my code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@setzeus setzeus requested review from djordon and hstove November 27, 2024 13:25
@setzeus
Copy link
Collaborator Author

setzeus commented Dec 1, 2024

Seeing something odd happening with Clarigen if you have a few minutes to check this out @hstove:

Whenever I run 'pnpm test' an additional block is appended to the 'default.simnet-plan.yaml' file, which now breaks the tests that use simnet.block to check the right height (specifically the three tests you currently see failing in this PR). I don't believe 'pnpm test' had this behavior before as these tests were currently passing? Did I cause this locally somehow?

@djordon djordon added the clarity The clarity smart contracts. label Dec 9, 2024
@djordon djordon added this to the sBTC 0.9, mainnet release milestone Dec 9, 2024
Copy link
Collaborator

@djordon djordon 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. Left some comments but you can feel free to ignore them.

contracts/tests/sbtc-token.test.ts Outdated Show resolved Hide resolved
contracts/tests/sbtc-token.test.ts Show resolved Hide resolved
Copy link
Collaborator

@AshtonStephens AshtonStephens left a comment

Choose a reason for hiding this comment

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

Admittedly not a clarity expert, but it lgtm!

@setzeus setzeus merged commit 99bdb03 into main Dec 10, 2024
4 checks passed
@djordon djordon deleted the clarity/send-many branch December 12, 2024 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarity The clarity smart contracts.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feature]: Send-Many Functions
6 participants