/vnftx

VNFTx upgradable

Primary LanguageSolidity

npm install

npm run compile

npm run deploy

npm run console

To Deploy

  1. Run npm run chain
  2. run npm run deploy
  3. Get the contract address and paste it in proxyAddress on ./scripts/prepare-upgrade.js and ./scripts/upgrade.js
  4. run npm run prepare && npm run upgrade to deploy the second "upgrade" contract.

To play with it after deploy

  1. run npm run console
  2. const VNFTxV2 = await ethers.getContractFactory("VNFTxV2");
  3. const vnft = await VNFTxV2.attach(proxyAddress) > This is the new contract that should hold the old contract store.
  4. now vnft should have old storage with new functions.