HardHat upgradeable deploy script using @nomiclabs/hardhat-truffle5 plugin

I’m looking to deploy an upgradeable contract but my environment uses @nomiclabs/hardhat-truffle5. The problem with this approach, is that the deployment under hardhat is by using a custom made script where I don’t have access to the deployer instance present in Truffle’s migration phase.

Can somebody throw me a hint about how to manually deploy an upgradeable contract by using basic Truffle’s require and a well configured web3 instance? maybe using @openzeppelin/upgrades-core, but I couldn’t find any example.


1 Like

Hi @diegoll,

Welcome to the community :wave:

Can you deploy using just a Hardhat script?

1 Like

Hi @abcoathup. Thanks for your answer.
Yes, that’s actually what I’m doing, but the example there assumes (correct me if I’m wrong) that I’m using ethers.js+waffle and, in my case, I’m using web3.js+truffle.
I was able to use, within the script, the require function from Truffle and the instrumented web3 instance, my problem is that I don’t have access to the deployer object so I cannot use the @openzeppelin/truffle-upgrades plugin properly