Skip to content

Commit 079f063

Browse files
author
mr
committed
full range as well
1 parent 40c1050 commit 079f063

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

contracts/hooks/examples/FullRange.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import {FixedPoint96} from "@uniswap/v4-core/src/libraries/FixedPoint96.sol";
2020
import {FixedPointMathLib} from "solmate/utils/FixedPointMathLib.sol";
2121
import {IERC20Metadata} from "@openzeppelin/contracts/interfaces/IERC20Metadata.sol";
2222
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
23+
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
24+
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
2325

2426
import "../../libraries/LiquidityAmounts.sol";
2527

@@ -264,7 +266,7 @@ contract FullRange is BaseHook, ILockCallback {
264266
if (sender == address(this)) {
265267
currency.transfer(address(poolManager), amount);
266268
} else {
267-
IERC20Minimal(Currency.unwrap(currency)).transferFrom(sender, address(poolManager), amount);
269+
SafeERC20.safeTransferFrom(IERC20(Currency.unwrap(currency)), sender, address(poolManager), amount);
268270
}
269271
poolManager.settle(currency);
270272
}

0 commit comments

Comments
 (0)