1

I am working on BEP20 token which I eventually want to deploy on the Mainnet. I have currently deployed the token on the Testnet.

I am using metamask as my wallet.

Transaction underpriced Error

When I interact with the contract on the testnet, If I use a gas price of less than 10 Gwei I get a JSON-RPC error: "transaction underpriced". During this transaction my metamask wallet is connect to the BSC Testnet using the Official JSON-RPC endpoint provided at this link.

After this I connected my wallet to the BSC Testnet using Moralis speedy node endpoint. And this time when I tried interacting with the contract at a gas price of 5 Gwei it succeeded without any errors.

So, my question is that, is the requirement of gas price of at least 10 Gwei using official JSON-RPC endpoint only specific to the testnet or will it be also true for the mainnet.

Or could it be an inefficient contract code.

If you have contracts with similar code deployed on both mainnet and testnet can you check this and clear my doubt.

Thanks!

1
  • 1
    It doesn't look like a fault of the contract since it did succeed the second time. That error usually appears when you have a pending transaction, you might try resetting the metamask account.
    – Ismael
    Jun 20, 2021 at 0:01

2 Answers 2

0

I had similar error increasing gasprice gwei value fixed it

0

You need to increase your gas price by at least approximately the current network price. For example: https://stats.goerli.net/ can see current gas price

Your Answer

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

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