hardhat icon indicating copy to clipboard operation
hardhat copied to clipboard

Verification does not work in ignition when deploying external artifacts

Open sim31 opened this issue 6 months ago • 1 comments

Version of Hardhat

2.22.8

What happened?

I'm using ignition to deploy contracts from external repository by specifying artifacts to deploy as described in the docs.

Getting this error when running `npx hardhat ignition verify...:

Error: ENOENT: no such file or directory, open '/home/tadas/sources/sim31/frapps/impl/ordao/sc-deployment/ignition/deployments/op-sepolia-1/artifacts/Orec#Orec.dbg.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/tadas/sources/sim31/frapps/impl/ordao/sc-deployment/ignition/deployments/op-sepolia-1/artifacts/Orec#Orec.dbg.json'
}

When I place the expected debug file, the error goes away.

Then another error appears:

Error: ENOENT: no such file or directory, open '/home/tadas/sources/sim31/frapps/impl/ordao/sc-deployment/ignition/deployments/build-info/2bf29f558aacadc638c9589b99d7fcc1.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/tadas/sources/sim31/frapps/impl/ordao/sc-deployment/ignition/deployments/build-info/2bf29f558aacadc638c9589b99d7fcc1.json'
}

Again I solve this by copying expected build-info files to the expected place. Then finally verification works.

Would be nice if ignition would either handle this automatically (although I understand that the user would then have to specify these debug and build-info files somehow) or there would be some warnings in the docs about these extra manual steps.

Minimal reproduction steps

  1. Create sample hardhat project 1, compile it;
  2. Create hardhat project 2, create ignition module that tries to deploy artifact from project 1 (as described here);
  3. Use ignition to deploy to testnet (I was deploying to OP Sepolia)
  4. Try using ignition to verify testnet deployment

Search terms

ignition, verification

sim31 avatar Aug 21 '24 07:08 sim31