I made repeated attempts to deploy a fairly basic ERC-721 contract to Polygon via Infura (using HardHat). It apparently accepted the transaction, but on waiting for receipt it just kept polling. Nothing ever showed on Polygonscan. Network setup in HardHat was:
(with both INFURA_KEY and PRIVATE_KEY confirmed to be correct). I tried the default gas price, and several higher values (+10, 25, 50%, and also fixed 75 gwei when base price was around 30 gwei).
The following worked, with no changes to the deployment code or env vars:
The call to deploy returned OK, but the call to contract.deployTransaction.wait() blocked forever.
With debugging code added:
deployer.provider.on("debug", function (e) {
delete e.provider;
console.log("debug event:", e);
});
I could see that the deploy call’s polling for the deployed transaction found it after a few seconds, but then the wait's polling for the receipt never found one.
It might be caused by this change required by Polygon perhaps the 75 one is being blocked by the underpriced ones. Can you let me know what is the from address you’re using to deploy ?