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

Redemptions prototype: Assemble BTC redemption transaction #3607

Merged
merged 16 commits into from
Jun 12, 2023

Conversation

lukasz-zimnoch
Copy link
Member

@lukasz-zimnoch lukasz-zimnoch commented Jun 6, 2023

Refs #3609

Here we introduce the assembleRedemptionTransaction function that allows constructing an unsigned Bitcoin redemption transaction based on provided input arguments.

Here we add the `assembleRedemptionTransaction` function that allows to
assemble an unsigned BTC redemption transaction.
Production code requires that the change output is always placed as the
first one in the output vector to leverage the gas optimizations made
in the Bridge implementation. However, the existing testnet transactions
we are planning to use for unit tests have the change output as the last
one. In order to mitigate that difference, we add support for both
transaction shapes.
@lukasz-zimnoch lukasz-zimnoch marked this pull request as ready for review June 9, 2023 10:34
Copy link
Member

@pdyraga pdyraga left a comment

Choose a reason for hiding this comment

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

Some minor comments. Badass work.

pkg/tbtc/redemption.go Show resolved Hide resolved
pkg/tbtc/redemption.go Outdated Show resolved Hide resolved
pkg/internal/tbtctest/tbtctest.go Show resolved Hide resolved
pkg/tbtc/redemption_test.go Outdated Show resolved Hide resolved
@pdyraga pdyraga merged commit aad25d6 into main Jun 12, 2023
@pdyraga pdyraga deleted the redemptions-assemble-transaction branch June 12, 2023 11:58
@pdyraga pdyraga added this to the v2.0.0-m4 milestone Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants