我是使用的remix的内置账户,并且在上面部署了,工厂,路由,weth,和一个token的合约。
内置账户地址:0x5B38Da6a701c568545dCfcB03FcB875f56beddC4
ETH余额:99.9999
token余额:100000000
理论上这个地址的余额是足够的,然后我去调用合约就报错
我这个应该如何做才能成功添加流动性呢?
“第一步:将token授权给合约”。
请问下您说的这个token应该授权给哪个合约呀? UniswapV2Router02??还是UniswapV2Factory??或者UniswapV2Pair??
我现在只要一点击添加流动性:addLiquidity()就得报错:
revert
The transaction has been reverted to the initial state.
Note: The called function should be payable if you send value and the value you send should be less than your current balance.
You may want to cautiously increase the gas limit if the transaction went out of gas.
不知道是什么原因??
另外: 这个UniswapV2ERC20.sol是做什么用的?在什么时候会用到?