dex中的swap方法

 if( canSwap &&
            !swapping &&
            !automatedMarketMakerPairs[from] &&
            from != owner() &&
            to != owner()
        ) {

            swapping = true;

            swapAndLiquify(amount);
            swapping = false;
        }
    有这么一段在卖token的时候,如果达到条件会执行这里面的操作,里面主要的功能是用本币交换usdt,(交易对就是本币和usdt),在里面swap执行swapExactTokensForTokensSupportingFeeOnTransferTokens,一直报Fail with error 'UniswapV2: TRANSFER_FAILED',是什么原因
请先 登录 后评论

2 个回答

张小风
请先 登录 后评论
zen
请先 登录 后评论