Giter VIP home page Giter VIP logo

Comments (11)

Seek4samurai avatar Seek4samurai commented on May 17, 2024 5

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.

mayckonx avatar mayckonx commented on May 17, 2024 4

To fix this issue, do the following:

  1. Go to your deploy.py file and check the price_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"),
    )
  1. 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.

DaveWKrupa avatar DaveWKrupa commented on May 17, 2024 4

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.

PatrickAlphaC avatar PatrickAlphaC commented on May 17, 2024

hmm... two thoughts.

  1. Could you add all the contract and script code?
  2. Could you see if this works with python 3.9?

from full-blockchain-solidity-course-py.

tibasoliver avatar tibasoliver commented on May 17, 2024

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.

Cassain2019 avatar Cassain2019 commented on May 17, 2024

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.

casafurix avatar casafurix commented on May 17, 2024

To fix this issue, do the following:

  1. Go to your deploy.py file and check the price_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"),
    )
  1. 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.

dinpran avatar dinpran commented on May 17, 2024

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.

dinpran avatar dinpran commented on May 17, 2024

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.

tubarao312 avatar tubarao312 commented on May 17, 2024

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.

prongs394 avatar prongs394 commented on May 17, 2024

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!

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)

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.