0

I constantly get failed transactions when sending out tokens like USDT using metamask. I have my gwei set at 10 and the gas limit at 21000. I even tried gas limit set to 51000 and it still fails. Where can I go to easily calculate what numbers to put to send out my tokens? Obviously metamask isn't calculating this correctly.

  • 21,000 is for sending Ether, not anything else. And even with Ether, if the destination address is a contract (rather than an externally-owned account), then it will cost most than 21,000. So in short, the only thing that you can do with 21,000 is transferring Ether to an externally-owned account. – goodvibration Jul 11 at 7:35
  • So how would one even know what to set the gas limit to when transfering tokens? – Patoshi パトシ Jul 11 at 7:38
  • Just set it to a large enough value (which you are willing to pay in the worst case). Don't worry about gasLimit, you'll get back whatever's not being used (unlike gasPrice, which you will pay in full). The only thing to worry about is if the contract with which you interact performs some wasteful operations (intentionally or unintentionally). The idea about gasLimit is just to protect you from spending more than the maximum that you're willing to. – goodvibration Jul 11 at 8:14
  • So what is an appropiate gas price? default is 10 gwei. i set it to 1 and it works, but does it work for others too? – Patoshi パトシ Jul 11 at 15:00
  • Gas Price is for you to decide. It's like an auction - the higher you go, the better are your chances to get your transaction executed. And ultimately, this means that a higher gas-price yields a faster execution of your transaction. So just input however much you're willing to pay. – goodvibration Jul 11 at 15:02
0

The solution to sending out tokens is to look at other transactions that are sending the same token from its contract source. From there you can see how much other people are paying and what you should set in the settings. For me, looked at the usdt contract and saw others setting GAS_PRICE to 1 Gwei and gas limit to 400,000. That worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.