From 724fcf11201a21807e04874e95c94b1f79cdb177 Mon Sep 17 00:00:00 2001 From: Serkan Reis Date: Mon, 22 Jan 2024 23:29:04 +0300 Subject: [PATCH] Update sg721 code id for 1/1 collection instantiation --- .env.example | 1 + env.d.ts | 1 + pages/collections/create.tsx | 3 ++- utils/constants.ts | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 1472c1f..3522851 100644 --- a/.env.example +++ b/.env.example @@ -4,6 +4,7 @@ NEXT_PUBLIC_PINATA_ENDPOINT_URL=https://api.pinata.cloud/pinning/pinFileToIPFS NEXT_PUBLIC_SG721_CODE_ID=2595 NEXT_PUBLIC_SG721_UPDATABLE_CODE_ID=2596 NEXT_PUBLIC_STRDST_SG721_CODE_ID=2595 +NEXT_PUBLIC_BASE_FACTORY_SG721_CODE_ID=2595 NEXT_PUBLIC_OPEN_EDITION_SG721_CODE_ID=2595 NEXT_PUBLIC_OPEN_EDITION_SG721_UPDATABLE_CODE_ID=2596 NEXT_PUBLIC_VENDING_MINTER_CODE_ID=2600 diff --git a/env.d.ts b/env.d.ts index 1bb11a7..f04d7a9 100644 --- a/env.d.ts +++ b/env.d.ts @@ -17,6 +17,7 @@ declare namespace NodeJS { readonly NEXT_PUBLIC_SG721_CODE_ID: string readonly NEXT_PUBLIC_SG721_UPDATABLE_CODE_ID: string readonly NEXT_PUBLIC_STRDST_SG721_CODE_ID: string + readonly NEXT_PUBLIC_BASE_FACTORY_SG721_CODE_ID: string readonly NEXT_PUBLIC_OPEN_EDITION_SG721_CODE_ID: string readonly NEXT_PUBLIC_OPEN_EDITION_SG721_UPDATABLE_CODE_ID: string readonly NEXT_PUBLIC_WHITELIST_CODE_ID: string diff --git a/pages/collections/create.tsx b/pages/collections/create.tsx index aed40ce..f3d322d 100644 --- a/pages/collections/create.tsx +++ b/pages/collections/create.tsx @@ -51,6 +51,7 @@ import { upload } from 'services/upload' import { compareFileArrays } from 'utils/compareFileArrays' import { BASE_FACTORY_ADDRESS, + BASE_FACTORY_SG721_CODE_ID, BASE_FACTORY_UPDATABLE_ADDRESS, BLOCK_EXPLORER_URL, NETWORK, @@ -646,7 +647,7 @@ const CollectionCreationPage: NextPage = () => { create_minter: { init_msg: null, collection_params: { - code_id: collectionDetails?.updatable ? SG721_UPDATABLE_CODE_ID : SG721_CODE_ID, + code_id: collectionDetails?.updatable ? SG721_UPDATABLE_CODE_ID : BASE_FACTORY_SG721_CODE_ID, name: collectionDetails?.name, symbol: collectionDetails?.symbol, info: { diff --git a/utils/constants.ts b/utils/constants.ts index 98aa221..d521fc6 100644 --- a/utils/constants.ts +++ b/utils/constants.ts @@ -1,6 +1,7 @@ export const SG721_CODE_ID = parseInt(process.env.NEXT_PUBLIC_SG721_CODE_ID, 10) export const SG721_UPDATABLE_CODE_ID = parseInt(process.env.NEXT_PUBLIC_SG721_UPDATABLE_CODE_ID, 10) export const STRDST_SG721_CODE_ID = parseInt(process.env.NEXT_PUBLIC_STRDST_SG721_CODE_ID, 10) +export const BASE_FACTORY_SG721_CODE_ID = parseInt(process.env.NEXT_PUBLIC_BASE_FACTORY_SG721_CODE_ID, 10) export const SG721_OPEN_EDITION_CODE_ID = parseInt(process.env.NEXT_PUBLIC_OPEN_EDITION_SG721_CODE_ID, 10) export const SG721_OPEN_EDITION_UPDATABLE_CODE_ID = parseInt( process.env.NEXT_PUBLIC_OPEN_EDITION_SG721_UPDATABLE_CODE_ID,