Comments (11)
Just remember whenever you try to redeploy the contract at the first place. Remove 1337 folder and also removing it's entry in map.json in build/deployments/map.json or even better remove the whole build folder and then try redeploying it over again, with brownie run scripts/deploy.py --network ganache-local
once done this means your contract has been deployed over your ganache-local blockchain and after this you can run brownie run scripts/fund_and_withdraw.py --network ganache-local
over your ganache-local blockchain.
from full-blockchain-solidity-course-py.
To fix this issue, do the following:
- Go to your
deploy.py
file and check theprice_feed_address
variable. Probably you forgot to use it here:
fund_me = FundMe.deploy(
"0x9326BFA02ADD2366b30bacB125260Af641031331",
{"from": account},
publish_source=config["networks"][network.show_active()].get("verify"),
)
- Replace the first parameter on the deploy function with the
price_feed_address
variable.
That's it. Hope I could help you.
from full-blockchain-solidity-course-py.
I also ran into this problem even though my FunMe.deploy was passing in the value from a variable. But in my case the problem was that I had deployed a MockV3Aggregator, then I closed Ganache. When I reopened Ganache it no longer had the MockV3Aggregator contract, but Brownie was still referencing the contract I made previously. Thus using an address that no longer existed.
Need to clean out the 1337 folder in VS Code when reopening ganache.
from full-blockchain-solidity-course-py.
hmm... two thoughts.
- Could you add all the contract and script code?
- Could you see if this works with python 3.9?
from full-blockchain-solidity-course-py.
I had the same problem, however in my code there was harcoded rinkeby contract . I removed from functions e everything went well. Try do the same if you find something similar in FundMe.sol.
from full-blockchain-solidity-course-py.
Dear Everyone !
I am also facing the same issue, and tried a lot to find the solution but no success yet.
Running 'scripts\fund_and_withdraw.py::main'...
File "C:\Users\Kashif\AppData\Roaming\Python\Python310\site-packages\brownie_cli\run.py", line 49, in main
return_value, frame = run(
File "C:\Users\Kashif\AppData\Roaming\Python\Python310\site-packages\brownie\project\scripts.py", line 103, in run
return_value = f_locals[method_name](*args, **kwargs)
File ".\scripts\fund_and_withdraw.py", line 22, in main
fund()
File ".\scripts\fund_and_withdraw.py", line 8, in fund
entrance_fee = fund_me.getEntranceFee()
File "C:\Users\Kashif\AppData\Roaming\Python\Python310\site-packages\brownie\network\multicall.py", line 115, in _proxy_call
result = ContractCall.call(*args, **kwargs) # type: ignore
File "C:\Users\Kashif\AppData\Roaming\Python\Python310\site-packages\brownie\network\contract.py", line 1729, in call
return self.call(*args, block_identifier=block_identifier)
File "C:\Users\Kashif\AppData\Roaming\Python\Python310\site-packages\brownie\network\contract.py", line 1533, in call
raise VirtualMachineError(e) from None
VirtualMachineError: revert
from full-blockchain-solidity-course-py.
To fix this issue, do the following:
- Go to your
deploy.py
file and check theprice_feed_address
variable. Probably you forgot to use it here:fund_me = FundMe.deploy( "0x9326BFA02ADD2366b30bacB125260Af641031331", {"from": account}, publish_source=config["networks"][network.show_active()].get("verify"), )
- Replace the first parameter on the deploy function with the
price_feed_address
variable.That's it. Hope I could help you.
dude, you're freaking amazinggg!! thanks a lottttt
from full-blockchain-solidity-course-py.
i still am not able to solve this error can anyone fix this i use price_feed_address only
from full-blockchain-solidity-course-py.
I also ran into this problem even though my FunMe.deploy was passing in the value from a variable. But in my case the problem was that I had deployed a MockV3Aggregator, then I closed Ganache. When I reopened Ganache it no longer had the MockV3Aggregator contract, but Brownie was still referencing the contract I made previously. Thus using an address that no longer existed.
Need to clean out the 1337 folder in VS Code when reopening ganache.
can you please tell me how to solve this problem i also closed ganache
from full-blockchain-solidity-course-py.
Dear Everyone ! I am also facing the same issue, and tried a lot to find the solution but no success yet.
Running 'scripts\fund_and_withdraw.py::main'... File "C:\Users\Kashif\AppData\Roaming\Python\Python310\site-packages\brownie_cli\run.py", line 49, in main return_value, frame = run( File "C:\Users\Kashif\AppData\Roaming\Python\Python310\site-packages\brownie\project\scripts.py", line 103, in run return_value = f_locals[method_name](*args, **kwargs) File ".\scripts\fund_and_withdraw.py", line 22, in main fund() File ".\scripts\fund_and_withdraw.py", line 8, in fund entrance_fee = fund_me.getEntranceFee() File "C:\Users\Kashif\AppData\Roaming\Python\Python310\site-packages\brownie\network\multicall.py", line 115, in _proxy_call result = ContractCall.call(*args, **kwargs) # type: ignore File "C:\Users\Kashif\AppData\Roaming\Python\Python310\site-packages\brownie\network\contract.py", line 1729, in call return self.call(*args, block_identifier=block_identifier) File "C:\Users\Kashif\AppData\Roaming\Python\Python310\site-packages\brownie\network\contract.py", line 1533, in call raise VirtualMachineError(e) from None VirtualMachineError: revert
Hey, how did you end up fixing this issue? Thanks!
from full-blockchain-solidity-course-py.
Dear Everyone ! I am also facing the same issue, and tried a lot to find the solution but no success yet.
Running 'scripts\fund_and_withdraw.py::main'... File "C:\Users\Kashif\AppData\Roaming\Python\Python310\site-packages\brownie_cli\run.py", line 49, in main return_value, frame = run( File "C:\Users\Kashif\AppData\Roaming\Python\Python310\site-packages\brownie\project\scripts.py", line 103, in run return_value = f_locals[method_name](*args, **kwargs) File ".\scripts\fund_and_withdraw.py", line 22, in main fund() File ".\scripts\fund_and_withdraw.py", line 8, in fund entrance_fee = fund_me.getEntranceFee() File "C:\Users\Kashif\AppData\Roaming\Python\Python310\site-packages\brownie\network\multicall.py", line 115, in _proxy_call result = ContractCall.call(*args, **kwargs) # type: ignore File "C:\Users\Kashif\AppData\Roaming\Python\Python310\site-packages\brownie\network\contract.py", line 1729, in call return self.call(*args, block_identifier=block_identifier) File "C:\Users\Kashif\AppData\Roaming\Python\Python310\site-packages\brownie\network\contract.py", line 1533, in call raise VirtualMachineError(e) from None VirtualMachineError: revertHey, how did you end up fixing this issue? Thanks!
hi. i have this problem as well.
i can deploy the contract but when i call the getEntranceFee function i get the same "VirtualMachineError: revert" error as above.
when deploying the contract i am using the price_feed_address.
from full-blockchain-solidity-course-py.
Related Issues (20)
- Lesson 4 - No puedo desplegar la transaccion HOT 9
- Missing Store option on left Panel in simplestorage contract HOT 1
- Lesson 7 : Please help my end lottery function keeps getting reverted, HOT 1
- web3.py - AttributeError: 'Eth' object has no attribute 'getTransactionCount' HOT 1
- LESSON 4 error saying"solcx.exceptions.SolcNotInstalled: solc 0.6.0 has not been installed. HOT 1
- AttributeError: Contract 'FundMe' object has no attribute 'getEntranceFee' HOT 3
- Cant get to compile HOT 2
- i tried verify contract on sepolia testnet but it show error HOT 7
- Type Error due to environment variable and ganache HOT 1
- Lesson3 call to FundMe.getVersion error HOT 1
- Warning! Error encountered during contract execution [invalid opcode: PUSH0
- code size to deposit exceeds maximum code size HOT 1
- Could not find files for the given pattern(s)
- This error originates from a subprocess, and is likely not a problem with pip. HOT 1
- .call() function not working so I 'm not able to receive any data
- Lesson 5: brownie simple storage account address error
- Lesson 5: Error in Installing Brownie HOT 1
- Lesson 7 "test_can_end_lottery" error HOT 1
- Blockchain HOT 1
- Lesson 6 : Brownie verify
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 full-blockchain-solidity-course-py.