Hello, I added OpenZeppelin to my Truffle project. When I deploy to a Quorum network with ‘truffle deploy’ it works just fine, but if I deploy using ‘oz deploy’ then I get an error saying “Could not connect to your Ethereum client…”. The configuration file is the same as when I deployed via Truffle. Anyone has any idea what the issue could be? Thanks in advance Let me know if I should provide some other information.
Hi @Alex-dev,
Are you deploying a regular contract?
If you are wanting to deploy an upgradeable contract I recommend using OpenZeppelin Upgrades Plugins for Truffle: https://docs.openzeppelin.com/upgrades-plugins/1.x/.
What version of node/npm and operating system are you using?
I assume that you are running a local Quorum network?
Hello @abcoathup and thank you for the reply,
I am actually trying to deploy to Azure’s Quorum service. I wasn’t able to set up a private Quorum (on Windows) so I haven’t been able to try local deployment on Quorum.
I am using the following versions:
- Truffle - 5.1.44
- Node - 12.18.2
- npm - 6.14.5
- OpenZeppelin - 2.8.2
I am trying to deploy an upgradeable contract. I have not yet tried to use the plugin you mentioned because I was able to get an upgradeable contract to work on my private ethereum blockchain and thought; if this works, surely it should work on Quorum!
I did this by running “npx oz deploy…” and was later able to run “npx oz upgrade …” and it all worked fine (on my local ethereum blockchain).
As I mentioned in my original post, I was able to deploy to the Quorum network using “truffle deploy” but “npx oz deploy” gives me an error - despite both of them using the same truffle-config.js file. Please see code snippet below for the content of the config file.
module.exports = {
networks: {
quorum: {
url: <Azure https connection>,
gasPrice: 0,
gas: 0,
network_id: "*",
type : "quorum"
}
}
}
Hi @Alex-dev,
Truffle has support for Quorum and in the networks configuration includes:
type: "quorum" // needed for Truffle to support Quorum
I have in the past deployed to a local Quorum using OpenZeppelin CLI but private transactions and private contracts are not supported.
Given that Truffle has Quorum support I would suggest trying the OpenZeppelin Upgrades Plugins, though I assume this will only support a public contract.
As an aside, If you are a Windows user I recommend using Windows Subsystem for Linux. I use WSL2 on Windows 10. You could have a look at the following: Solidity Smart Contract development on Windows
A post was split to a new topic: Truffle Upgrades: Error: Artifacts are from different compiler runs
A post was split to a new topic: Is it possible to deploy upgradeable contracts to Quorum?