2

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!

1

2 Answers 2

2

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.

1
  • This worked for me also, to replace this txn to deploy a contract.
    – Neo
    Jun 18, 2022 at 1:14
0

You can cancel the transactions with the following steps:

  1. Get the latest nonce on etherscan (in your address).
  2. Use the MetaMask to send a new transaction with the step1 nonce.(with the 'Customize transaction nonce' option enabled in Settings->Advanced)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.