// migrations/NN_deploy_upgradeable_box.js
const { deployProxy } = require('@openzeppelin/truffle-upgrades');
const Product = artifacts.require('Product');
module.exports = async function (deployer) {
const instance = await deployProxy(Product);
console.log('Deployed', instance.address);
};
I used this code deploy proxy successful on kovan,but on mainnet it can’t.Can u give me some help ,tks
1 Like
Hi @pageone,
What is the error that you get when deploying on mainnet? Can you share the output from your migration?
pageone
3
No error message. It deployed a normal contract ,not Upgrades.
1 Like
Hi @pageone,
deployProxy
will deploy
- implementation contract
- ProxyAdmin contract
- proxy contract
https://docs.openzeppelin.com/upgrades-plugins/1.x/#how-plugins-work
Truffle will also deploy a Migrations contract.
Can you advise which contracts were deployed and the output of your migrations script?