diff --git a/helpers/contracts-helpers.ts b/helpers/contracts-helpers.ts index 1e9e26c9..c31693a0 100644 --- a/helpers/contracts-helpers.ts +++ b/helpers/contracts-helpers.ts @@ -1309,6 +1309,8 @@ export const linkLibraries = ( if (addr === undefined) { continue; } + console.log("****linkLibraries*****libName:", libName); + console.log("****linkLibraries*****addr:", addr); for (const fixup of fixups) { bytecode = diff --git a/helpers/hardhat-constants.ts b/helpers/hardhat-constants.ts index b6a1fb2b..ef66a0b0 100644 --- a/helpers/hardhat-constants.ts +++ b/helpers/hardhat-constants.ts @@ -497,3 +497,6 @@ export const XTOKEN_TYPE_UPGRADE_WHITELIST = process.env.XTOKEN_TYPE_UPGRADE_WHITELIST?.trim() .split(/\s?,\s?/) .map((x) => +x); +export const XTOKEN_SYMBOL_UPGRADE_WHITELIST = + process.env.XTOKEN_SYMBOL_UPGRADE_WHITELIST?.trim() + .split(/\s?,\s?/); diff --git a/scripts/upgrade/ntoken.ts b/scripts/upgrade/ntoken.ts index 1f1cb2e3..ba3ca36f 100644 --- a/scripts/upgrade/ntoken.ts +++ b/scripts/upgrade/ntoken.ts @@ -24,6 +24,7 @@ import dotenv from "dotenv"; import { DRY_RUN, GLOBAL_OVERRIDES, + XTOKEN_SYMBOL_UPGRADE_WHITELIST, XTOKEN_TYPE_UPGRADE_WHITELIST, } from "../../helpers/hardhat-constants"; import {dryRunEncodedData} from "../../helpers/contracts-helpers"; @@ -75,6 +76,12 @@ export const upgradeNToken = async (verify = false) => { continue; } + if (XTOKEN_SYMBOL_UPGRADE_WHITELIST && !XTOKEN_SYMBOL_UPGRADE_WHITELIST.includes(symbol)) { + console.log(symbol + "not in XTOKEN_SYMBOL_UPGRADE_WHITELIST, skip..."); + continue; + } + + if (xTokenType == XTokenType.NTokenBAYC) { if (!nTokenBAYCImplementationAddress) { console.log("deploy NTokenBAYC implementation");