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

Implement redemptions with a proxy for redemption integrations #814

Merged
merged 6 commits into from
Jun 11, 2024

Commits on Jun 11, 2024

  1. Expose function to build redemption data

    In this PR we expose a function to build redemption data in the raw bytes
    format as expected by the tBTC Bridge. This function can be used by the
    custom integrator contracts to build the redemption data required to request
    tBTC redemption.
    
    Example of the integrator is Acre's [BitcoinRedeemer contract](https://github.com/thesis/acre/blob/main/solidity/contracts/BitcoinRedeemer.sol)
    that requires the redemption data to handle stBTC -> tBTC -> Bitcoin
    conversion in one transaction.
    nkuba committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    8a3ee6f View commit details
    Browse the repository at this point in the history
  2. Introduce redemption with proxy

    This commit introduces a new redemption flow that uses a proxy implementation
    to request the redemption of tBTC. It gives flexibility to the external
    integrators to use the redemption data required by the tBTC protocol to
    request the redemption of tBTC in their contracts.
    It can also be used to relay the transaction submission with external
    relayer (e.g. Gelato).
    nkuba committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    b1b73f8 View commit details
    Browse the repository at this point in the history
  3. Make findWalletForRedemption protected again

    The function was unintentionally changed to public in the previous commit.
    Here we revert the change back.
    nkuba committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    b4f57f1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ebd4939 View commit details
    Browse the repository at this point in the history
  5. Add unit test to cover requestRedemptionWithProxy function

    Added tests to cover requestRedemptionWithProxy function in redemptions service.
    Extracted common setup to a function shared by two tests.
    nkuba committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    1dd5a30 View commit details
    Browse the repository at this point in the history
  6. Rebuild Typescript API docs

    nkuba committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    548332d View commit details
    Browse the repository at this point in the history