Add Infinity Swap related actions to Collection Actions > Actions
This commit is contained in:
parent
2dcbda6f25
commit
0365aa5a7b
@ -1,6 +1,7 @@
|
|||||||
/* eslint-disable eslint-comments/disable-enable-pair */
|
/* eslint-disable eslint-comments/disable-enable-pair */
|
||||||
/* eslint-disable no-nested-ternary */
|
/* eslint-disable no-nested-ternary */
|
||||||
import { toUtf8 } from '@cosmjs/encoding'
|
import { toUtf8 } from '@cosmjs/encoding'
|
||||||
|
import clsx from 'clsx'
|
||||||
import { AirdropUpload } from 'components/AirdropUpload'
|
import { AirdropUpload } from 'components/AirdropUpload'
|
||||||
import { Button } from 'components/Button'
|
import { Button } from 'components/Button'
|
||||||
import type { DispatchExecuteArgs } from 'components/collections/actions/actions'
|
import type { DispatchExecuteArgs } from 'components/collections/actions/actions'
|
||||||
@ -20,6 +21,7 @@ import { useGlobalSettings } from 'contexts/globalSettings'
|
|||||||
import { useWallet } from 'contexts/wallet'
|
import { useWallet } from 'contexts/wallet'
|
||||||
import type { BaseMinterInstance } from 'contracts/baseMinter'
|
import type { BaseMinterInstance } from 'contracts/baseMinter'
|
||||||
import type { OpenEditionMinterInstance } from 'contracts/openEditionMinter'
|
import type { OpenEditionMinterInstance } from 'contracts/openEditionMinter'
|
||||||
|
import type { RoyaltyRegistryInstance } from 'contracts/royaltyRegistry'
|
||||||
import type { SG721Instance } from 'contracts/sg721'
|
import type { SG721Instance } from 'contracts/sg721'
|
||||||
import type { VendingMinterInstance } from 'contracts/vendingMinter'
|
import type { VendingMinterInstance } from 'contracts/vendingMinter'
|
||||||
import type { FormEvent } from 'react'
|
import type { FormEvent } from 'react'
|
||||||
@ -27,6 +29,7 @@ import { useEffect, useState } from 'react'
|
|||||||
import { toast } from 'react-hot-toast'
|
import { toast } from 'react-hot-toast'
|
||||||
import { FaArrowRight } from 'react-icons/fa'
|
import { FaArrowRight } from 'react-icons/fa'
|
||||||
import { useMutation } from 'react-query'
|
import { useMutation } from 'react-query'
|
||||||
|
import { ROYALTY_REGISTRY_ADDRESS } from 'utils/constants'
|
||||||
import type { AirdropAllocation } from 'utils/isValidAccountsFile'
|
import type { AirdropAllocation } from 'utils/isValidAccountsFile'
|
||||||
import { resolveAddress } from 'utils/resolveAddress'
|
import { resolveAddress } from 'utils/resolveAddress'
|
||||||
|
|
||||||
@ -41,6 +44,7 @@ interface CollectionActionsProps {
|
|||||||
vendingMinterMessages: VendingMinterInstance | undefined
|
vendingMinterMessages: VendingMinterInstance | undefined
|
||||||
baseMinterMessages: BaseMinterInstance | undefined
|
baseMinterMessages: BaseMinterInstance | undefined
|
||||||
openEditionMinterMessages: OpenEditionMinterInstance | undefined
|
openEditionMinterMessages: OpenEditionMinterInstance | undefined
|
||||||
|
royaltyRegistryMessages: RoyaltyRegistryInstance | undefined
|
||||||
minterType: MinterType
|
minterType: MinterType
|
||||||
sg721Type: Sg721Type
|
sg721Type: Sg721Type
|
||||||
}
|
}
|
||||||
@ -54,6 +58,7 @@ export const CollectionActions = ({
|
|||||||
vendingMinterMessages,
|
vendingMinterMessages,
|
||||||
baseMinterMessages,
|
baseMinterMessages,
|
||||||
openEditionMinterMessages,
|
openEditionMinterMessages,
|
||||||
|
royaltyRegistryMessages,
|
||||||
minterType,
|
minterType,
|
||||||
sg721Type,
|
sg721Type,
|
||||||
}: CollectionActionsProps) => {
|
}: CollectionActionsProps) => {
|
||||||
@ -69,6 +74,7 @@ export const CollectionActions = ({
|
|||||||
const [explicitContent, setExplicitContent] = useState<ExplicitContentType>(undefined)
|
const [explicitContent, setExplicitContent] = useState<ExplicitContentType>(undefined)
|
||||||
const [resolvedRecipientAddress, setResolvedRecipientAddress] = useState<string>('')
|
const [resolvedRecipientAddress, setResolvedRecipientAddress] = useState<string>('')
|
||||||
const [jsonExtensions, setJsonExtensions] = useState<boolean>(false)
|
const [jsonExtensions, setJsonExtensions] = useState<boolean>(false)
|
||||||
|
const [decrement, setDecrement] = useState<boolean>(false)
|
||||||
|
|
||||||
const actionComboboxState = useActionsComboboxState()
|
const actionComboboxState = useActionsComboboxState()
|
||||||
const type = actionComboboxState.value?.id
|
const type = actionComboboxState.value?.id
|
||||||
@ -170,8 +176,11 @@ export const CollectionActions = ({
|
|||||||
const royaltyShareState = useInputState({
|
const royaltyShareState = useInputState({
|
||||||
id: 'royalty-share',
|
id: 'royalty-share',
|
||||||
name: 'royaltyShare',
|
name: 'royaltyShare',
|
||||||
title: 'Share Percentage',
|
title: type !== 'update_royalties_for_infinity_swap' ? 'Share Percentage' : 'Share Delta',
|
||||||
subtitle: 'Percentage of royalties to be paid',
|
subtitle:
|
||||||
|
type !== 'update_royalties_for_infinity_swap'
|
||||||
|
? 'Percentage of royalties to be paid'
|
||||||
|
: 'Change in share percentage',
|
||||||
placeholder: '5%',
|
placeholder: '5%',
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -208,7 +217,10 @@ export const CollectionActions = ({
|
|||||||
const showDescriptionField = type === 'update_collection_info'
|
const showDescriptionField = type === 'update_collection_info'
|
||||||
const showImageField = type === 'update_collection_info'
|
const showImageField = type === 'update_collection_info'
|
||||||
const showExternalLinkField = type === 'update_collection_info'
|
const showExternalLinkField = type === 'update_collection_info'
|
||||||
const showRoyaltyRelatedFields = type === 'update_collection_info'
|
const showRoyaltyRelatedFields =
|
||||||
|
type === 'update_collection_info' ||
|
||||||
|
type === 'set_royalties_for_infinity_swap' ||
|
||||||
|
type === 'update_royalties_for_infinity_swap'
|
||||||
const showExplicitContentField = type === 'update_collection_info'
|
const showExplicitContentField = type === 'update_collection_info'
|
||||||
const showBaseUriField = type === 'batch_update_token_metadata'
|
const showBaseUriField = type === 'batch_update_token_metadata'
|
||||||
|
|
||||||
@ -219,6 +231,7 @@ export const CollectionActions = ({
|
|||||||
limit: limitState.value,
|
limit: limitState.value,
|
||||||
minterContract: minterContractAddress,
|
minterContract: minterContractAddress,
|
||||||
sg721Contract: sg721ContractAddress,
|
sg721Contract: sg721ContractAddress,
|
||||||
|
royaltyRegistryContract: ROYALTY_REGISTRY_ADDRESS,
|
||||||
tokenId: tokenIdState.value,
|
tokenId: tokenIdState.value,
|
||||||
tokenIds: tokenIdListState.value,
|
tokenIds: tokenIdListState.value,
|
||||||
tokenUri: tokenURIState.value.trim().endsWith('/')
|
tokenUri: tokenURIState.value.trim().endsWith('/')
|
||||||
@ -229,6 +242,7 @@ export const CollectionActions = ({
|
|||||||
baseMinterMessages,
|
baseMinterMessages,
|
||||||
openEditionMinterMessages,
|
openEditionMinterMessages,
|
||||||
sg721Messages,
|
sg721Messages,
|
||||||
|
royaltyRegistryMessages,
|
||||||
recipient: resolvedRecipientAddress,
|
recipient: resolvedRecipientAddress,
|
||||||
recipients: airdropArray,
|
recipients: airdropArray,
|
||||||
tokenRecipients: airdropAllocationArray,
|
tokenRecipients: airdropAllocationArray,
|
||||||
@ -240,6 +254,7 @@ export const CollectionActions = ({
|
|||||||
: baseURIState.value.trim(),
|
: baseURIState.value.trim(),
|
||||||
collectionInfo,
|
collectionInfo,
|
||||||
jsonExtensions,
|
jsonExtensions,
|
||||||
|
decrement,
|
||||||
}
|
}
|
||||||
const resolveRecipientAddress = async () => {
|
const resolveRecipientAddress = async () => {
|
||||||
await resolveAddress(recipientState.value.trim(), wallet).then((resolvedAddress) => {
|
await resolveAddress(recipientState.value.trim(), wallet).then((resolvedAddress) => {
|
||||||
@ -448,6 +463,24 @@ export const CollectionActions = ({
|
|||||||
<div className="p-2 my-4 rounded border-2 border-gray-500/50">
|
<div className="p-2 my-4 rounded border-2 border-gray-500/50">
|
||||||
<TextInput className="mb-2" {...royaltyPaymentAddressState} />
|
<TextInput className="mb-2" {...royaltyPaymentAddressState} />
|
||||||
<NumberInput className="mb-2" {...royaltyShareState} />
|
<NumberInput className="mb-2" {...royaltyShareState} />
|
||||||
|
<Conditional test={type === 'update_royalties_for_infinity_swap'}>
|
||||||
|
<div className="flex flex-row space-y-2 w-1/4">
|
||||||
|
<div className={clsx('flex flex-col space-y-2 w-full form-control')}>
|
||||||
|
<label className="justify-start cursor-pointer label">
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="mr-4 font-bold">Increment</span>
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
checked={decrement}
|
||||||
|
className={`toggle ${decrement ? `bg-stargaze` : `bg-gray-600`}`}
|
||||||
|
onClick={() => setDecrement(!decrement)}
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<span className="mx-4 font-bold">Decrement</span>
|
||||||
|
</div>
|
||||||
|
</Conditional>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{showExplicitContentField && (
|
{showExplicitContentField && (
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
/* eslint-disable eslint-comments/disable-enable-pair */
|
/* eslint-disable eslint-comments/disable-enable-pair */
|
||||||
import { useBaseMinterContract } from 'contracts/baseMinter'
|
import { useBaseMinterContract } from 'contracts/baseMinter'
|
||||||
import { useOpenEditionMinterContract } from 'contracts/openEditionMinter'
|
import { useOpenEditionMinterContract } from 'contracts/openEditionMinter'
|
||||||
|
import type { RoyaltyRegistryInstance } from 'contracts/royaltyRegistry'
|
||||||
|
import { useRoyaltyRegistryContract } from 'contracts/royaltyRegistry'
|
||||||
import type { CollectionInfo, SG721Instance } from 'contracts/sg721'
|
import type { CollectionInfo, SG721Instance } from 'contracts/sg721'
|
||||||
import { useSG721Contract } from 'contracts/sg721'
|
import { useSG721Contract } from 'contracts/sg721'
|
||||||
import type { VendingMinterInstance } from 'contracts/vendingMinter'
|
import type { VendingMinterInstance } from 'contracts/vendingMinter'
|
||||||
import { useVendingMinterContract } from 'contracts/vendingMinter'
|
import { useVendingMinterContract } from 'contracts/vendingMinter'
|
||||||
|
import { INFINITY_SWAP_PROTOCOL_ADDRESS } from 'utils/constants'
|
||||||
import type { AirdropAllocation } from 'utils/isValidAccountsFile'
|
import type { AirdropAllocation } from 'utils/isValidAccountsFile'
|
||||||
|
|
||||||
import type { BaseMinterInstance } from '../../../contracts/baseMinter/contract'
|
import type { BaseMinterInstance } from '../../../contracts/baseMinter/contract'
|
||||||
@ -29,6 +32,8 @@ export const ACTION_TYPES = [
|
|||||||
'update_per_address_limit',
|
'update_per_address_limit',
|
||||||
'update_collection_info',
|
'update_collection_info',
|
||||||
'freeze_collection_info',
|
'freeze_collection_info',
|
||||||
|
'set_royalties_for_infinity_swap',
|
||||||
|
'update_royalties_for_infinity_swap',
|
||||||
'transfer',
|
'transfer',
|
||||||
'batch_transfer',
|
'batch_transfer',
|
||||||
'batch_transfer_multi_address',
|
'batch_transfer_multi_address',
|
||||||
@ -73,6 +78,16 @@ export const BASE_ACTION_LIST: ActionListItem[] = [
|
|||||||
name: 'Freeze Collection Info',
|
name: 'Freeze Collection Info',
|
||||||
description: `Freeze collection info to prevent further updates`,
|
description: `Freeze collection info to prevent further updates`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'set_royalties_for_infinity_swap',
|
||||||
|
name: 'Set Royalty Details for Infinity Swap',
|
||||||
|
description: `Set royalty details for Infinity Swap`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'update_royalties_for_infinity_swap',
|
||||||
|
name: 'Update Royalty Details for Infinity Swap',
|
||||||
|
description: `Update royalty details for Infinity Swap`,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'transfer',
|
id: 'transfer',
|
||||||
name: 'Transfer Tokens',
|
name: 'Transfer Tokens',
|
||||||
@ -166,6 +181,16 @@ export const VENDING_ACTION_LIST: ActionListItem[] = [
|
|||||||
name: 'Freeze Collection Info',
|
name: 'Freeze Collection Info',
|
||||||
description: `Freeze collection info to prevent further updates`,
|
description: `Freeze collection info to prevent further updates`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'set_royalties_for_infinity_swap',
|
||||||
|
name: 'Set Royalty Details for Infinity Swap',
|
||||||
|
description: `Set royalty details for Infinity Swap`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'update_royalties_for_infinity_swap',
|
||||||
|
name: 'Update Royalty Details for Infinity Swap',
|
||||||
|
description: `Update royalty details for Infinity Swap`,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'transfer',
|
id: 'transfer',
|
||||||
name: 'Transfer Tokens',
|
name: 'Transfer Tokens',
|
||||||
@ -259,6 +284,16 @@ export const OPEN_EDITION_ACTION_LIST: ActionListItem[] = [
|
|||||||
name: 'Freeze Collection Info',
|
name: 'Freeze Collection Info',
|
||||||
description: `Freeze collection info to prevent further updates`,
|
description: `Freeze collection info to prevent further updates`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'set_royalties_for_infinity_swap',
|
||||||
|
name: 'Set Royalty Details for Infinity Swap',
|
||||||
|
description: `Set royalty details for Infinity Swap`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'update_royalties_for_infinity_swap',
|
||||||
|
name: 'Update Royalty Details for Infinity Swap',
|
||||||
|
description: `Update royalty details for Infinity Swap`,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'transfer',
|
id: 'transfer',
|
||||||
name: 'Transfer Tokens',
|
name: 'Transfer Tokens',
|
||||||
@ -323,10 +358,12 @@ export interface DispatchExecuteProps {
|
|||||||
export interface DispatchExecuteArgs {
|
export interface DispatchExecuteArgs {
|
||||||
minterContract: string
|
minterContract: string
|
||||||
sg721Contract: string
|
sg721Contract: string
|
||||||
|
royaltyRegistryContract: string
|
||||||
vendingMinterMessages?: VendingMinterInstance
|
vendingMinterMessages?: VendingMinterInstance
|
||||||
baseMinterMessages?: BaseMinterInstance
|
baseMinterMessages?: BaseMinterInstance
|
||||||
openEditionMinterMessages?: OpenEditionMinterInstance
|
openEditionMinterMessages?: OpenEditionMinterInstance
|
||||||
sg721Messages?: SG721Instance
|
sg721Messages?: SG721Instance
|
||||||
|
royaltyRegistryMessages?: RoyaltyRegistryInstance
|
||||||
txSigner: string
|
txSigner: string
|
||||||
type: string | undefined
|
type: string | undefined
|
||||||
tokenUri: string
|
tokenUri: string
|
||||||
@ -344,11 +381,25 @@ export interface DispatchExecuteArgs {
|
|||||||
collectionInfo: CollectionInfo | undefined
|
collectionInfo: CollectionInfo | undefined
|
||||||
baseUri: string
|
baseUri: string
|
||||||
jsonExtensions: boolean
|
jsonExtensions: boolean
|
||||||
|
decrement: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export const dispatchExecute = async (args: DispatchExecuteArgs) => {
|
export const dispatchExecute = async (args: DispatchExecuteArgs) => {
|
||||||
const { vendingMinterMessages, baseMinterMessages, openEditionMinterMessages, sg721Messages, txSigner } = args
|
const {
|
||||||
if (!vendingMinterMessages || !baseMinterMessages || !openEditionMinterMessages || !sg721Messages) {
|
vendingMinterMessages,
|
||||||
|
baseMinterMessages,
|
||||||
|
openEditionMinterMessages,
|
||||||
|
sg721Messages,
|
||||||
|
royaltyRegistryMessages,
|
||||||
|
txSigner,
|
||||||
|
} = args
|
||||||
|
if (
|
||||||
|
!vendingMinterMessages ||
|
||||||
|
!baseMinterMessages ||
|
||||||
|
!openEditionMinterMessages ||
|
||||||
|
!sg721Messages ||
|
||||||
|
!royaltyRegistryMessages
|
||||||
|
) {
|
||||||
throw new Error('Cannot execute actions')
|
throw new Error('Cannot execute actions')
|
||||||
}
|
}
|
||||||
switch (args.type) {
|
switch (args.type) {
|
||||||
@ -415,6 +466,23 @@ export const dispatchExecute = async (args: DispatchExecuteArgs) => {
|
|||||||
case 'shuffle': {
|
case 'shuffle': {
|
||||||
return vendingMinterMessages.shuffle(txSigner)
|
return vendingMinterMessages.shuffle(txSigner)
|
||||||
}
|
}
|
||||||
|
case 'set_royalties_for_infinity_swap': {
|
||||||
|
return royaltyRegistryMessages.setCollectionRoyaltyProtocol(
|
||||||
|
args.sg721Contract,
|
||||||
|
INFINITY_SWAP_PROTOCOL_ADDRESS,
|
||||||
|
args.collectionInfo?.royalty_info?.payment_address as string,
|
||||||
|
Number(args.collectionInfo?.royalty_info?.share) * 100,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
case 'update_royalties_for_infinity_swap': {
|
||||||
|
return royaltyRegistryMessages.updateCollectionRoyaltyProtocol(
|
||||||
|
args.sg721Contract,
|
||||||
|
INFINITY_SWAP_PROTOCOL_ADDRESS,
|
||||||
|
args.collectionInfo?.royalty_info?.payment_address as string,
|
||||||
|
Number(args.collectionInfo?.royalty_info?.share) * 100,
|
||||||
|
args.decrement,
|
||||||
|
)
|
||||||
|
}
|
||||||
case 'transfer': {
|
case 'transfer': {
|
||||||
return sg721Messages.transferNft(args.recipient, args.tokenId.toString())
|
return sg721Messages.transferNft(args.recipient, args.tokenId.toString())
|
||||||
}
|
}
|
||||||
@ -460,7 +528,10 @@ export const previewExecutePayload = (args: DispatchExecuteArgs) => {
|
|||||||
const { messages: baseMinterMessages } = useBaseMinterContract()
|
const { messages: baseMinterMessages } = useBaseMinterContract()
|
||||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||||
const { messages: openEditionMinterMessages } = useOpenEditionMinterContract()
|
const { messages: openEditionMinterMessages } = useOpenEditionMinterContract()
|
||||||
const { minterContract, sg721Contract } = args
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||||
|
const { messages: royaltyRegistryMessages } = useRoyaltyRegistryContract()
|
||||||
|
|
||||||
|
const { minterContract, sg721Contract, royaltyRegistryContract } = args
|
||||||
switch (args.type) {
|
switch (args.type) {
|
||||||
case 'mint_token_uri': {
|
case 'mint_token_uri': {
|
||||||
return baseMinterMessages(minterContract)?.mint(args.tokenUri)
|
return baseMinterMessages(minterContract)?.mint(args.tokenUri)
|
||||||
@ -525,6 +596,23 @@ export const previewExecutePayload = (args: DispatchExecuteArgs) => {
|
|||||||
case 'shuffle': {
|
case 'shuffle': {
|
||||||
return vendingMinterMessages(minterContract)?.shuffle()
|
return vendingMinterMessages(minterContract)?.shuffle()
|
||||||
}
|
}
|
||||||
|
case 'set_royalties_for_infinity_swap': {
|
||||||
|
return royaltyRegistryMessages(royaltyRegistryContract)?.setCollectionRoyaltyProtocol(
|
||||||
|
args.sg721Contract,
|
||||||
|
INFINITY_SWAP_PROTOCOL_ADDRESS,
|
||||||
|
args.collectionInfo?.royalty_info?.payment_address as string,
|
||||||
|
Number(args.collectionInfo?.royalty_info?.share) * 100,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
case 'update_royalties_for_infinity_swap': {
|
||||||
|
return royaltyRegistryMessages(royaltyRegistryContract)?.updateCollectionRoyaltyProtocol(
|
||||||
|
args.sg721Contract,
|
||||||
|
INFINITY_SWAP_PROTOCOL_ADDRESS,
|
||||||
|
args.collectionInfo?.royalty_info?.payment_address as string,
|
||||||
|
Number(args.collectionInfo?.royalty_info?.share) * 100,
|
||||||
|
args.decrement,
|
||||||
|
)
|
||||||
|
}
|
||||||
case 'transfer': {
|
case 'transfer': {
|
||||||
return sg721Messages(sg721Contract)?.transferNft(args.recipient, args.tokenId.toString())
|
return sg721Messages(sg721Contract)?.transferNft(args.recipient, args.tokenId.toString())
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import { useRouter } from 'next/router'
|
|||||||
import { NextSeo } from 'next-seo'
|
import { NextSeo } from 'next-seo'
|
||||||
import { useEffect, useMemo, useState } from 'react'
|
import { useEffect, useMemo, useState } from 'react'
|
||||||
import toast from 'react-hot-toast'
|
import toast from 'react-hot-toast'
|
||||||
|
import { ROYALTY_REGISTRY_ADDRESS } from 'utils/constants'
|
||||||
import { useDebounce } from 'utils/debounce'
|
import { useDebounce } from 'utils/debounce'
|
||||||
import { withMetadata } from 'utils/layout'
|
import { withMetadata } from 'utils/layout'
|
||||||
import { links } from 'utils/links'
|
import { links } from 'utils/links'
|
||||||
@ -24,6 +25,7 @@ const CollectionActionsPage: NextPage = () => {
|
|||||||
vendingMinter: vendingMinterContract,
|
vendingMinter: vendingMinterContract,
|
||||||
openEditionMinter: openEditionMinterContract,
|
openEditionMinter: openEditionMinterContract,
|
||||||
sg721: sg721Contract,
|
sg721: sg721Contract,
|
||||||
|
royaltyRegistry: royaltyRegistryContract,
|
||||||
} = useContracts()
|
} = useContracts()
|
||||||
const wallet = useWallet()
|
const wallet = useWallet()
|
||||||
|
|
||||||
@ -66,6 +68,11 @@ const CollectionActionsPage: NextPage = () => {
|
|||||||
[sg721Contract, sg721ContractState.value],
|
[sg721Contract, sg721ContractState.value],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const royaltyRegistryMessages = useMemo(
|
||||||
|
() => royaltyRegistryContract?.use(ROYALTY_REGISTRY_ADDRESS),
|
||||||
|
[royaltyRegistryContract],
|
||||||
|
)
|
||||||
|
|
||||||
const sg721ContractAddress = sg721ContractState.value
|
const sg721ContractAddress = sg721ContractState.value
|
||||||
const minterContractAddress = minterContractState.value
|
const minterContractAddress = minterContractState.value
|
||||||
|
|
||||||
@ -227,6 +234,7 @@ const CollectionActionsPage: NextPage = () => {
|
|||||||
minterContractAddress={minterContractState.value}
|
minterContractAddress={minterContractState.value}
|
||||||
minterType={minterType}
|
minterType={minterType}
|
||||||
openEditionMinterMessages={openEditionMinterMessages}
|
openEditionMinterMessages={openEditionMinterMessages}
|
||||||
|
royaltyRegistryMessages={royaltyRegistryMessages}
|
||||||
sg721ContractAddress={sg721ContractState.value}
|
sg721ContractAddress={sg721ContractState.value}
|
||||||
sg721Messages={sg721Messages}
|
sg721Messages={sg721Messages}
|
||||||
sg721Type={sg721Type}
|
sg721Type={sg721Type}
|
||||||
|
Loading…
Reference in New Issue
Block a user