AtomicArbBot
AtomicArbBot copied to clipboard
truffle integration
I want to give a PR to set integration of this smart contract with truffle, but I am still getting some errors while deploying this contract via truffle, please help me to fix this and merge this PR.
There are a few areas where you are likely running into trouble:
-
There is a lot of logic in the
ArbBot.sol
constructor that is likely failing in your test environment because it is trying to make calls to hardcoded mainnet token addresses. Try migrating the contracts without the constructor to pin point the issue -
You likely need to raise the default transaction gas limit the contract is deployed as well as the default block gas limit. For example, run a test network with a higher block gas limit with
ganache-cli -l 999999999999999
. Raise the default gas limit in truffle-config:
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
gas: 10000000,
gasPrice: 1
},
- for whatever reason, truffle does not play nice with more recent npm versions. in my tests, I installed truffle with npm 11 (use nvm to quickly change node versions)
I am no longer supporting this project, but was able to compile and migrate in a quick test using the above tweaks. Hopefully this helps.
There are a few areas where you are likely running into trouble:
- There is a lot of logic in the
ArbBot.sol
constructor that is likely failing in your test environment because it is trying to make calls to hardcoded mainnet token addresses. Try migrating the contracts without the constructor to pin point the issue- You likely need to raise the default transaction gas limit the contract is deployed as well as the default block gas limit. For example, run a test network with a higher block gas limit with
ganache-cli -l 999999999999999
. Raise the default gas limit in truffle-config:development: { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) network_id: "*", // Any network (default: none) gas: 10000000, gasPrice: 1 },
- for whatever reason, truffle does not play nice with more recent npm versions. in my tests, I installed truffle with npm 11 (use nvm to quickly change node versions)
I am no longer supporting this project, but was able to compile and migrate in a quick test using the above tweaks. Hopefully this helps.
Hello, I tried creating a contract but I got the error Out of gas, gas limit I set to 3000000 by default, how much do I need to increase the gas limit.
try 10000000
Hello guys,
Is it still worth making a profit with flash loan with many bots competing with each other?