-
Notifications
You must be signed in to change notification settings - Fork 274
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
Insufficient funds error message after running get_weth.py #18
Comments
I'm having same issue even though I got testnet ether from faucet |
get_weth.py mints 1 WETH, which is likely more than you got from the faucet. You can reduce the value in line 19 to smaller value. |
Nope even though I change the value to 100 in line 19 it gives same error |
Does your error message say If it says got: 0, it means your wallet doesn't have ether. Did you use a Kovan faucet? Can you see the funds on kovan.etherscan.io? |
I am expert |
It needs the eth to transfer your eth to weth + some eth for the gas. I could recommend you to get a good amount of eth here: this worked for me... dont get why the send only 0.001 eth on kovan testnet and you can trigger it 3 times in 24h... hope this helps |
you can easily change the amount, but you have to deploy that thing before running. so change line 91 of FlashloanV2.sol to: and adapt your run_flash_loan_v2.py line 18: so the funding of the flashloan and the Flashloan amount are fixed now. now deploy it with: and you should now be able to run: brownie run scripts/run_flash_loan_v2.py --network kovan if it runs you can check the txid and should see we are lending 0.001 and pay them back with the fee |
Thanks!
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: MichiTheBlock ***@***.***>
Sent: Friday, February 11, 2022 3:34:12 AM
To: brownie-mix/aave-flashloan-mix ***@***.***>
Cc: Evan Fraser ***@***.***>; Author ***@***.***>
Subject: Re: [brownie-mix/aave-flashloan-mix] Insufficient funds error message after running get_weth.py (Issue #18)
Nope even though I change the value to 100 in line 19 it gives same error
you can easily change the amount, but you have to deploy that thing before running.
so change line 91 of FlashloanV2.sol to:
uint256 amount = 1000000000000000; //borrow 0.001 eth
and adapt your run_flash_loan_v2.py line 18:
weth.transfer(flashloan, 10000000000000000, {"from": acct})
so the funding of the flashloan and the Flashloan amount are fixed now.
now deploy it with:
brownie run scripts/deployment_v2.py --network kovan
and you should now be able to run:
brownie run scripts/run_flash_loan_v2.py --network kovan
if it runs you can check the txid and should see we are lending 0.001 and pay them back with the fee
Good luck!
—
Reply to this email directly, view it on GitHub<#18 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWP2VUQUKFQDPGWNJO3UW3LU2TCYJANCNFSM5IIDBRFA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
This solution by MichiTheBlock worked for me, but don't understand, are you not allowed to loan theorically unlimited funds using a flashloan?? why you are limited by the funds deposited in the created flashloan contract? |
error: raise ValueError(exc["message"]) from None
ValueError: Insufficient funds. The account you tried to send transaction from does not have enough funds. Required 1000049572000396576 and got: 0.
Does this script fund the wallet or do I have to fund it seperately via Metamask. Please advise.
Thanks
EF
The text was updated successfully, but these errors were encountered: