Error - Gas Estimation

Hi

I’m trying to deploy a contract from Remix to the BSC Test Net but I’m getting the following error

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
Internal JSON-RPC error. { “code”: -32000, “message”: “execution reverted”

Please can someone advise what i’m doing wrong?

This usually means that the transaction you are attempting is very probably going to hit a revert.
This reason really depends on the transaction, contracts to have a max limit, deploying to another similar testnet or using the plugin truffle-contract-size, can help you assess that.

It’s strange because I can deploy the contract to the main net but not the test net? I am unable to find the plug in you’ve mentioned?

I see that's weird. do you have testnet bsc blaance?
Also you can find the plug in here https://www.npmjs.com/package/truffle-contract-size

Talk friend, how are you?

Greetings!

This is happening because it is configured in the contract to be deployed on MainnetV2's network. If you are trying on testnet, you have to add the testnet address to the pancake router.

To help you with this we need to see how the code is behaving, put the code in your section.

1 Like