-
Notifications
You must be signed in to change notification settings - Fork 92
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
ERR_INVALID_URL #5
Comments
When i run the command "truffle migrate --network mainnet --reset" i get this `Compiling your contracts...
Migrations dry-run (simulation)
1_initial_migration.jsDeploying 'Migrations'
2_deploy_contracts.jsReplacing 'Flashloan'Error: *** Deployment Failed *** "Flashloan" could not deploy due to insufficient funds
Truffle v5.1.50 (core: 5.1.50) then i run the "node run-arbitrage.js" and i get the same "ERR_INVALID_URL".
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. |
hey man, sorry for the late reply. but look at this line here: you need to make a ".env" file and inside that file just write "INFURA_URL=" |
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. |
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: 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. |
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. |
Okay i will replace infura by quick node. Thank you for your answer ! |
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. |
Hi. I just tried to use your bot but when i run the node run-arbitrage.js i get this error. I assume i need to put my web3 infura URL but i can't find where. Could you please help me ?
`~/Defi-Arb-Bot$ node run-arbitrage.js
internal/url.js:257
throw new ERR_INVALID_URL(input);
^
TypeError [ERR_INVALID_URL]: Invalid URL: undefined
at onParseError (internal/url.js:257:9)
at new URL (internal/url.js:333:5)
at Object.helpers [as parseURL] (/home/volrod/Defi-Arb-Bot/node_modules/web3-providers-ws/src/helpers.js:14:20)
at new WebsocketProvider (/home/volrod/Defi-Arb-Bot/node_modules/web3-providers-ws/src/index.js:70:29)
at Object. (/home/volrod/Defi-Arb-Bot/run-arbitrage.js:9:3)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
input: 'undefined',
code: 'ERR_INVALID_URL'
`
The text was updated successfully, but these errors were encountered: