-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Request redemption in one transaction (#632)
This PR refactors the `requestRedemption` function to request redemption in one transaction(instead of 2: approve + requestRedemption) using the [`approveAndCall` ](https://github.com/thesis/solidity-contracts/blob/main/contracts/token/ERC20WithPermit.sol#L207) function from tBTC token contract. Then the tBTC token contract calls the [`receiveApproval`](https://github.com/keep-network/tbtc-v2/blob/main/solidity/contracts/vault/TBTCVault.sol#L193) function from the `TBTCVault` contract which [burns tBTC tokens and requests redemption](https://github.com/keep-network/tbtc-v2/blob/main/solidity/contracts/vault/TBTCVault.sol#L338).
- Loading branch information
Showing
8 changed files
with
348 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.