Reputation: 1
How can I delegate call from a contract to pancakeswap v3 router for exactInput using abi.encodeWithSignature. I am having a problem sending it to the router here is the code
function exactInputSingle(address token0, address token1, uint256 amountIn, uint24 fee, address recipient) external pure returns (bytes memory){
ExactInputSingleParams memory exactInputSingleParams = ExactInputSingleParams({
tokenIn : token0,
tokenOut : token1,
fee : fee,
recipient : recipient,
amountIn : amountIn,
amountOutMinimum : 0,
sqrtPriceLimitX96 : 0
});
return abi.encodeWithSignature("exactInputSingle(ExactInputSingleParams)", exactInputSingleParams);
}
Upvotes: 0
Views: 98