0

I'm trying to deploy a BEP20 contract using Remix on Binance TestNet, but I keep getting this error:

creation of TToken errored: Returned error: {"jsonrpc":"2.0","error":"[ethjs-query] while formatting outputs from RPC '{\"value\":{\"code\":-32603,\"data\":{\"code\":-32000,\"message\":\"transaction underpriced\"}}}'","id":3815167297577109}

I increased Gwei as seen in the picture below, but still not working and when I put a value bigger than 0, I get additional error:

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
Returned error: {"jsonrpc":"2.0","error":"execution reverted","id":3815167297577252}

Things I noticed in Remix that I don't understand

  • Why the "evm version: istanbul"
  • Account address contains 0.1 TBNB not 0.1 ETH

enter image description here

5
  • Is your constructor payable? Aug 29, 2023 at 11:02
  • What do you mean?
    – mazagngy
    Aug 29, 2023 at 11:14
  • It's a simple question, is your constructor marked payable? Aug 29, 2023 at 12:33
  • oh sorry, no it's not.
    – mazagngy
    Aug 29, 2023 at 12:35
  • I am facing the same error, did you resolve it? my contract gives me the same error, when i try to deploy it on BNB , if yes how did you resolve it?
    – route2
    Oct 28, 2023 at 17:51

1 Answer 1

0

Case 1- I assume you are sending 100 gwei thinking it is a gas price, but it's not. You don't need to mention the gas price, it will be deducted by default. If this is the case, then just don't give any value to that field.

Case 2 - In case you are trying to send 100 gwei at the time of deployment, you can't actually do that because you mentioned the constructor is not payable. For this, you have to mark your constructor payable.

4
  • As mentioned in the question, when I don't give any value, I still get the original error of "transaction underpriced", and i tried your answer to make it payable and add the 100 gwei, and I still get the second issue as well.
    – mazagngy
    Aug 29, 2023 at 13:46
  • Same issue - stackoverflow.com/questions/67972674/… Aug 29, 2023 at 14:24
  • Thanks, so i increased the gas limit by adding 2 more zeros at the end, the error went away, but the transaction is pending for a couple of hours now!
    – mazagngy
    Aug 29, 2023 at 19:25
  • aby luck bro? i have the same issue Oct 19, 2023 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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