@vechain/vebetterdao-contracts
Version:
Open-source repository that houses the smart contracts powering the decentralized VeBetterDAO on the VeChain Thor blockchain.
20 lines (19 loc) • 755 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const config_1 = require("@repo/config");
const helpers_1 = require("../../../helpers");
async function main() {
const config = (0, config_1.getConfig)(process.env.NEXT_PUBLIC_APP_ENV);
console.log("Upgrading VOT3 to V2...");
const vot3 = (await (0, helpers_1.upgradeProxy)("VOT3V1", "VOT3", config.vot3ContractAddress, [config.navigatorRegistryContractAddress], {
version: 2,
}));
const version = await vot3.version();
console.log(`New VOT3 version: ${version}`);
if (version !== "2") {
throw new Error(`VOT3 version is not the expected one: ${version}`);
}
console.log("Execution completed");
process.exit(0);
}
main();