Cancelling truffle migrate to mainnet. With previous pending transactions that have low gas prices

contract-deploymentmetamaskpending-transactionstruffletruffle-migration

I am exporting my smart contract to the Ethereum mainnet and I am using Truffle to export my smart contract. However when deploying I was trying out multiple parameters and as a result have 11 transactions pending with variable gas prices. The lowest nonce has a gas price of 40 GWEI set with the other transactions having similair low gas prices. The transaction with the lowest nonce is already pending for more than 22 hours. Currently gas costs typically fluctuate between 70-120 GWEI, (if I look at ETH Gas Station).

I would like to cancel/replace these transactions. So that I can make a new deployment of my smart contract while paying a higher gas fee.

I have already tried to send a transactions of 0 ETH to myself of MetaMask with a higher gas fee and with the same nonce as my first pending transaction. But this transaction does not work, it gives the error "replacement transaction underpriced".

So basically I would like to redeploy my smart contract but I have a lot of low gas fee contract deployment transactions pending. What is the best course of actions?

My preference is to get the smart contract deployed ASAP and I am prepared to pay gas fees to cancel the 11 pending transactions. But as previously mentioned this method did not seem to work when done in MetaMask. So any suggestions are appreciated!

Best Answer

I managed to solve this issue by issuing new transactions where I sent 0 ETH to myself, starting from the lowest nonce. For some reason it did not work in MetaMasks but it did work using Trust Wallet.

Related Topic