I have this solidity function for interacting with Sushiswap:
function swapSingleParamswhitPool(
uint256 amountIn,
uint256 amountOutMinimum,
address pool,
address tokenIn,
bytes memory data) public payable {
ITridentRouter.ExactInputSingleParams memory exactInputSingleParams = ITridentRouter.ExactInputSingleParams(amountIn, amountOutMinimum, pool, tokenIn, data);
tridentRouter.exactInputSingle{ value: msg.value }(exactInputSingleParams);
}
If I run this function, I always got error:
{ "code": 3, "message": "execution reverted: BentoBox: Transfer not approved", "data": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001f42656e746f426f783a205472616e73666572206e6f7420617070726f76656400" }
I set masterContract on BentoBox to approved, tried to approve manually too, but nothing works. Can anyone help me with this? Thank You very much.