6

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?

2
  • Which network are they testing on and which version of MetaMask do they have? Sep 9 '21 at 15:07
  • Mainnet, version 10.0.3 Sep 9 '21 at 15:12
5

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.

0

I was able to update my Chrome MetaMask version to 10.1.0 by doing the following steps:

  1. navigate to "Manage Extensions"
  2. Enable "Developer Mode" (top right)
  3. Click on "Update" (top left)

Immediately my MetaMask went from 10.0.3 to 10.1.0.

This fixed that error. Now I'm running into this error when trying to submit a tx via etherscan on an ERC20 token contract: Error: [object Object]

I'm going to update my Ledger Live software and Ethereum app on the device to see if that resolves this.

UPDATE: I forgot to re-enable "Allow contract data..." under "Settings" within the Ledger Nano Ethereum App. After allowing this setting, I can finally interact with smart contracts via etherscan.io again!

enter image description here

0

I'm having the same problem as mentioned above but despite the unistall and re-install of the app on my Ledger and re-enable "Allow contract data..." under "Settings". i'm block since 4/5 days on some spécific Tx/Contrat (Venus contact on BSC / UST transfert on BSC for some example )...

EDIT : i solve my problem, i DL the last version of ledger live on my PC and a new update for my ledger's firmware as appair in setting.

0
0

It looks like you're using Web3.js. Here is the solution I devised a month or so back:

NOTE: You must not try to reuse sendArgs because MetaMask will update the object (by-ref)

//attempt a "normal" transaction
let sendArgs = {
    from: account,
    value: totalBN.toString()
};

try{
    await contract.methods.mint( quantity, signature ).send( sendArgs );
}
catch( err ){
    //watch for it to fail with this specific code
    if( err.code && err.code === -32602 ){
        //try again by forcing type 1 (old format)
        sendArgs = {
            from: account,
            value: totalBN.toString(),
            type: '0x1'
        };
        await contract.methods.mint( quantity, signature ).send( sendArgs );
    }
    else{
        throw err;
    }
}

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.