I am trying to deploy a contract on Matic network, I have an API key set up and the proper private key for metamask in my env. ( I have deployed many contracts and verified them this way many times. However I cannot get my contract to verify on matic network, I run the exact script in the same way on Mumbai and it works fine.
I run the following script after deploying it successfully
npx hardhat verify --network matic 0x488a79ca15b51d4deb7a2c45a25f32650cbaeb15
The error I receive is the following:
Error in plugin @nomiclabs/hardhat-etherscan: Failed to send contract verification request.
Endpoint URL: https://api.polygonscan.com/api
Reason: The Etherscan API responded that the address 0x488a79ca15b51d4deb7a2c45a25f32650cbaeb15 does not have bytecode.
This can happen if the contract was recently deployed and this fact hasn't propagated to the backend yet.
Try waiting for a minute before verifying your contract. If you are invoking this from a script,
try to wait for five confirmations of your contract deployment transaction before running the verification subtask.
I am quite frustrated I know there is a way to verify through remix but this hardhat command is what I have used in the past and has always worked.
Does anyone know why this would be happening?