目前在练习 3 的 chainlink 训练营:部署到本地区块链。
使用 ganache 时,如果我在运行后有一个新的 chainlink-mix 文件夹
brownie run scripts/price_feed_scripts/01_deploy_price_consumer_v3.py
一切都编译得很好。但是当我关闭 ganache(ctrl+C) 并打开另一个 ganache 并运行相同的命令时,我得到了大量的错误。
如果我删除 chainlink mix 并获得一个新的克隆,我可以解决这个问题。我想知道如何解决这个问题,而无需每次都获得一个新文件夹。
编辑:我01_deploy_price_consumer
再次运行该命令以查看是否可以将 eth 的默认 getLatestPrice 更改为 3000 而不是 2000
C:\Users\N\new\chainlink-mix>brownie run scripts/price_feed_scripts/01_deploy_price_consumer_v3.py
INFO: Could not find files for the given pattern(s).
Brownie v1.16.3 - Python development framework for Ethereum
ChainlinkMixProject is the active project.
File "C:\Users\N\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\_cli\__main__.py", line 64, in main
importlib.import_module(f"brownie._cli.{cmd}").main()
File "C:\Users\N\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\_cli\run.py", line 43, in main
network.connect(CONFIG.argv["network"])
File "C:\Users\N\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\network\main.py", line 55, in connect
p._load_deployments()
File "C:\Users\N\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\project\main.py", line 357, in _load_deployments
contract = ProjectContract(self, build, build_json.stem)
File "C:\Users\N\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\network\contract.py", line 1292, in __init__
_DeployedContractBase.__init__(self, address, owner, tx)
File "C:\Users\N\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\network\contract.py", line 758, in __init__
raise ContractNotFound(f"No contract deployed at {address}")
ContractNotFound: No contract deployed at 0xa1d97e44c6Ac5327DEa2deCAb5f9E1085b8Bcf38