question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Validations fail when importing artifact from external package

See original GitHub issue

Description

When I import a Hardhat artifact from an external package, the OpenZeppelin upgrades plugin does not make the deployment because it fails to validate the cache. But there is no cache to validate because I am not compiling that contract locally.

The solution would be to let us disable the cache validation via a flag, so that we can use @openzeppelin/hardhat-upgrades with external Hardhat artifacts.

Error

ValidationsCacheNotFound [Error]: Validations cache not found. Recompile with `hardhat compile --force`
    at Object.readValidations (/Users/paulrberg/workspace/hifi/deployers/node_modules/@openzeppelin/hardhat-upgrades/src/utils/validations.ts:42:13)
    at Object.deployImpl (/Users/paulrberg/workspace/hifi/deployers/node_modules/@openzeppelin/hardhat-upgrades/src/utils/deploy-impl.ts:27:23)
    at Proxy.deployProxy (/Users/paulrberg/workspace/hifi/deployers/node_modules/@openzeppelin/hardhat-upgrades/src/deploy-proxy.ts:57:18)

Environment

See my deployer script. The Hardhat artifact is imported from an external package @hifi/protocol.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
frangiocommented, Aug 10, 2021

In theory it would work, but would be too difficult given the current architecture of the project. I’ll take note as something that we’ll probably need to solve in the future.

0reactions
paulrbergcommented, Aug 10, 2021

An idea: what if we point the OZ Hardhat plugin to the source code of the contract in an npm package, and also provide a Solidity settings object as defined by Hardhat? Would this, in theory, be a good enough workaround for the lack of the cache folder?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maven importer does not find dependency version declared in ...
I have a multi-module maven project that I am trying to import: ... INFO - #org.jetbrains.idea.maven - [INFO] Validation error: 2021-04-05 18:19:56,369 ...
Read more >
Resolve validation errors - Azure DevOps Services
If you've received a validation error when you tried import process, you'll need to resolve the error before retrying the import.
Read more >
Failed to download artifact to retrieval agent
Import the certificate into the agents java keystore. You can do this by opening a command prompt on the artifact retrieval agent machine...
Read more >
Artifact not found during install task with Gradle, Spring Boot ...
If an artifact isn't in Maven Central, or access to Maven Central is restricted, the validation will fail. – Andy Wilkinson. Apr 14,...
Read more >
Error validating schema with Premature end of file using APIKIT
validate (ParserWrapperV2.java:73) ~[mule-module-apikit-3.9.5-20220127.jar:?] at org.mule.module.apikit.ParserService.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found