diff --git a/pages/contracts/sg721/index.tsx b/pages/contracts/sg721/index.tsx
index 561b4b3..98c1e67 100644
--- a/pages/contracts/sg721/index.tsx
+++ b/pages/contracts/sg721/index.tsx
@@ -1 +1 @@
-export { default } from './instantiate'
+export { default } from './query'
diff --git a/pages/contracts/sg721/instantiate.tsx b/pages/contracts/sg721/instantiate.tsx
deleted file mode 100644
index f02483e..0000000
--- a/pages/contracts/sg721/instantiate.tsx
+++ /dev/null
@@ -1,186 +0,0 @@
-import { Alert } from 'components/Alert'
-import { Button } from 'components/Button'
-import { Conditional } from 'components/Conditional'
-import { ContractPageHeader } from 'components/ContractPageHeader'
-import { FormGroup } from 'components/FormGroup'
-import { NumberInput, TextInput } from 'components/forms/FormInput'
-import { useInputState, useNumberInputState } from 'components/forms/FormInput.hooks'
-import { FormTextArea } from 'components/forms/FormTextArea'
-import { JsonPreview } from 'components/JsonPreview'
-import { LinkTabs } from 'components/LinkTabs'
-import { sg721LinkTabs } from 'components/LinkTabs.data'
-import { useContracts } from 'contexts/contracts'
-import { useWallet } from 'contexts/wallet'
-import type { InstantiateResponse } from 'contracts/sg721'
-import type { NextPage } from 'next'
-import { NextSeo } from 'next-seo'
-import type { FormEvent } from 'react'
-import { toast } from 'react-hot-toast'
-import { FaAsterisk } from 'react-icons/fa'
-import { useMutation } from 'react-query'
-import { SG721_CODE_ID } from 'utils/constants'
-import { withMetadata } from 'utils/layout'
-import { links } from 'utils/links'
-
-const Sg721InstantiatePage: NextPage = () => {
- const wallet = useWallet()
- const contract = useContracts().sg721
-
- const nameState = useInputState({
- id: 'name',
- name: 'name',
- title: 'Name',
- placeholder: 'My Awesome SG721 Contract',
- subtitle: 'Name of the sg721 contract',
- })
-
- const symbolState = useInputState({
- id: 'symbol',
- name: 'symbol',
- title: 'Symbol',
- placeholder: 'AWSM',
- subtitle: 'Symbol of the sg721 contract',
- })
-
- const minterState = useInputState({
- id: 'minter-address',
- name: 'minterAddress',
- title: 'Minter Address',
- placeholder: 'stars1234567890abcdefghijklmnopqrstuvwxyz...',
- subtitle: 'Address that has the permissions to mint on sg721 contract',
- })
-
- const creatorState = useInputState({
- id: 'creator-address',
- name: 'creatorAddress',
- title: 'Creator Address',
- placeholder: 'stars1234567890abcdefghijklmnopqrstuvwxyz...',
- subtitle: 'Address of the collection creator',
- })
-
- const descriptionState = useInputState({
- id: 'description',
- name: 'description',
- title: 'Description',
- subtitle: 'Description of the collection',
- })
-
- const imageState = useInputState({
- id: 'image',
- name: 'image',
- title: 'Image',
- subtitle: 'Image of the collection',
- placeholder: 'ipfs://bafybe....',
- })
-
- const externalLinkState = useInputState({
- id: 'external-link',
- name: 'externalLink',
- title: 'External Link',
- subtitle: 'External link to the collection',
- })
-
- const royaltyPaymentAddressState = useInputState({
- id: 'royalty-payment-address',
- name: 'royaltyPaymentAddress',
- title: 'Payment Address',
- subtitle: 'Address to receive royalties',
- placeholder: 'stars1234567890abcdefghijklmnopqrstuvwxyz...',
- })
-
- const royaltyShareState = useNumberInputState({
- id: 'royalty-share',
- name: 'royaltyShare',
- title: 'Share Percentage',
- subtitle: 'Percentage of royalties to be paid',
- placeholder: '8',
- })
-
- const { data, isLoading, mutate } = useMutation(
- async (event: FormEvent): Promise
=> {
- event.preventDefault()
- if (!contract) {
- throw new Error('Smart contract connection failed')
- }
-
- let royaltyInfo = null
- if (royaltyPaymentAddressState.value && royaltyShareState.value) {
- royaltyInfo = {
- paymentAddress: royaltyPaymentAddressState.value,
- share: royaltyShareState.value,
- }
- }
-
- const msg = {
- name: nameState.value,
- symbol: symbolState.value,
- minter: minterState.value,
- collection_info: {
- creator: creatorState.value,
- description: descriptionState.value,
- image: imageState.value,
- external_link: externalLinkState.value || null,
- royalty_info: royaltyInfo,
- },
- }
- return toast.promise(contract.instantiate(SG721_CODE_ID, msg, 'Stargaze Sg721 Contract', wallet.address), {
- loading: 'Instantiating contract...',
- error: 'Instantiation failed!',
- success: 'Instantiation success!',
- })
- },
- {
- onError: (error) => {
- toast.error(String(error))
- },
- },
- )
-
- return (
-
- )
-}
-
-export default withMetadata(Sg721InstantiatePage, { center: false })
diff --git a/pages/contracts/sg721/query.tsx b/pages/contracts/sg721/query.tsx
index f966f60..22c93d0 100644
--- a/pages/contracts/sg721/query.tsx
+++ b/pages/contracts/sg721/query.tsx
@@ -96,7 +96,7 @@ const Sg721QueryPage: NextPage = () => {
link={links.Documentation}
title="Sg721 Contract"
/>
-
+
diff --git a/pages/contracts/whitelist/instantiate.tsx b/pages/contracts/whitelist/instantiate.tsx
index 2fd6649..440f1d4 100644
--- a/pages/contracts/whitelist/instantiate.tsx
+++ b/pages/contracts/whitelist/instantiate.tsx
@@ -76,7 +76,7 @@ const Sg721InstantiatePage: NextPage = () => {
members: whitelistArray,
start_time: (startDate.getTime() * 1_000_000).toString(),
end_time: (endDate.getTime() * 1_000_000).toString(),
- unit_price: coin(String(Number(unitPriceState.value) * 1000000), 'ustars'),
+ mint_price: coin(String(Number(unitPriceState.value) * 1000000), 'ustars'),
per_address_limit: perAddressLimitState.value,
member_limit: memberLimitState.value,
}
diff --git a/utils/constants.ts b/utils/constants.ts
index bf13826..b6933db 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 MINTER_CODE_ID = parseInt(process.env.NEXT_PUBLIC_MINTER_CODE_ID, 10)
export const WHITELIST_CODE_ID = parseInt(process.env.NEXT_PUBLIC_WHITELIST_CODE_ID, 10)
+export const VENDING_MINTER_CODE_ID = parseInt(process.env.NEXT_PUBLIC_VENDING_MINTER_CODE_ID, 10)
+export const VENDING_FACTORY_ADDRESS = process.env.NEXT_PUBLIC_VENDING_FACTORY_ADDRESS
export const PINATA_ENDPOINT_URL = process.env.NEXT_PUBLIC_PINATA_ENDPOINT_URL
export const NETWORK = process.env.NEXT_PUBLIC_NETWORK