Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? Returned error: {"jsonrpc":"2.0","error":"invalid opcode: PUSH0","id":74798583002803402}
I was working on a smart contract and I started with the main net because I am sure that what I am working on will work. I deployed to the mainnet and everything worked fine. However, I had issues with calculating Wei currently and there was a mistake in the figure set in the contract thus; I had to deploy again and I encounter another similar issue with another figure, then I decided to use testnet to avoid deploying the contract and wasting coins on it.
I decided to use testnet to test and deploy to main net when everything works fine. Then I changed the RPC and explorer to testnet and deployed, but I encountered an error. I was confused because everything seems to work well on main net so I decided to search the web. I did and all the solutions provided are not related to the error I had. So I decided to ask on the BNB discord and I got the information that
"The solution is to manually set the EVM version to some previous version, for example, "Paris" (the version before, also known as The Merge), instead of "Shanghai", which is the default now. "
The steps to fix this error in case you face a similar error building on Remix IDE is
I just want to share this because I know it will help someone.
I am tykee.