Last Updated on November 16, 2024 by sandeeppote
At time when the Ganache tool is re-opened all the Transactions and Constracts are reset. Whilst deploying contract you might see the error –
ContractNotFound: No contract deployed at {address}
PS C:\Projects\Blockchain\Solidity\brownie_fundme> brownie run .\scripts\deploy.py --network ganache-local
INFO: Could not find files for the given pattern(s).
Brownie v1.19.0 - Python development framework for Ethereum
BrownieFundmeProject is the active project.
File "C:\Users\sandeep\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\_cli\__main__.py", line 64, in main
importlib.import_module(f"brownie._cli.{cmd}").main()
File "C:\Users\sandeep\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\_cli\run.py", line 45, in main
network.connect(CONFIG.argv["network"])
File "C:\Users\sandeep\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\main.py", line 55, in connect
p._load_deployments()
File "C:\Users\sandeep\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\main.py", line 370, in _load_deployments
contract = ProjectContract(self, build, build_json.stem)
File "C:\Users\sandeep\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\contract.py", line 1305, in __init__
_DeployedContractBase.__init__(self, address, owner, tx)
File "C:\Users\sandeep\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\contract.py", line 708, in __init__
raise ContractNotFound(f"No contract deployed at {address}")
ContractNotFound: No contract deployed at 0x7465E5ca8aFeFba39eFD83bd056ACAafa3d16646
Solution-
Delete all the files and folders in Deployment folder as closing the Ganache tool will reset contracts etc. the deployment folder has references to old contract.
Reference-
https://stackoverflow.com/questions/68460396/contractnotfound-no-contract-deployed-at