测试dai 兑换 eth的时候,遇到错误 Fail with error 'TransferHelper: TRANSFER_FROM_FAILED' 使用 uniswapV2Router.swapExactTokensForETH 在swap之前,已经做了授权 require(dai.approve(address(uniswapV2Router), amountIn), 'approve failed.') 为什么还会报这种错误?
Fail with error 'TransferHelper: TRANSFER_FROM_FAILED'
uniswapV2Router.swapExactTokensForETH
require(dai.approve(address(uniswapV2Router), amountIn), 'approve failed.')