[Ethereum] Metamask – “Params specify an EIP-1559 transaction but the current network does not support EIP-1559”

eip-1559erc-721metamasknftrpc

I'm working on a little erc 721 project. We have a frontend that allows users to mint a couple of our nfts with a button.

contract.methods.mint(tokensNumber).send({from: accounts[0], value: 75000000000000000 * tokensNumber} )

For some reason, a subset of our users are getting this error:

MetaMask - RPC Error: Invalid transaction params: params specify an EIP-1559 transaction but the current network does not support EIP-1559 Object

We've noticed that the common denominator is that all of them are getting the old type 0 transaction form on their metamask, rather than the new eip-1559 form with priority fee etc.
But weirdly some users have been able to successfully make type 0 transactions (I see both types transacting successfully on etherscan).

We're able to solve their problem by having them reinstall metamask, whereupon they get the type 2 form, but that's not really ideal.

Has anyone else had this problem? Any chance it's on Metamask's end?

Best Answer

I was also struggling with this previously. This error occurs with users using Metamask with Ledger/Trezor.

It appears that more recent versions of web3js is requiring Metamask to strictly send txs as EIP1559 txs, although Ledger does not support EIP1559 txs with Metamask just yet.

Metamask have rolled out EIP1559 + Ledger support on version 10.1.0 (https://github.com/MetaMask/metamask-extension/releases/tag/v10.1.0). This should resolve the issue which you're facing. Users could directly update to that version on Chrome already, though still waiting for rollout to Firefox extensions.

Alternatively you could drop the web3js package version to something older (e.g. 1.2.x), though that has its own quirks.

Last I've tested, this also affected other tooling like InstaDapp and Remix.

Related Topic