This is the run script for deploying the upgraded V2 contract to an environment.
This should be run after the Deploy.md run script.
From the proxy owner:
- [] remove users from the allow list (if needed)
- [] verify that purchasing is disabled
- [] sweep funds to the owner
- [] ensure the correct proxy environment variable is correctly set
npx hardhat run --network mainnet scripts/randomConsumer.ethereum.deploy.ts
- [] set the random consumer environment variable in the .env file
- [] fund the random consumer with LINK
- [] ensure the random consumer environment variable is correctly set
This will deploy the contract but will not try to associate it with the proxy
npx hardhat run --network mainnet scripts/box.upgrade.v2.prepare.ts
- [] make note of the V2 Implementation Address, we'll need it later
npx hardhat verify --contract contracts/random/RandomConsumer.sol:RandomConsumer --network mainnet --constructor-args scripts/randomConsumer.ethereum.arguments.ts <CONTRACT_ADDRESS>
npx hardhat verify --contract contracts/token/RarePizzasBoxV2.sol:RarePizzasBoxV2 --network mainnet 0x56E13df561A0FA817262653208954B64DC4d920c
- [] ensure the random consumer environment variable is correctly set
- [] ensure the proxy admin environment variable is correctly set
npx hardhat run --network mainnet scripts/box.upgrade.v2.transfer.ownable.ts
Note that currently VRF is in preview on mainnet so the random consumer contract address may need to be put on an allow list.
From the proxy owner:
- [] send some Link Tokens to the Random Consumer address to cover fees (varies by network)
- [] call
upgradeTo(newImplementationAddress)
on the proxy with the new implementation instance address -
- [] alternatively, use the Open Zepplin web app (available in gnosis)
- [] call
setVRFConsumer(randomConsumerAddress)
on the proxy with the random consumer address - [] add one developer to the allow list
- [] developer test the purchase function
From the proxy owner:
- [] update the bitcoin price (if needed)
- [] seed the allow list (if needed)
- [] set the start timestamp (if needed)