4

I have been involved in the chainlink bootcamp and trying to finishing the final 'Exercise 3: Putting it all together'.

However, I am stuck running:

brownie run scripts/price_exercise_scripts/01_deploy_price_exercise.py --network kovan

ContractNotFound: No contract deployed at 0xF4030086511a5bEEa4966F8cA5B36dbC97BeE88c

Printed contract_type._name is a mock address returned from `MockV3Aggregator which also doesn't make sense, why the code calls this logic.

def get_contract(contract_name):

contract_type = contract_to_mock[contract_name]
if network.show_active() in NON_FORKED_LOCAL_BLOCKCHAIN_ENVIRONMENTS:
    if len(contract_type) <= 0:
        deploy_mocks()
    contract = contract_type[-1]
else:
    try:
        contract_address = config["networks"][network.show_active()][contract_name]

        contract = Contract.from_abi(
            contract_type._name, contract_address, contract_type.abi
        )
    except KeyError:
        print(
            f"{network.show_active()} address not found, perhaps you should add it to 
       the config or deploy mocks?")
        print(
            f"brownie run scripts/deploy_mocks.py --network {network.show_active()}"
        )
return contract

I am struggling to understand this error message, should this command not be deploying contracts? I.e they should already already exist on the kovan network?

Any insights welcome!

Progman
  • 16,827
  • 6
  • 33
  • 48
godhar
  • 1,128
  • 1
  • 14
  • 34

3 Answers3

6

Because address of ganache is reset(by close and open again) and brownie use its own files which is gone Remove files and directory in build/deployments solve for me.

joe
  • 8,383
  • 13
  • 61
  • 109
  • 1
    I didn't want to completely remove all files in `build/deployments` since map.json tracks deployments to all networks (and I had some dpeloyments to testnest). Therefore, I removed contract addresses in map.json for my previous ganache session and removed files from the ganache network id folder. `build/deployments/5777` in my case. – gavinest Feb 04 '22 at 19:26
3

Problem - I was using the ethereum mainnet address instead of the correct kovan network address for btc / usd price.

Changing the btc_usd_price_feed value to 0x6135b13325bfC4B00278B4abC5e20bbce2D6580e in the config.yml fixed this issue for me.

price feed addresses

godhar
  • 1,128
  • 1
  • 14
  • 34
0

Delete .openzeppelin/unknown-YOUR-NetworkId.json !!!

This happens especially at deploying upgradeable contracts into Parachain EVM.

Russo
  • 2,186
  • 2
  • 26
  • 42