10 调用uniswap router 2合约的getAmontsIn方法 报错

error Error: call revert exception; VM Exception while processing transaction: reverted with reason string "ds-math-sub-underflow" [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="getAmountsIn(uint256,address[])", data="0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001564732d6d6174682d7375622d756e646572666c6f770000000000000000000000", errorArgs=["ds-math-sub-underflow"], errorName="Error", errorSignature="Error(string)", reason="ds-math-sub-underflow", code=CALL_EXCEPTION, version=abi/5.7.0)

image.png

原因是什么 如何解决

请先 登录 后评论

最佳答案 2022-12-25 13:42

0x6a6aa13393b7d1100c00a57c76c39e8b6c835041 这个 token 是 9位小数

请先 登录 后评论

其它 1 个回答

cooling - 前端开发
请先 登录 后评论
  • 2 关注
  • 0 收藏,1722 浏览
  • cooling 提出于 2022-12-24 14:53

相似问题