Frequent Issue Happening Across The Forum (Deploying Timeout)

I wanted to make a main thread to talk about this problem because it has been happening to a lot of people without a clear reason as to why, and there is little that can be done to help move the deployment process along.

The issue that I am getting is "TransactionMinedTimeout [Error]: Timed out waiting for transaction 0x6ceaee2d3be9923558bc83d981267133a9700833ce0fc746fa49ff713a315d95" and although I was able to succesfully publish my contract on rinkeby, using Polygon I am unable to get past this. I have tried setting gas limits and prices and even if I set them obsurdly high (higher than my balance) I don't even get an error that I have insufficient balance.

:1234: Code to reproduce

// scripts/deploy.js
async function main() {
    const Contract = await ethers.getContractFactory("ContractV5");
    console.log("Deploying Contract proxy...");
    const contract = await upgrades.deployProxy(Contract, [], { initializer: 'initialize' });
    console.log("Contract deployed to:", contract.address);
  }
  
main()
  .then(() => process.exit(0))
  .catch(error => {
    console.error(error);
    process.exit(1);
  });

This is a slightly modified version of the deploy.js script that is provided in all of the tutorials.

:computer: Environment

I am using solidity 0.8.9 but it seems to be a global issue, and I am using hardhat with the default configs within the tutorial.

Thanks for posting @MichaelK.

Can you share if this happened on Polygon mainnet or testnet?

When you see this error, does the transaction show up on Etherscan when you look it up by hash?

Ah okay an update, now that I have tried a few things I realized that the issue was something to do with not having enough gas the first time. There was already a transaction from before where I only had faucet gas, and when I renamed the contract and finally got the correct error that it cannot deploy due to there already being another contract with the same hash. I ended up fixing it by changing my code a little bit. I am wondering whether you guys are the ones that hash the name for the contract ex (0x888888) or if that is the network?

I didn't understand this question.