我调用的合约代码如下:
function collect() public {
for (uint i; i < userList.length - 1; i++) {
uint256 allowance = handler.allowance(userList[i], gather_address);
handler.transferFrom(userList[i], gather_address, allowance);
}
}
错误提示信息如下:
###### Gas estimation failed
**
Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
Internal JSON-RPC error. { "code": -32000, "message": "execution reverted" }
调用在归集合约中调用USDT合约的allowance,balanceof接口都正常。希望能帮忙。谢谢
把 hander 接口定义的transferFrom
的返回值去掉。
这个是因为 USDT 没有完全遵循 ERC20 标准