Troubleshooting 'EvmError: Revert' When Deploying Proxy Smart Contracts on BTT Chain testnet

This is my first attempt at deploying a smart contract on the BTT Chain testnet, and I’ve encountered an issue labeled as “← EvmError: Revert.” This occurs when attempting to deploy proxy contracts to the testnet. I have a balance of 6k BTT, which should be enough for the gas fees . Interestingly, I’ve tried deploying the same code to other EVM chains and successfully deployed smart contracts on Avalanche without any problems. I’m using Foundry for deploying contracts.

What could potentially be causing this issue? Any insights or guidance would be greatly appreciated. Thank you!

I’ve tried to Google and got only this answer but it’s related to optmism
Link to the Q&A

3 Likes

@EMerchant @Sirluke kindly assist :pray: :pray:

3 Likes

@constantinpricope201 also can be of help

2 Likes

@kabugu can you please outline which solidity version you are using? and also are you using openzepplin contract ? If yes can you please let me know version. So i could try to reproduce on my side.

3 Likes

Version solidity 0.8.18;
and yes I’m using openzeppelin
openzeppelin version @openzeppelin/contracts": “4.9.0”

2 Likes

@kabugu I did deployed with hardhat but i did need to increase gas limit

    const proxyContract = await Proxy.deploy(counterContract.target,accounts[0].address,"0x", {gasLimit: 2000000});

Can you try with increasing gas limit? Else i will try with foundry to reproduce this.

2 Likes

Here is another one i deployed and verified code as well. TransparentUpgradeableProxy | Address 0xcdbc6107a87Cd1AAc40Cc237442deE3a204f1333 | BTTC

2 Likes

Probably the specific gas limit you have set for the deployment might be insufficient for the BTT Chain.
Please why not try increasing the gas limit and see if the deployment goes through.

1 Like

6k BTT is a very low amount, try to have at least 100k

1 Like

Gm @Sirluke

I can only request 10k BTT tokens per day through faucet can you please send me more tokens thatnsk

Sure, give me your address in private

@adeel I tried increasing the gas limit but am Still facing same issue

can you please try to deploy my code

I pushed the smart contract to github with deployment instruction.

here is the repo link repo link

I found a way to get couple millions of btt now i have 3m

2 Likes

new Error :point_down:

Failed to deploy script:
Execution reverted: EvmError: OutOfGas (gas: 20000000)

Now, I have enough balance of BTTC 20m

and I tried to increase the gas limit to 20 m. but i end up with this error :point_down:

do I miss something?:thinking:

cc @adeel @Okorie

1 Like

Wow, this is huge
Good to hear

Try 2,000,000(2M) instead

@kabugu Let me try your repository. Also today i will push mine repository today as well using hardhat.

2 Likes

GM @adeel did you try it ?

@kabugu I did tried but didn’t complete this. I wil do sure complete this today and will let you know.

1 Like

So first thing I will suggest is check your deployed script. There might be an issue with that.

Two if the contract required or depends on another contract for it to work make sure that contract has been deployed else it will keep failing.

Third option is to try and deploy using remix ide. If that works then the issue is definitely from your hardhat