-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot Read script on ganache development network #20
Comments
Thanks for making this! Yes... I'll have to make some updates to this mix to better handle self-run ganache chains... |
Hi Patrick. I was having the same problems as Nick. I randomly trashed the build folder and all was good again. It seems to be a repeatable 'fix' too. I have no idea why, or if that helps. Just thought I'd speak up! Cheers |
Hi Patrick |
thanks for raising @itsencrypted . Can you create a StackOverflow post, posting all the relevant details and steps you took after cloning the repo? https://stackoverflow.com/questions/ask?tags=chainlink |
I think this might not be strictly a ganache situation. I ran into this with rinkeby as well and trashing build/ and redoing brownie compile lets me run a test successfully (per @AdiF1 solution). I guess just like work, sometimes you just have to trash your build dir and things magically work again when you recompile. |
Hmm... Usually when stuff "magically" starts working in software that's when I start to sweat ahah. If anyone would like to investigate that would be greatly appreciated! |
I am seeing that my local testing with ganche-cli is causing some issues connecting to the same network.
Repro steps:
ganache
.brownie networks add Ethereum ganache host=http://localhost:8545 chainid=1337
.brownie run scripts/price_feed_scripts/01_deploy_price_consumer_v3.py
. Here I was having an issue$ brownie run scripts/price_feed_scripts/01_deploy_price_consumer_v3.py
Brownie v1.15.1 - Python development framework for Ethereum
ChainlinkMixProject is the active project.
File "brownie/_cli/main.py", line 64, in main
importlib.import_module(f"brownie._cli.{cmd}").main()
File "brownie/_cli/run.py", line 43, in main
network.connect(CONFIG.argv["network"])
File "brownie/network/main.py", line 55, in connect
p._load_deployments()
File "brownie/project/main.py", line 357, in _load_deployments
contract = ProjectContract(self, build, build_json.stem)
File "brownie/network/contract.py", line 1291, in init
_DeployedContractBase.init(self, address, owner, tx)
File "brownie/network/contract.py", line 757, in init
raise ContractNotFound(f"No contract deployed at {address}")
ContractNotFound: No contract deployed at 0xB47a7bDF2C0B546AE73C4352c70BC68B0d479048
brownie run scripts/price_feed_scripts/01_deploy_price_consumer_v3.py --network development
.brownie run scripts/price_feed_scripts/02_read_price_feed.py
$ brownie run scripts/price_feed_scripts/02_read_price_feed.py
Brownie v1.15.1 - Python development framework for Ethereum
ChainlinkMixProject is the active project.
File "brownie/_cli/main.py", line 64, in main
importlib.import_module(f"brownie._cli.{cmd}").main()
File "brownie/_cli/run.py", line 43, in main
network.connect(CONFIG.argv["network"])
File "brownie/network/main.py", line 55, in connect
p._load_deployments()
File "brownie/project/main.py", line 357, in _load_deployments
contract = ProjectContract(self, build, build_json.stem)
File "brownie/network/contract.py", line 1291, in init
_DeployedContractBase.init(self, address, owner, tx)
File "brownie/network/contract.py", line 757, in init
raise ContractNotFound(f"No contract deployed at {address}")
ContractNotFound: No contract deployed at 0xB47a7bDF2C0B546AE73C4352c70BC68B0d479048
$ brownie run scripts/price_feed_scripts/02_read_price_feed.py --network development
Brownie v1.15.1 - Python development framework for Ethereum
ChainlinkMixProject is the active project.
/Users/nicklasb/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/brownie/network/main.py:44: BrownieEnvironmentWarning: Development network has a block height of 30
warnings.warn(
Attached to local RPC client listening at '127.0.0.1:8545'...
Running 'scripts/price_feed_scripts/02_read_price_feed.py::main'...
File "brownie/_cli/run.py", line 49, 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/price_feed_scripts/02_read_price_feed.py", line 6, in main
price_feed_contract = PriceFeedConsumer[-1]
File "brownie/network/contract.py", line 160, in getitem
return self._contracts[i]
IndexError: list index out of range
The text was updated successfully, but these errors were encountered: