fix: remove executeActions wrapper, strict equality checks and rename swap return
This commit is contained in:
@@ -9,9 +9,7 @@ import {console} from "forge-std/console.sol";
|
||||
contract UniswapV4ExecutorExposed is UniswapV4Executor {
|
||||
constructor(IPoolManager _poolManager) UniswapV4Executor(_poolManager) {}
|
||||
|
||||
function decodeData(
|
||||
bytes calldata data
|
||||
)
|
||||
function decodeData(bytes calldata data)
|
||||
external
|
||||
pure
|
||||
returns (
|
||||
@@ -37,9 +35,8 @@ contract UniswapV4ExecutorTest is Test, Constants {
|
||||
function setUp() public {
|
||||
uint256 forkBlock = 21817316;
|
||||
vm.createSelectFork(vm.rpcUrl("mainnet"), forkBlock);
|
||||
uniswapV4Exposed = new UniswapV4ExecutorExposed(
|
||||
IPoolManager(poolManager)
|
||||
);
|
||||
uniswapV4Exposed =
|
||||
new UniswapV4ExecutorExposed(IPoolManager(poolManager));
|
||||
}
|
||||
|
||||
function testDecodeParams() public view {
|
||||
@@ -76,18 +73,11 @@ contract UniswapV4ExecutorTest is Test, Constants {
|
||||
uint256 amountIn = 100 ether;
|
||||
deal(USDE_ADDR, address(uniswapV4Exposed), amountIn);
|
||||
uint256 usdeBalanceBeforePool = USDE.balanceOf(poolManager);
|
||||
uint256 usdeBalanceBeforeSwapExecutor = USDE.balanceOf(
|
||||
address(uniswapV4Exposed)
|
||||
);
|
||||
uint256 usdeBalanceBeforeSwapExecutor =
|
||||
USDE.balanceOf(address(uniswapV4Exposed));
|
||||
|
||||
bytes memory data = _encodeExactInputSingle(
|
||||
USDE_ADDR,
|
||||
USDT_ADDR,
|
||||
100,
|
||||
BOB,
|
||||
true,
|
||||
1,
|
||||
uint128(amountIn)
|
||||
USDE_ADDR, USDT_ADDR, 100, BOB, true, 1, uint128(amountIn)
|
||||
);
|
||||
|
||||
uint256 amountOut = uniswapV4Exposed.swap(amountIn, data);
|
||||
|
||||
Reference in New Issue
Block a user