Skip to content

Commit

Permalink
`Merge remote-tracking branch 'origin/main' into feat/susds-wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
CheyenneAtapour committed Sep 18, 2024
2 parents 17ed1e5 + 351c0a8 commit 95c81a1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/BaseTokenWrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ abstract contract BaseTokenWrapper is Ownable, IBaseTokenWrapper {
return _withdrawToken(amount, to, aTokenOut);
}

/// @inheritdoc IBaseTokenWrapper
function borrowToken(uint256 amount, address to) external {
// Implement borrow logic here
}

/// @inheritdoc IBaseTokenWrapper
function rescueTokens(
IERC20 token,
Expand Down
7 changes: 7 additions & 0 deletions src/interfaces/IBaseTokenWrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ interface IBaseTokenWrapper {
PermitSignature calldata signature
) external returns (uint256);

/**
* @notice Borrows the wrapped token from the Pool, unwraps it, sending to the recipient
* @param amount The amount of the token to borrow from the Pool and unwrap
* @param to The address that will receive the unwrapped token
*/
function borrowToken(uint256 amount, address to) external;

/**
* @notice Provides way for the contract owner to rescue ERC-20 tokens
* @param token The address of the token to withdraw from this contract
Expand Down
1 change: 1 addition & 0 deletions test/BaseTokenWrapper.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ abstract contract BaseTokenWrapperTest is Test {

function testRescueETH() public {
uint256 ethAmount = 100 ether;
vm.deal(address(tokenWrapper), 0);
assertEq(
address(tokenWrapper).balance,
0,
Expand Down

0 comments on commit 95c81a1

Please sign in to comment.