feat(refund): support Zcash refunds (shielded/Orchard + transparent)#51
Merged
Conversation
karim-en
requested changes
May 27, 2026
karim-en
approved these changes
May 27, 2026
kiseln
reviewed
Jun 5, 2026
kiseln
approved these changes
Jun 12, 2026
karim-en
reviewed
Jun 12, 2026
| pub(crate) const GAS_FOR_EXECUTE_REFUND_CALLBACK: Gas = Gas::from_tgas(60); | ||
|
|
||
| /// Refund transactions never expire (`expiry_height = 0`). | ||
| pub(crate) const REFUND_EXPIRY_HEIGHT: u32 = 0; |
Collaborator
There was a problem hiding this comment.
Let's verify if the 0 is still valid for the Zcash protocol
Author
There was a problem hiding this comment.
From what I've quickly looked at, everything's fine and there are no problems with this. But I think it'll be easier to make test transactions and find out for sure that way.
| output, | ||
| orchard_bundle, | ||
| expiry_height, | ||
| last_block_height, |
Collaborator
There was a problem hiding this comment.
The last_block_height could be out dated in case if the light client is out of sync, or during the Zcash protocol upgrade, this will produce invalid tx. we have to make sure that the refund tx can be recreated if needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the refund flow — previously Bitcoin-only — to Zcash. A deposit that was
never finalized via
verify_deposit/safe_verify_depositcan now be returned tothe user on Zcash, with the shielded (Orchard → unified address) path as the
primary case and a transparent (t-address) path as a fallback.