Skip to content
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

RPC Error: err: insufficient funds for gas * price + value #7021

Open
luu-alex opened this issue Apr 30, 2024 · 0 comments
Open

RPC Error: err: insufficient funds for gas * price + value #7021

luu-alex opened this issue Apr 30, 2024 · 0 comments
Assignees
Labels
4.x 4.0 related Bug Addressing a bug

Comments

@luu-alex
Copy link
Contributor

luu-alex commented Apr 30, 2024

trying to send a transaction with no data may error using rpc providers when there is sufficient funds for gas and values.

For example on metamask RPC Error: err: insufficient funds for gas * price + value, with unexpectedly high gas prices .

This issue is happening due to the sendtransaction method using eth_call to check if the smart contract will revert, but with metamask, eth_call will return an error expecting more gas to be provided.

Transaction sent:

object { from: "0xEd965cEAca9DE3DDE4e98109f52c3E195e3F2C91", to: "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", value: "0x5af3107a4000", gasPrice: undefined, maxPriorityFeePerGas: "0x9502f900", maxFeePerGas: "0x951425ae" }

Metamask error

MetaMask - RPC Error: err: insufficient funds for gas * price + value: address 

0xEd965cEAca9DE3DDE4e98109f52c3E195e3F2C91 have 508654303021506364 want 1250662775000000000 (supplied gas 500000000) 

Metamask is returning a revert issue wanting 1.250662775 eth when the transaction only needs atleast 0.005 eth in balance
Bug reported in #6997

Expected behavior

Actual behavior

Steps to reproduce the behavior

  1. [First step]
  2. [Second step]
  3. [and so on...]

Logs

Environment

@luu-alex luu-alex added Bug Addressing a bug 4.x 4.0 related labels Apr 30, 2024
@luu-alex luu-alex changed the title Only checkRevert when data is included in transaction RPC Error: err: insufficient funds for gas * price + value Apr 30, 2024
@luu-alex luu-alex self-assigned this May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related Bug Addressing a bug
Projects
None yet
Development

No branches or pull requests

1 participant