5 请问 uint(-1) 是什么意思

在看 uniswapv2 erc20 代码,请问此处 uint(-1) 是 0 的意思吗 ? 如果是,那为啥不直接写 0 呢 ?

mapping(address => mapping(address => uint)) public allowance;

if (allowance[from][msg.sender] != uint(-1))
请先 登录 后评论

最佳答案 2022-05-01 08:28

找到了

image.png

请先 登录 后评论

其它 0 个回答

  • 1 关注
  • 0 收藏,1977 浏览
  • 程城 提出于 2022-04-30 21:40

相似问题