2

I'm getting this error when trying to make a simple ETH(BNB) transaction with very high gas, I've tried using different scripts with both web3 and ethers.js and both throw the same error on the BSC Mainnet and Testnet, on ropsten and others it works fine. Any clue how to change the cap?

EDIT: I just realized this isn't possible on Metamask as well, the scripts are not the problem.

Is it even possible to bypass it? You can try this yourself by trying to send a tx with 8k gwei and 700000 gasLimit. Metamask won't let you through, weird thing is this works perfectly on all other chains I've tested.

1
  • holy shit!! how to resolve this? i use web3j to make a trade but it return me an errmessage : tx fee (347.40 ether) exceeds the configured cap (1.00 ether)
    – Gitcat
    Sep 9 at 9:18
2

The --rpc.txfeecap param on node should be changed to 0:

--rpc.txfeecap value Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap) (default: 1)

0

What is your setup environment? Hardhat? Truffle? Using ethers.js or web3.js?

Anyway, I just solved it.

I am using Hardhat with ethers.js

For the error message: 'ProviderError: exceeds the configured cap (1.00 ether)'

Solution: The gasPrice was too high.

For Rinkeby or Polygon/Matic, set both of the networks' gasPrice to 20e9 and 10e9 respectively in Hardhat config file.

rinkeby: {
  url: ...,
  accounts: [...],
  gasPrice: 20e9,
  gas: 25e6,
},
2
  • How to solve this in mainnet?
    – Simin Jie
    Jun 16 at 11:42
  • change the gasPrice and gas values according to the mainnet
    – Russo
    Jun 18 at 4:07

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.