From 86c289c8f9446b693164f57c7ae8ce607e37c02d Mon Sep 17 00:00:00 2001 From: Cheng JIANG Date: Thu, 28 Sep 2023 14:16:22 +0800 Subject: [PATCH] fix: blocks token range (#420) Signed-off-by: GopherJ --- helpers/contracts-deployments.ts | 11 ++++++++--- helpers/init-helpers.ts | 2 -- scripts/upgrade/ntoken.ts | 4 ---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/helpers/contracts-deployments.ts b/helpers/contracts-deployments.ts index 16cb563ae..25a9ac4ff 100644 --- a/helpers/contracts-deployments.ts +++ b/helpers/contracts-deployments.ts @@ -183,7 +183,13 @@ import { insertContractAddressInDb, withSaveAndVerify, } from "./contracts-helpers"; -import {DRE, getDb, getParaSpaceConfig, waitForTx} from "./misc-utils"; +import { + DRE, + getDb, + getParaSpaceConfig, + isMainnet, + waitForTx, +} from "./misc-utils"; import { eContractid, ERC20TokenContractId, @@ -3089,8 +3095,6 @@ export const deployOtherdeedNTokenImpl = async ( export const deployChromieSquiggleNTokenImpl = async ( poolAddress: tEthereumAddress, delegationRegistryAddress: tEthereumAddress, - startTokenId: number, - endTokenId: number, verify?: boolean ) => { const mintableERC721Logic = @@ -3101,6 +3105,7 @@ export const deployChromieSquiggleNTokenImpl = async ( ["contracts/protocol/tokenization/libraries/MintableERC721Logic.sol:MintableERC721Logic"]: mintableERC721Logic, }; + const [startTokenId, endTokenId] = isMainnet() ? [0, 9763] : [0, 20]; return withSaveAndVerify( await getContractFactory("NTokenChromieSquiggle", libraries), diff --git a/helpers/init-helpers.ts b/helpers/init-helpers.ts index 4be05e313..a8cb6c807 100644 --- a/helpers/init-helpers.ts +++ b/helpers/init-helpers.ts @@ -608,8 +608,6 @@ export const initReservesByHelper = async ( await deployChromieSquiggleNTokenImpl( pool.address, delegationRegistryAddress, - 0, - 20, //set 20 in test environment for easy test. should be 9763 in mainnet verify ) ).address; diff --git a/scripts/upgrade/ntoken.ts b/scripts/upgrade/ntoken.ts index bdeea10f2..1f1cb2e30 100644 --- a/scripts/upgrade/ntoken.ts +++ b/scripts/upgrade/ntoken.ts @@ -184,8 +184,6 @@ export const upgradeNToken = async (verify = false) => { await deployChromieSquiggleNTokenImpl( poolAddress, delegationRegistry, - 0, - 9763, verify ) ).address; @@ -212,8 +210,6 @@ export const upgradeNToken = async (verify = false) => { await deployChromieSquiggleNTokenImpl( poolAddress, delegationRegistry, - 0, - 9763, verify ) ).address;