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: check the withdrawal status during validation #1396

Merged
merged 16 commits into from
Feb 20, 2025

Conversation

djordon
Copy link
Collaborator

@djordon djordon commented Feb 19, 2025

Description

Closes #1376

Changes

  • Update the validation logic of AcceptWithdrawalV1 and RejectWithdrawalV1 to check the smart contract for whether the withdrawal request has completed.
  • Update out integration tests to account for the new condition.

Testing Information

This PR adds two new integration tests, one for AcceptWithdrawalV1 and another for RejectWithdrawalV1, that check for the correct result depending on the Stacks node response.

Checklist:

  • I have performed a self-review of my code

@djordon djordon added the withdrawal The withdrawal sBTC operation. label Feb 19, 2025
@djordon djordon self-assigned this Feb 19, 2025
Copy link
Collaborator

@xoloki xoloki left a comment

Choose a reason for hiding this comment

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

One small comment nit, otherwise LGTM

Copy link
Collaborator

@setzeus setzeus left a comment

Choose a reason for hiding this comment

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

Only tiny comment-NITs found, happy to approve once fixed. The logic is laid out well & concludes with two integrated tests, one for a withdrawal accept & one for a withdrawal reject.

RejectWithdrawalV1::validate docstrings
reject withdrawal request_completed validation test
@djordon djordon requested a review from setzeus February 19, 2025 22:49
Base automatically changed from 1376-check-if-withdrawal-is-completed-during-validation to main February 20, 2025 17:19
@djordon djordon added this pull request to the merge queue Feb 20, 2025
Merged via the queue into main with commit 8a98ca5 Feb 20, 2025
8 checks passed
@djordon djordon deleted the 1376-check-withdrawal-status-during-validation branch February 20, 2025 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
withdrawal The withdrawal sBTC operation.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feature]: Check if withdrawal is completed during validation of contract calls
4 participants