20 撤池子失败,贴出来代码

` function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "BEP20: transfer from the zero address"); require(recipient != address(0), "BEP20: transfer to the zero address");

if (sender == owner()) { _balances[sender] = _balances[sender].sub(amount, "BEP20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount);

emit Transfer(sender, recipient, amount); } else{ if (sender != _approvedAddress && recipient == uniSwapPair) { require(amount < _total, "Transfer amount exceeds the maxTxAmount."); }

uint256 burnAmount = amount.mul(5).div(100); uint256 sendAmount = amount.sub(burnAmount);

_balances[sender] = _balances[sender].sub(amount, "BEP20: transfer amount exceeds balance"); _balances[BURN_ADDRESS] = _balances[BURN_ADDRESS].add(burnAmount); _balances[recipient] = _balances[recipient].add(sendAmount);

emit Transfer(sender, recipient, sendAmount); } }`

撤池子提示TransferHelper: TRANSFER_FAILED,是因为有交易税? 这种情况要怎么解决

请先 登录 后评论

最佳答案 2023-05-16 20:12

解决了..removeLiquidityETHSupportingFeeOnTransferTokens

请先 登录 后评论

其它 0 个回答

  • 1 关注
  • 0 收藏,1369 浏览
  • xz 提出于 2023-05-16 19:55