I'm trying to use this deploy script for an upgradable contract
async function main () {
const Box = await ethers.getContractFactory('NFT');
console.log('Deploying Box...');
const NAME = "TestName"
const SYMBOL = "Test"
const COST = ethers.utils.parseUnits("0.2", "ether") // 1 ETH
const box = await upgrades.deployProxy(Box, [42], { initializer: 'store' });
await box.deployed();
console.log('Box deployed to:', box.address);
}
main();
Initially the contract had a constructor that accepted 3 parameters on deployment; NAME, SYMBOL and COST
The contracts constructor looks like this
contract NFT is ERC721URIStorage {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
address public owner;
uint256 public cost;
constructor(
string memory _name,
string memory _symbol,
uint256 _cost
) ERC721(_name, _symbol) {
owner = msg.sender;
cost = _cost;
}
...
My question is how do I pass those parameters to an upgradable contract. From what I'm gathering there can't even be a constructor in an upgradable contract, although I could be wrong. Any tips would be appreciated