Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/abstract/JBSablier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ abstract contract JBSablier is ERC165, ERC1271, IUniswapV3SwapCallback {
TARGET_TOKEN_IS_TOKEN0 = address(_token) < address(WETH);
TARGET_TOKEN = address(_token);

// Approve tokens for transfer
IERC20(TARGET_TOKEN).approve({spender: address(PERMIT2), amount: type(uint256).max});
WETH.approve({spender: address(PERMIT2), amount: type(uint256).max});

POOL = IUniswapV3Pool(
address(
uint160(
Expand Down Expand Up @@ -215,9 +219,6 @@ abstract contract JBSablier is ERC165, ERC1271, IUniswapV3SwapCallback {
// Check if PRBProxy has been setup
if (address(proxy) == address(0)) deployProxyAndInstallPlugin();

// Approve tokens for transfer
_data.token.approve({spender: address(PERMIT2), amount: type(uint256).max});

// Encode and proxy.execute with data for the proxy target call if user defined each *stream type*
if (_data.linWithDur.length > 0) {
bytes memory data = abi.encodeCall(
Expand Down
2 changes: 0 additions & 2 deletions test/helpers/TestBaseWorkflowV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ import '@jbx-protocol/juice-contracts-v3/contracts/libraries/JBConstants.sol';

import './AccessJBLib.sol';

import '@paulrberg/contracts/math/PRBMath.sol';

// Base contract for Juicebox system tests.
//
// Provides common functionality, such as deploying contracts on test setup for v3.
Expand Down