Skip contract validation completly

I’m migrating from a cli project. I want to use the library to upgrade a proxy but skipping completely the source code validation, in the cli version there was a force option to do that.
I have my binaries ready to do the upgrade, but without the source I get: “Error: The requested contract was not found. Make sure the source code is available for compilation”.

:computer: Environment
I’m using the Truffle plugin example.

:1234: Code to reproduce
const Something = artifacts.require(‘Something’);
const instance = await deployProxy(Something, , { deployer });

1 Like

It seems that you are trying to deploy a proxy. Something should be the artifact of your contract. You will need the source to deploy compile and deploy it.

After deployment, that proxy would be upgradeable if you respected the guidelines.

I have the truffle artifact (build/contracts/Something.json), but I don’t want to recompile it, just to deploy the proxy and make my artifact the implementation.

Is your artifact an upgradebale contract already?

I want to be able to start from scratch doing the deployment of the proxy and the implementation or just upgrade the implementation.

I have made a package that will set you up quickly with an upgradeable contract template.

check it out

Also a quick article about it.

Thank you for your time an patience.

We have multiple projects in which we compile our contracts and then package them with npm; the same way AdminUpgradeabilityProxy is packed.
We don’t want to distribute the source code right now, so in our npm packages we only have the truffle “binary” artifacts (build/contract/*.json) and no source code (aka no contracts directory is packed).

We have a separate project that depends on the binaries and orchestrates the deployment using truffle and a library that calls openzeppelin-cli programatically (basically the same idea as the new upgrade library). In our calls we use the force option because we know that our contracts are upgradeable and we don’t want them to be verified (there are no sources to verify anyway).

We want to use the new lib, basically the deployProxy method but with an option to skip validation.
I don’t know if there is an option to do that or some plan to add it to the code.

1 Like

Hi @adjicf,

Welcome to the community :wave:

Does the following meet your needs?

Or are you trying to deploy a proxy for an already deployed implementation?