Giter Club home page Giter Club logo

Comments (7)

manseth avatar manseth commented on July 26, 2024

When i run the command "truffle migrate --network mainnet --reset" i get this

`Compiling your contracts...

Everything is up to date, there is nothing to compile.

Migrations dry-run (simulation)

Network name: 'mainnet-fork'
Network id: 1
Block gas limit: 12487759 (0xbe8c4f)

1_initial_migration.js

Deploying 'Migrations'

block number: 11157205
block timestamp: 1604047996
account: 0xcE3C76F91Ca359A6D6379E409E490DfB9d83E756
balance: 0.009407028
gas used: 176931 (0x2b323)
gas price: 92 gwei
value sent: 0 ETH
total cost: 0.016277652 ETH


Total cost: 0.016277652 ETH

2_deploy_contracts.js

Replacing 'Flashloan'

Error: *** Deployment Failed ***

"Flashloan" could not deploy due to insufficient funds

  • Account: 0xcE3C76F91Ca359A6D6379E409E490DfB9d83E756
  • Balance: 6891932000000000 wei
  • Message: sender doesn't have enough funds to send tx. The upfront cost is: 252456372000000000 and the sender's account only has: 6891932000000000
  • Try:
    • Using an adequately funded account
    • If you are using a local Geth node, verify that your node is synced.
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/deployer/src/deployment.js:364:1
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at Migration._deploy (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:68:1)
at Migration._load (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:55:1)
at Migration.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:171:1)
at Object.runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:150:1)
at Object.runFrom (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1)
at Object.runAll (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:114:1)
at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:79:1)
at runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:269:1)
at setupDryRunEnvironmentThenRunMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:257:1)
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:220:1

Truffle v5.1.50 (core: 5.1.50)
Node v12.19.0`

then i run the "node run-arbitrage.js" and i get the same "ERR_INVALID_URL".
I have already create a .env like this in the root folder and still get the same error

INFURA_URL=wss://mainnet.infura.io/ws/***************************** PRIVATE_KEY=ac**********************************************

You can notice i get a ""Flashloan" could not deploy due to insufficient funds" but the total cost is 0.016277652 ETH since i have a lot more than that in my wallet.

from defi-arb-bot.

olegmitrakhovich avatar olegmitrakhovich commented on July 26, 2024

hey man, sorry for the late reply. but look at this line here:
https://github.com/olegmitrakhovich/Defi-Arb-Bot/blob/master/run-arbitrage.js#L8

you need to make a ".env" file and inside that file just write "INFURA_URL="

from defi-arb-bot.

olegmitrakhovich avatar olegmitrakhovich commented on July 26, 2024

as for your gas issue, 0.016277652 ETH is way too cheap.. I had to pay 90$ bucks to deploy this thing, keep playing with the gas fee and make you have atleast 1 ETH in your account.

from defi-arb-bot.

manseth avatar manseth commented on July 26, 2024

No worries, okay that's what i have done i have create a .env file and i have put inside my infura url + private key and and i still get the error when i run the node run-arbitrage.js :( but when i run truffle migrate --network mainnet --reset the only error it's for the gas.

How can i change the gas fee ? On the script or on my wallet ?

Sorry if my questions seem dumb but i'm "new" to this.

EDIT:
OKAAAY i understand let me explain

The problem of fees is due to the fact that "truffle migrate --network mainnet --reset" could not finish because I do not have enough ETH on my wallet so the 0.016277652 is only a part of the total amount to deploy the contract the total amount being about $ 90 as you said.

from defi-arb-bot.

olegmitrakhovich avatar olegmitrakhovich commented on July 26, 2024

lol not a problem, no such thing as a dumb questions. its kinda cool that people are trying to make this code work, so I'm flattered. Also check this line again : https://github.com/olegmitrakhovich/Defi-Arb-Bot/blob/master/run-arbitrage.js#L8

make sure the variable you are using is right, because I switched to QUICK_NODE recently. Make sure you are using the right name for your variable.

from defi-arb-bot.

manseth avatar manseth commented on July 26, 2024

Okay i will replace infura by quick node. Thank you for your answer !
And one last question, when the contract is deployed (i assume you done it) did you make any profit from it ? If yes that's very good but if no what should we for make profit from it ?

from defi-arb-bot.

olegmitrakhovich avatar olegmitrakhovich commented on July 26, 2024

no I didn't make any money, if anything I lost money lol. That's why I posted the code here to see if someone can tell me what's going on. The prices I am getting are wrong for some reason...wrong or my bot is not fast enough to do the transaction ... take a look at other issues. People forked this code multiple times so I'm hoping to through their stuff soon and see if I find anything.

from defi-arb-bot.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.