Comments (34)
The following setting in brownie-config.yaml worked for me:
settings:
gas_limit: "2074044"
from aave-flashloan-mix.
I did three things and got it successfully working:
- Change the amount
get_weth.py
file to a lower amount:
tx = weth.deposit({"from": acct, "value": 10000000000000000})
- Change the amounts in the
run_flash_loan_v2.py
file
Line 3:
MINIMUM_FLASHLOAN_WETH_BALANCE = 20000000000000
Line 19:
weth.transfer(flashloan, 20000000, {"from": acct})
- Change the hardcoded flash loan amount in
FlashloanV2.sol
Line 104:
uint256 amount = 20000000;
PS: I had around 0.1 Test Ether in my account when I was able to run this.
from aave-flashloan-mix.
no one ever got this resolved? I've got 2 eth and 1 weth in my test account and have funded 1 weth to the contract. No cigar. Anyone?
from aave-flashloan-mix.
I worked on brownie console line by line - but it should also work in that file. Just make sure that you have signed the contract.
from aave-flashloan-mix.
MINIMUM_FLASHLOAN_WETH_BALANCE
I had the same problem. just head over to the file run_flash_loan_v2.py
change the code to
line3:
MINIMUM_FLASHLOAN_WETH_BALANCE = 100000000000000000
line18:
weth.transfer(flashloan, 1000000000000000000, {"from": acct})
then it should work. at least it did on my side.
To be honest there are a few problems one can encounter with this example, which is quite good because you have to put more effort in this. on windows the source commands dont work, on my side the cahnge in the PRIVATE_KEY with 0x... did not work because of an non hex issue response->pasted the private_key in the brownie-config.yaml itself.
but now it went through. Hope you guys can make it.
from aave-flashloan-mix.
You can add the gas in the transaction on run_flash_loan.py
tx = flashloan.flashloan(weth, {"from": acct, "gas_limit": 2074044})
from aave-flashloan-mix.
That sounds about right. Thanks so much. It helped but then I got a VM revert error, so I researched and had to add some more code to that. The result:
tx = flashloan.flashloan(weth, {"from": acct, "gas_limit": 2074044, 'allow_revert': True})
That solved the VM issue and no more Gas Error either.
from aave-flashloan-mix.
I ran into this error @ 9:45:43 in the video. Finally what resolved it was going back to 9:01:06 in the video where the get_weth.py script was ran directly. You should have 0.1 wETH after this step. Make sure you run it on kovan though (I suspect this might be the issue for some people). Once the dust settled - after much double checking every line - I think thats all I changed. Runs fine now - on Kovan anyway.
Note however that it remains an issue for me on mainnet when forking throgh alchemy instead of infura for the node provider that I get the error "Able to launch RPC client, but unable to connect." When I fork through infura my code runs fine on mainnet and kovan. See the video @ 5:59:40 and 6:28:40 for how to configure a network which forks form a different node provider.
from aave-flashloan-mix.
Hi! i've a problem, i used this: tx = flashloan.flashloan(weth, {"from": acct, "gas_limit": 2074044, 'allow_revert': True}) but returns this: RPCRequestError: Accessing
TransactionReceipt.revert_msg
on a reverted transaction requires thedebug_traceTransaction
RPC endpoint, but the node client does not support it or has not made it available. whats this?Hi, did you find any solution for this problem? it seems like the problem is from the node providers side but i dont know how to handle it, Iam not working on aave-flashloan but iam getting the same error in my tx, i think they might have the same solution.
Hi i didnt find a solution for this, im sure that im using right network and the contract has weth, but i'll check it again.
from aave-flashloan-mix.
What would be the best program for a beginner to learn how to code flash loans? Start with HTML, Java and Python?
from aave-flashloan-mix.
Got same problem.
josh@pc ~/Code/Blockchain_Dev/Brownie/aave-flashloan-mix (master) $ brownie run scripts/run_flash_loan_v2.py --network kovan
Brownie v1.17.0 - Python development framework for Ethereum
AaveFlashloanMixProject is the active project.
Running 'scripts/run_flash_loan_v2.py::main'...
Getting Flashloan contract...
Funding Flashloan contract with WETH...
Transaction sent: 0x7d08fa06666dc8a9149422caadd794e156328a8e3e53eb5e926450061cc7d198
Gas price: 1.1 gwei Gas limit: 56934 Nonce: 10
WethInterface.transfer confirmed Block: 27947784 Gas used: 46959 (82.48%)
Executing Flashloan...
File "brownie/_cli/run.py", line 50, in main
return_value, frame = run(
File "brownie/project/scripts.py", line 103, in run
return_value = f_locals[method_name](*args, **kwargs)
File "./scripts/run_flash_loan_v2.py", line 20, in main
tx = flashloan.flashloan(weth, {"from": acct})
File "brownie/network/contract.py", line 1260, in __call__
return fn(*args) # type: ignore
File "brownie/network/contract.py", line 1622, in __call__
return self.transact(*args)
File "brownie/network/contract.py", line 1495, in transact
return tx["from"].transfer(
File "brownie/network/account.py", line 642, in transfer
receipt, exc = self._make_transaction(
File "brownie/network/account.py", line 725, in _make_transaction
raise VirtualMachineError(e) from None
File "brownie/exceptions.py", line 121, in __init__
raise ValueError(str(exc)) from None
ValueError: Gas estimation failed: 'The execution failed due to an exception.'. This transaction will likely revert. If you wish to broadcast, you must set the gas limit manually.
from aave-flashloan-mix.
I get the same error as well
ValueError: Gas estimation failed: 'The execution failed due to an exception.'. This transaction will likely revert. If you wish to broadcast, you must set the gas limit manually.
from aave-flashloan-mix.
I'm getting the same error. Has anyone manage to resolve or?
from aave-flashloan-mix.
make sure you have weth in your account. Probably running the get_weth.py
from aave-flashloan-mix.
I had this same problem. For me it was due to a low balance of ETH/wETH. I changed the MINIMUM_FLASHLOAN_WETH_BALANCE to 0.1 instead of 1 and also the get_weth function i did .1 weth instead of .1eth. Got eth from here: https://faucet.paradigm.xyz/
from aave-flashloan-mix.
I have the same problem, and in my wallet I have enough ETH and WETH. I can't find a solution.
from aave-flashloan-mix.
I had this same problem. For me it was due to a low balance of ETH/wETH. I changed the MINIMUM_FLASHLOAN_WETH_BALANCE to 0.1 instead of 1 and also the get_weth function i did .1 weth instead of .1eth. Got eth from here: https://faucet.paradigm.xyz/
Where did you change the MINIMUM_FLASHLOAN_WETH_BALANCE setting?
from aave-flashloan-mix.
I had this same problem. For me it was due to a low balance of ETH/wETH. I changed the MINIMUM_FLASHLOAN_WETH_BALANCE to 0.1 instead of 1 and also the get_weth function i did .1 weth instead of .1eth. Got eth from here: https://faucet.paradigm.xyz/
Where did you change the MINIMUM_FLASHLOAN_WETH_BALANCE setting?
In /scripts/run_flash_loan_v2.py
from aave-flashloan-mix.
even i am getting this error
Gas estimation failed: 'The execution failed due to an exception.'. This transaction will likely revert. If you wish to broadcast, you must set the gas limit manually.
Even though i have sufficient funds in both Eth and Weth.
Im able to deposit, but not able to borrow.
from aave-flashloan-mix.
Same here
from aave-flashloan-mix.
Same issue here. Have sufficient funds in both eth and weth yet still get gas estimation failed.
from aave-flashloan-mix.
i did manage to execute properly the contract with less than 2ETH on my kovan account and only had to extract one 0 of the lending amount leaving me with a 0.1 WETH loan... [https://kovan.etherscan.io/tx/0x58d527dc367e768bad912fd5a576ced1d8bc6ff88fb6463b0ec9d9acc35cb9bc ]
edit: No logic was implemented in the contract so I had to pay the loan premium fee by only getting the flash loan and giving back the loan.
this dosent solve anything but adjusting this parameters made me understand a little bit more where is the problem, in addition I ran the brownie test
but didn't work.
from aave-flashloan-mix.
i had the same exact issue , i had enough eth/weth in my wallet , and weth in the Smart contract.
Changed all my variables to deposit 0.1 ETH instead. Not sure how to debug this
from aave-flashloan-mix.
I had this same issue. I had it resolved using an approval signature on my account. Try:
weth.approve(acct, '1 ether', {'from':acct})
You can replace 1 ether with any amount using integer values.
from aave-flashloan-mix.
Did you put : weth.approve(acct, '1 ether', {'from':acct})
in weth_get.py?
from aave-flashloan-mix.
Is there a specific reason why it has to be approved? I honestly thought that by approving the Lending pool that was enough, I would have never guessed I had to approve myself to spend my own eth or am I misunderstanding how it works.
from aave-flashloan-mix.
The following setting in brownie-config.yaml worked for me:
settings: gas_limit: "2074044"
This worked for me...what is the reason for that specific gas limit?
from aave-flashloan-mix.
In what line did you put the "settings"? Adding that line definitely did not work for me. Maybe it is just better to test the contract on Ropsten with V1 since it is easier to get a larger amount or eth there? I tried changing the wei and ether amounts in the contracts as well and could only get as far as the last (and most important) step which throws this same "ValueError." Any other suggestions would be appreciated. Thanks for the responses. If I find a proper solution Iยดll post.
from aave-flashloan-mix.
Hi! i've a problem, i used this: tx = flashloan.flashloan(weth, {"from": acct, "gas_limit": 2074044, 'allow_revert': True}) but returns this: RPCRequestError: Accessing TransactionReceipt.revert_msg
on a reverted transaction requires the debug_traceTransaction
RPC endpoint, but the node client does not support it or has not made it available.
whats this?
from aave-flashloan-mix.
Hi! i've a problem, i used this: tx = flashloan.flashloan(weth, {"from": acct, "gas_limit": 2074044, 'allow_revert': True}) but returns this: RPCRequestError: Accessing
TransactionReceipt.revert_msg
on a reverted transaction requires thedebug_traceTransaction
RPC endpoint, but the node client does not support it or has not made it available. whats this?
Hi, did you find any solution for this problem? it seems like the problem is from the node providers side but i dont know how to handle it, Iam not working on aave-flashloan but iam getting the same error in my tx, i think they might have the same solution.
from aave-flashloan-mix.
Hi! i've a problem, i used this: tx = flashloan.flashloan(weth, {"from": acct, "gas_limit": 2074044, 'allow_revert': True}) but returns this: RPCRequestError: Accessing
TransactionReceipt.revert_msg
on a reverted transaction requires thedebug_traceTransaction
RPC endpoint, but the node client does not support it or has not made it available.
whats this?
Hello there, I am encountering the same error and cannot find a way to work around this error. Was anyone able to solve this problem and give a short explanation? Thank you in advance!
from aave-flashloan-mix.
i have run the flashloan contract for the first time it went well but the second time it gives me this error Gas estimation failed: 'execution reverted'. This transaction will likely revert. If you wish to broadcast, you must set the gas limit manually.
and i do have testnet eth and everything
can someone help me please
from aave-flashloan-mix.
please which video are you talking about
from aave-flashloan-mix.
please which video are you talking about
Apologies I presumed that video was what brought people to this thread. I also updated my comment with a link to the video.
from aave-flashloan-mix.
Related Issues (20)
- Unable to expand environment variable in host setting: 'https://kovan.infura.io/v3/$WEB3_INFURA_PROJECT_ID' HOT 3
- Gas estimation failed: If you wish to broadcast, you must set the gas limit manually. HOT 1
- 401 Client Error: Unauthorized for url: https://kovan
- VirtualMachineError: revert HOT 2
- Will this rune on Polygon with some modification HOT 1
- ConnectionError: Status 404 when retrieving repo brownie-mix/aave-flash information from GHAPI: 'Not Found' HOT 1
- Insufficient funds error message after running get_weth.py HOT 9
- Error when I run the get WETH command: brownie run scripts/get_weth.py --network kovan HOT 3
- Flash
- can't run brownie tests HOT 2
- New Brownie Mix for Gitlab
- flashloan.flashloan() got an unexpected argument 'block_identifier'
- How to withdraw from the smart contract to the wallet HOT 11
- Increasing the loan amount
- "ConnectionError" with "api-kovan.etherscan.io". Why? pls!
- private key must be exactly 32 bytes long
- Gas fees issue HOT 2
- aave v3 flash loan HOT 2
- It cannot be tested as the kovan network shutted down after the merge HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aave-flashloan-mix.