openzeppelin-upgrades icon indicating copy to clipboard operation
openzeppelin-upgrades copied to clipboard

Sometimes truffle-upgrades `upgradeProxy` doesn't set the address in the build/contracts/<ContractName>.json

Open xinbenlv opened this issue 3 years ago • 1 comments

Sometimes truffle-upgrades upgradeProxy doesn't set the address in the build/contracts/<ContractName>.json file

Expected

It should set something like

 "networks": {
    "<chainId redacted>": {
      "events": {},
      "links": {},
      "address": "<address redacted>",
      "transactionHash": "<tx hash redacted>"
    }
  },

Actual

It doesn't set the networks information

Why it's bad

In truffle console when I ask

let i = await <Contract Name redacted>.deployed()

it outputs

Uncaught:
Error: <Contract Name redacted> has not been deployed to detected network (network/artifact mismatch)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
...

xinbenlv avatar Jun 03 '22 17:06 xinbenlv

Can you reproduce this consistently? If so, please share the reproduction steps.

frangio avatar Jun 07 '22 02:06 frangio

Closing as Truffle is deprecated.

ericglau avatar Aug 26 '24 20:08 ericglau