Skip to content

Local testing fails with KeyError: 'development' #562

Description

@trentmc

Background / motivation

When I follow the usual flow to (a) get barge going, then (b) run any test on df-py, in (b) I immediately get KeyError: 'development'.

Digging further, it seems that barge is the culprit, not df-py. I'm putting here in df-py because it's blocking me in df-py work.

By default, barge is supposed to...

  1. compile contracts
  2. create address.json in ~/.ocean/ocean-contracts/artifacts/
  3. deploy Ocean contracts to ganache
  4. update address.json with info from (3), with top-level key "development"

It does (1) and (2), good. But not (3) and (4). Even if I wait 15+ minutes.

It's easy to inspect: just run barge, and see that it's missing "development" in address.json.

Here's my output, from when I run barge via ./start_ocean.sh --with-thegraph 1>out.txt 2>&1 &).

Here's a log from a second run - out2.txt. I'd done all the cleaning, including rebooting my laptop.

Here's some interesting output in both logs.

  • Note that right after "Deploying OceanToken" it says "NomicLabsHardhatPluginError: You are trying to create a contract factory from an artifact, but you have not passed a valid artifact parameter".
  • Also note what's missing: if it had deployed the addresses, it would have outptu them to the log (iirc)
ocean-contracts_1  | deploy contracts is true
...
ocean-contracts_1  | Using RPC: http://172.15.0.3:8545
ocean-contracts_1  | Using chain 8996
ocean-contracts_1  | Use existing addresses:{}
ocean-contracts_1  | Deploying OceanToken
ocean-contracts_1  | NomicLabsHardhatPluginError: You are trying to create a contract factory from an artifact, but you have not passed a valid artifact parameter.
ocean-contracts_1  |     at getContractFactoryFromArtifact (/ocean-contracts/node_modules/@nomiclabs/hardhat-ethers/internal/helpers.js:73:15)
ocean-contracts_1  |     at getContractFactory (/ocean-contracts/node_modules/@nomiclabs/hardhat-ethers/internal/helpers.js:56:16)
ocean-contracts_1  |     at async main (/ocean-contracts/scripts/deploy-contracts.js:237:19)
subgraph_1         | Using custom ADDRESS_FILE instead of ocean-contracts npm dep

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions