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

MetaMask Gas Parameters Issue with writeContractAsync #4303

Open
1 task done
gordilovvv opened this issue Sep 30, 2024 · 0 comments
Open
1 task done

MetaMask Gas Parameters Issue with writeContractAsync #4303

gordilovvv opened this issue Sep 30, 2024 · 0 comments

Comments

@gordilovvv
Copy link

Check existing issues

Describe the bug

Hi! i'm having an issue when using writeContractAsync with MetaMask. When I try to execute contract write function (like approve or transfer), the transaction fails with an “Internal JSON-RPC error”.

The general error message I see is:
Internal JSON-RPC error.

When I check MetaMask, I see more details:
{ "code": -32603, "message": "Internal JSON-RPC error.", "data": { "code": -32000, "message": "transaction underpriced: tip needed 25000000000, tip permitted 1500000000", "cause": null } }

I use the Polygon Amoy testnet and don’t calculate gas myself, as I know WAGMI does this automatically. So, is the error on my side or MetaMask’s side? Thanks!

Link to Minimal Reproducible Example

https://stackblitz.com/edit/new-wagmi-27qjgx?file=src%2FApp.tsx

Steps To Reproduce

  1. Connect Metamask
  2. Connect to Polygon Amoy Chain
  3. Click on Approve for all tokens
Error response in example

What Wagmi package(s) are you using?

wagmi

Wagmi Package(s) Version(s)

2.12.12

Viem Version

2.21.9

TypeScript Version

5.0.2

Anything else?

React @18.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant