Skip to content

Commit 95c81a1

Browse files
`Merge remote-tracking branch 'origin/main' into feat/susds-wrappers
2 parents 17ed1e5 + 351c0a8 commit 95c81a1

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/BaseTokenWrapper.sol

+5
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ abstract contract BaseTokenWrapper is Ownable, IBaseTokenWrapper {
103103
return _withdrawToken(amount, to, aTokenOut);
104104
}
105105

106+
/// @inheritdoc IBaseTokenWrapper
107+
function borrowToken(uint256 amount, address to) external {
108+
// Implement borrow logic here
109+
}
110+
106111
/// @inheritdoc IBaseTokenWrapper
107112
function rescueTokens(
108113
IERC20 token,

src/interfaces/IBaseTokenWrapper.sol

+7
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ interface IBaseTokenWrapper {
6161
PermitSignature calldata signature
6262
) external returns (uint256);
6363

64+
/**
65+
* @notice Borrows the wrapped token from the Pool, unwraps it, sending to the recipient
66+
* @param amount The amount of the token to borrow from the Pool and unwrap
67+
* @param to The address that will receive the unwrapped token
68+
*/
69+
function borrowToken(uint256 amount, address to) external;
70+
6471
/**
6572
* @notice Provides way for the contract owner to rescue ERC-20 tokens
6673
* @param token The address of the token to withdraw from this contract

test/BaseTokenWrapper.t.sol

+1
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,7 @@ abstract contract BaseTokenWrapperTest is Test {
639639

640640
function testRescueETH() public {
641641
uint256 ethAmount = 100 ether;
642+
vm.deal(address(tokenWrapper), 0);
642643
assertEq(
643644
address(tokenWrapper).balance,
644645
0,

0 commit comments

Comments
 (0)