-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USDT approve error #597
Comments
That error means that the nodes were unable to correctly estimate a gas limit, so you will need to specify it manually. It could be unable to estimate because the contract has complex external calls, or because the transaction will cause a revert. You can try:
Let me know if you still have any problems. |
I think that may have solved your issue, so I'm going to close this now. Please feel free to re-open if it did not though. Thanks! :) |
I’m having issues approving usdt on my Metamask. The transaction keeps failing |
I want approve usdt to other adddess, I have deal amount like this, but it is error too..
please help me! thanks
`
let contractAddress ="0xdac17f958d2ee523a2206206994597c13d831ec7";
let acountNum = ethers.utils.parseUnits('1',6);
// 使用Provider 连接合约,将只有对合约的可读权限
let contract = new ethers.Contract(contractAddress, contracObj.contractAbi, this.provider);
//创建一个签名过的合约实例
let contractWithSigner = contract.connect(wallet);
await contractWithSigner.approve(toAcount, acountNum);
`
error:
body: "{"method":"eth_estimateGas","params":[{"gasPrice":"0x28fa6ae00","from":"0xeDc6B81DD981F912ff6C8Ec70603274913Dde36a","to":"0xdAC17F958D2ee523a2206206994597C13D831ec7","data":"0x095ea7b300000000000000000000000074622073a4821dbfd046e9aa2ccf691341a076e1000000000000000000000000000000000000000000000000000000000754d4c0"}],"id":50,"jsonrpc":"2.0"}" code: -32016 data: undefined responseText: "{"jsonrpc":"2.0","error":{"code":-32016,"message":"The execution failed due to an exception."},"id":50}↵" url: "http://47.91.28.165:8545/eth" message: "The execution failed due to an exception." stack: "Error: The execution failed due to an exception.↵ at v (blob:http://localhost:8081/ca8a38ea-6f36-460e-9dea-5b620cad2f69:141817:21)↵ at XMLHttpRequest.o.onreadystatechange (blob:http://localhost:8081/ca8a38ea-6f36-460e-9dea-5b620cad2f69:145548:23)↵ at XMLHttpRequest.dispatchEvent (blob:http://localhost:8081/ca8a38ea-6f36-460e-9dea-5b620cad2f69:28786:27)↵ at XMLHttpRequest.setReadyState (blob:http://localhost:8081/ca8a38ea-6f36-460e-9dea-5b620cad2f69:28524:14)↵ at XMLHttpRequest.__didCompleteResponse (blob:http://localhost:8081/ca8a38ea-6f36-460e-9dea-5b620cad2f69:28366:16)↵ at blob:http://localhost:8081/ca8a38ea-6f36-460e-9dea-5b620cad2f69:28476:47↵ at RCTDeviceEventEmitter.emit (blob:http://localhost:8081/ca8a38ea-6f36-460e-9dea-5b620cad2f69:6129:37)↵ at MessageQueue.__callFunction (blob:http://localhost:8081/ca8a38ea-6f36-460e-9dea-5b620cad2f69:2587:44)↵ at blob:http://localhost:8081/ca8a38ea-6f36-460e-9dea-5b620cad2f69:2344:17↵ at MessageQueue.__guard (blob:http://localhost:8081/ca8a38ea-6f36-460e-9dea-5b620cad2f69:2541:13)" __proto__: Object
The text was updated successfully, but these errors were encountered: