Hi I am not really an expert with solidity. I have been trying to deploy OpenZeppelin Contracts for ERC20 with remix IDE, i have been getting gas estimation error. if I deploy it in testnet it deploys properly with minimal gas but on mainnet using metamask injector provider i get the error. i have tried compiling with different compiler configuration EVM versions like Paris, London and even Berlin but I always get the error.
Below is the simple ECR20 code I am trying to deploy to mainnet.
Thank you for your response but I am not really an expert the solution you gave is talking about Hardhart but I am trying to deploy with remix. I tried using solidity complier version less than 0.8.20 but the code automatically updates compiler version to match current contract file pragma i.e 0.8.23.