Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

truffle integration #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

adityaraval
Copy link

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.

@nicholashc
Copy link
Owner

There are a few areas where you are likely running into trouble:

  1. 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

  2. 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
      },
  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.

@dancayairdrop
Copy link

There are a few areas where you are likely running into trouble:

  1. 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
  2. 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
      },
  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.

@nicholashc
Copy link
Owner

try 10000000

@andermarce
Copy link

Hello guys,

Is it still worth making a profit with flash loan with many bots competing with each other?

Repository owner deleted a comment from nerypy Jan 12, 2024
Repository owner deleted a comment Feb 23, 2024
Repository owner deleted a comment Feb 23, 2024
Repository owner deleted a comment from zmh-program Feb 23, 2024
Repository owner deleted a comment Mar 1, 2024
Repository owner deleted a comment Mar 1, 2024
@github-staff github-staff deleted a comment from maulanaayub May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants