Merge pull request #177 from public-awesome/separate-sg721-for-open-edition-creation

Use separate sg721 code ids for open edition collection creation
This commit is contained in:
Serkan Reis 2023-06-22 21:43:17 +03:00 committed by GitHub
commit 97fa8a875b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 7 deletions

View File

@ -1,8 +1,10 @@
APP_VERSION=0.6.6
APP_VERSION=0.6.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_OPEN_EDITION_SG721_CODE_ID=2595
NEXT_PUBLIC_OPEN_EDITION_SG721_UPDATABLE_CODE_ID=2596
NEXT_PUBLIC_VENDING_MINTER_CODE_ID=2600
NEXT_PUBLIC_VENDING_MINTER_FLEX_CODE_ID=2601
NEXT_PUBLIC_BASE_MINTER_CODE_ID=2598

View File

@ -15,7 +15,7 @@ import { addLogItem } from 'contexts/log'
import type { ChangeEvent } from 'react'
import { useEffect, useMemo, useRef, useState } from 'react'
import { toast } from 'react-hot-toast'
import { OPEN_EDITION_UPDATABLE_FACTORY_ADDRESS, SG721_UPDATABLE_CODE_ID } from 'utils/constants'
import { OPEN_EDITION_UPDATABLE_FACTORY_ADDRESS, SG721_OPEN_EDITION_UPDATABLE_CODE_ID } from 'utils/constants'
import { getAssetType } from 'utils/getAssetType'
import { uid } from 'utils/random'
@ -317,7 +317,9 @@ export const CollectionDetails = ({
</div>
</div>
</div>
<Conditional test={SG721_UPDATABLE_CODE_ID > 0 && OPEN_EDITION_UPDATABLE_FACTORY_ADDRESS !== undefined}>
<Conditional
test={SG721_OPEN_EDITION_UPDATABLE_CODE_ID > 0 && OPEN_EDITION_UPDATABLE_FACTORY_ADDRESS !== undefined}
>
<Tooltip
backgroundColor="bg-blue-500"
label={

View File

@ -23,8 +23,8 @@ import { upload } from 'services/upload'
import {
OPEN_EDITION_FACTORY_ADDRESS,
OPEN_EDITION_UPDATABLE_FACTORY_ADDRESS,
SG721_CODE_ID,
SG721_UPDATABLE_CODE_ID,
SG721_OPEN_EDITION_CODE_ID,
SG721_OPEN_EDITION_UPDATABLE_CODE_ID,
} from 'utils/constants'
import { getAssetType } from 'utils/getAssetType'
import { isValidAddress } from 'utils/isValidAddress'
@ -508,7 +508,7 @@ export const OpenEditionMinterCreator = ({
payment_address: mintingDetails?.paymentAddress || null,
},
collection_params: {
code_id: collectionDetails?.updatable ? SG721_UPDATABLE_CODE_ID : SG721_CODE_ID,
code_id: collectionDetails?.updatable ? SG721_OPEN_EDITION_UPDATABLE_CODE_ID : SG721_OPEN_EDITION_CODE_ID,
name: collectionDetails?.name,
symbol: collectionDetails?.symbol,
info: {

2
env.d.ts vendored
View File

@ -16,6 +16,8 @@ declare namespace NodeJS {
readonly NEXT_PUBLIC_SG721_CODE_ID: string
readonly NEXT_PUBLIC_SG721_UPDATABLE_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
readonly NEXT_PUBLIC_WHITELIST_FLEX_CODE_ID: string
readonly NEXT_PUBLIC_VENDING_MINTER_CODE_ID: string

View File

@ -1,6 +1,6 @@
{
"name": "stargaze-studio",
"version": "0.6.6",
"version": "0.6.7",
"workspaces": [
"packages/*"
],

View File

@ -1,5 +1,10 @@
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 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,
10,
)
export const WHITELIST_CODE_ID = parseInt(process.env.NEXT_PUBLIC_WHITELIST_CODE_ID, 10)
export const WHITELIST_FLEX_CODE_ID = parseInt(process.env.NEXT_PUBLIC_WHITELIST_FLEX_CODE_ID, 10)
export const VENDING_MINTER_CODE_ID = parseInt(process.env.NEXT_PUBLIC_VENDING_MINTER_CODE_ID, 10)