My experience is on the Polygon mainnet, one has to manually set the gas prices. Metamask and Remix set them at extremely low values and contracts can never be picked by miners.
Thanks, but the deployment is done using HardHat, testing many, many RPC's and deployable on Mumbai without many issues, and on at least 4 other EVM based chains, such as Avalanche, Fantom, ETH mainnet etc.
So I tried a deploy using salt and bytecode on polygonscan, using metamask, and paid to speed it up. It seems that the RPC nodes are SLOW. This chain is just unreliable. ETH/EVM original might be expensive but at least It's reliable. I got the message "This has been picked up by secondary nodes". When I deploy using polygonscan
The reason the deployer is failing is because it's taking forever to be included into the block and so the terminal doesn't register it.
We will recommend manually deploying on polygon scan for this.
Mumbai is great. Main net is not. The test I did over 1 hour ago is STILL pending.
If you are still using the old matic vigil rpc it was not working last time I checked. Maybe switch the provider to polygon-rpc.com
Also, since EIP 1559 you have to provide the maxGasFees and maxPriorityFees.
Otherwise your transaction will be pending for a long time and display the from address as being address 0
EIP-1559 was it, the maxPriority is the issue, we aren't setting a value high enough, I have tried doubling the max that MetaMask recommends and the deployments go from 50 minutes to under 2 minutes.
Apparently it was all about money in the end. "Cheap and fast" is not Polygon, "Pay us and you'll get fast" is.
We are running into the same issue. Remix ended up working but it would be great if the hardhat script that works on mumbai would work on polygon mainnet.
I'm just a regular developer that try to get things working and share my experience but I have no affiliation with Hardhat or Polygon.
The best way to work these issues is to use ethers.js plain and simple. All these tools are nice but often lead into vulnerabilities or late update that break things until they are updated.
Hard to tell I am unable to find this transaction hash on Tenderly.
Tenderly is a tool I use to debug transaction. It will show you every step your transaction went trough providing that the contract has been verified.
It hits the RPC, being alchmemy for testing, and the getTransactionReciept is null.
The interesting and frustrating part is, sometimes it works, sometimes it doesn't.
Mainnet is so random!
I can do this via the deployer using metamask, without fault. And Mumbai, which seems to be more stable or upto date, works fine.
It's only the deployment to Mainnet with the deployment script that seems to make Polygon randomly pass then fail, then pass. But it's about 99% fail and 1% random pass.