Temporary switch to a hardcoded code id for WL instantiation

This commit is contained in:
Serkan Reis 2023-03-08 07:14:49 +03:00
parent 46e7072521
commit 9fdbf173e5
3 changed files with 7 additions and 17 deletions

View File

@ -7,7 +7,7 @@ NEXT_PUBLIC_VENDING_FACTORY_ADDRESS="stars1xz4d6wzxqn3udgsm5qnr78y032xng4r2ycv7a
NEXT_PUBLIC_BASE_FACTORY_ADDRESS="stars1c6juqgd7cm80afpmuszun66rl9zdc4kgfht8fk34tfq3zk87l78sdxngzv"
NEXT_PUBLIC_SG721_NAME_ADDRESS="stars1fx74nkqkw2748av8j7ew7r3xt9cgjqduwn8m0ur5lhe49uhlsasszc5fhr"
NEXT_PUBLIC_BASE_MINTER_CODE_ID=613
NEXT_PUBLIC_WHITELIST_CODE_ID=277
NEXT_PUBLIC_WHITELIST_CODE_ID=1835
NEXT_PUBLIC_BADGE_HUB_CODE_ID=1336
NEXT_PUBLIC_BADGE_HUB_ADDRESS="stars1dacun0xn7z73qzdcmq27q3xn6xuprg8e2ugj364784al2v27tklqynhuqa"
NEXT_PUBLIC_BADGE_NFT_CODE_ID=1337

View File

@ -44,7 +44,6 @@ import {
SG721_CODE_ID,
STARGAZE_URL,
VENDING_FACTORY_ADDRESS,
WHITELIST_CODE_ID,
} from 'utils/constants'
import { withMetadata } from 'utils/layout'
import { links } from 'utils/links'
@ -380,12 +379,7 @@ const CollectionCreationPage: NextPage = () => {
member_limit: whitelistDetails?.memberLimit,
}
const data = await whitelistContract.instantiate(
WHITELIST_CODE_ID,
msg,
'Stargaze Whitelist Contract',
wallet.address,
)
const data = await whitelistContract.instantiate(1835, msg, 'Stargaze Whitelist Contract', wallet.address)
return data.contractAddress
}

View File

@ -21,7 +21,6 @@ import { type FormEvent, useState } from 'react'
import { toast } from 'react-hot-toast'
import { FaAsterisk } from 'react-icons/fa'
import { useMutation } from 'react-query'
import { WHITELIST_CODE_ID } from 'utils/constants'
import { withMetadata } from 'utils/layout'
import { links } from 'utils/links'
@ -80,14 +79,11 @@ const WhitelistInstantiatePage: NextPage = () => {
per_address_limit: perAddressLimitState.value,
member_limit: memberLimitState.value,
}
return toast.promise(
contract.instantiate(WHITELIST_CODE_ID, msg, 'Stargaze Whitelist Contract', wallet.address),
{
loading: 'Instantiating contract...',
error: 'Instantiation failed!',
success: 'Instantiation success!',
},
)
return toast.promise(contract.instantiate(1835, msg, 'Stargaze Whitelist Contract', wallet.address), {
loading: 'Instantiating contract...',
error: 'Instantiation failed!',
success: 'Instantiation success!',
})
},
{
onError: (error) => {