ExtropyIO / defi-bot

Tutorial for building DeFi arbitrage bots

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trouble deploying TradingBot.sol

i2thesecond opened this issue · comments

I cannot deploy the TradingBot.sol contract on the blockchain networks (I have been using Kovan and Ropsten test networks) on Remix IDE. Remix is giving me an the error:

"Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
execution reverted"

I am using compiler version 0.5.17 as suggested by the documentation.

When I send anyways, the contract fails. The failed contract deployment transaction can be seen here : https://ropsten.etherscan.io/tx/0xa632f0d856ed5de32e45e5bcaad1e9a976f9565b752f8f8697d5732b76912e2a

I have tried increasing gas limit, but the error still appears.

Additionally, when I compile the TradingBot.sol, I receive two warnings,

TradingBot.sol:2:1: Warning: Experimental features are turned on. Do not use experimental features on live deployments.
pragma experimental ABIEncoderV2;
^-------------------------------^
TradingBot.sol:307:9: Warning: Return value of low-level calls not used.
address(ZRX_EXCHANGE_ADDRESS).call.value(msg.value)(_calldataHexString);
^---------------------------------------------------------------------^

Is there a solution to deploy the TradingBot.sol?

@i2thesecond Hi did you manage to solve this? I am getting the same error...

@i2thesecond Hi did you manage to solve this? I am getting the same error...

No. I tried different compiler versions and different gas limits to no avail. I still cannot deploy the contract.

I'm closing the issue. I created a new contract, ensured that the right contract is compiled using 0.5.17 compiler version, and successfully deployed the contract on Ropsten.