I am using HardHat to deploy contracts on Polygon (Matic), it works most of the time when deploying or minting.. but then it usually breaks when I switch from testnet to mainnet.
For example: I switched from mainnet to rpc-mumbai.maticvigil.com, then I get the error ProviderError: invalid sender.
Then I updated my hardhat.config.js to point to matic-mumbai.chainstacklabs.com and I am able to mint and deploy contracts with no errors.
I am reaching out to see if this is a known issue occurring with polygon and or hardhat?