From 03164b6cf888984024f47c2f6df991751668084f Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Thu, 20 Oct 2022 22:16:35 -0700 Subject: [PATCH 01/32] add allowlist fetcher hook --- .../src/hooks/useAllowlistEntry.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 packages/zora-drops-utils/src/hooks/useAllowlistEntry.ts diff --git a/packages/zora-drops-utils/src/hooks/useAllowlistEntry.ts b/packages/zora-drops-utils/src/hooks/useAllowlistEntry.ts new file mode 100644 index 0000000..6a2f6d4 --- /dev/null +++ b/packages/zora-drops-utils/src/hooks/useAllowlistEntry.ts @@ -0,0 +1,19 @@ +import useSWR from 'swr' + +export function useAllowlistEntry({ + merkleRoot, + address, +}: { + merkleRoot?: string + address?: string +}) { + const { data: entry, error } = useSWR( + `https://allowlist.zora.co/allowed?user=${address}&root=${merkleRoot}` + ) + + return { + loading: !error && !entry, + accessAllowed: entry && !!entry.length && !!entry[0].proof.length, + allowlistEntry: entry && entry[0], + } +} From 8092abc6572fd9a1a0c3311bac81e8a15cb31995 Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Thu, 20 Oct 2022 22:24:16 -0700 Subject: [PATCH 02/32] add presale data in salesConfig subgraph query --- packages/zora-drops-utils/src/data/dropsQuery.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/zora-drops-utils/src/data/dropsQuery.ts b/packages/zora-drops-utils/src/data/dropsQuery.ts index a0f5e6b..6a2d2b4 100644 --- a/packages/zora-drops-utils/src/data/dropsQuery.ts +++ b/packages/zora-drops-utils/src/data/dropsQuery.ts @@ -6,10 +6,14 @@ export const EDITIONS_STYLE_CONTRACT_METADATA = gql` owner symbol salesConfig { + id publicSalePrice + maxSalePurchasePerAddress publicSaleStart publicSaleEnd - maxSalePurchasePerAddress + presaleStart + presaleEnd + presaleMerkleRoot } address maxSupply From f553d6f84393c0d142a65f4fbe593d7709b8c550 Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Thu, 20 Oct 2022 22:37:39 -0700 Subject: [PATCH 03/32] reorg typings for contract data --- .../src/context/DropsContractProvider.tsx | 142 ++++++------------ packages/zora-drops-utils/src/index.ts | 9 +- .../src/typings/dropsContractTypes.ts | 64 ++++++++ .../zora-drops-utils/src/typings/index.ts | 5 + 4 files changed, 125 insertions(+), 95 deletions(-) create mode 100644 packages/zora-drops-utils/src/typings/dropsContractTypes.ts diff --git a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx index 4568a02..dad7ef0 100644 --- a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx +++ b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx @@ -9,74 +9,13 @@ import zoraDropsABI from '@zoralabs/nft-drop-contracts/dist/artifacts/ERC721Drop import { ethers } from 'ethers' import { useSWRDrop } from '../hooks' import { dateFormat } from '../constants' +import { DropsContractReturnTypes, DropsContractProps } from './../typings' const DEFAULT_MINT_QUANTITY = { name: '1', queryValue: 1, } -export type DropsContractProps = { - children?: React.ReactNode - collectionAddress?: string - networkId?: '1' | '5' - onSuccessCallback?: () => void -} - -export type DropsContractReturnTypes = { - purchase?: () => void - setMintQuantity?: React.ChangeEventHandler - collectionData?: any - collectionAddress?: string - networkId?: '1' | '5' - transaction?: { - purchaseData: any - purchaseLoading: boolean - purchaseSuccess: boolean - txHash?: string - } - totalPrice?: { - raw: string | number - pretty: string | number - } - mintQuantity?: { - name: string - queryValue: number - } - errors: { - unpredictableGasLimit: boolean - insufficientFunds: boolean - } - purchaseLimit?: { - maxAmount?: number - pastAmount?: boolean - prettyMaxAmount?: number | string - } - inventory?: { - totalSupply?: number - totalSold?: number - prettyInventory?: string - } - balance?: { - walletLimit: boolean - walletBalance: number | string - } - mintStatus?: { - text?: string - isEnded?: boolean - isActive?: boolean - startDate?: { - iso?: Date | string - unixtime?: number | string - pretty?: string - } - endDate?: { - iso?: Date | string - unixtime?: number | string - pretty?: string - } - } -} - const DropsContractContext = React.createContext({ purchase: () => {}, transaction: { @@ -123,6 +62,19 @@ const DropsContractContext = React.createContext({ unixtime: undefined, pretty: undefined, }, + preSale: { + presaleStart: { + iso: undefined, + unixtime: undefined, + pretty: undefined, + }, + presaleEnd: { + iso: undefined, + unixtime: undefined, + pretty: undefined, + }, + presaleMerkleRoot: undefined, + }, }, }) @@ -290,38 +242,40 @@ export function DropsContractProvider({ return ( + value={ + { + collectionData, + purchase, + transaction: { + purchaseData, + purchaseLoading, + purchaseSuccess, + txHash: purchaseData && purchaseData?.hash, + }, + mintQuantity, + setMintQuantity: handleUpdateMintQuantity, + totalPrice: { + raw: totalPurchasePrice, + pretty: prettyPurchasePrice, + }, + collectionAddress: collectionAddress, + networkId: networkId, + errors: { + insufficientFunds: insufficientFunds, + unpredictableGasLimit: unpredictableGasLimit, + }, + purchaseLimit, + inventory, + balance, + mintStatus: { + text: undefined, + isEnded: isEnded, + isActive: isActive, + startDate: startDate, + endDate: endDate, + }, + } as DropsContractReturnTypes + }> {children} ) diff --git a/packages/zora-drops-utils/src/index.ts b/packages/zora-drops-utils/src/index.ts index bf95e91..cc7a6e0 100644 --- a/packages/zora-drops-utils/src/index.ts +++ b/packages/zora-drops-utils/src/index.ts @@ -20,7 +20,14 @@ export { export { addIPFSGateway } from './lib/addIPFSGateway' -export type { DropsRequestProps, DropsArrayRequestProps, MetaDataProps } from './typings' +export type { + DropsRequestProps, + DropsArrayRequestProps, + MetaDataProps, + DropsContractReturnTypes, + SaleDate, + DropsContractProps, +} from './typings' /** * Components diff --git a/packages/zora-drops-utils/src/typings/dropsContractTypes.ts b/packages/zora-drops-utils/src/typings/dropsContractTypes.ts new file mode 100644 index 0000000..360ef63 --- /dev/null +++ b/packages/zora-drops-utils/src/typings/dropsContractTypes.ts @@ -0,0 +1,64 @@ +export type DropsContractProps = { + children?: React.ReactNode + collectionAddress?: string + networkId?: '1' | '5' + onSuccessCallback?: () => void +} + +export type SaleDate = { + iso?: Date | string + unixtime?: number | string + pretty?: string +} + +export type DropsContractReturnTypes = { + purchase?: () => void + setMintQuantity?: React.ChangeEventHandler + collectionData?: any + collectionAddress?: string + networkId?: '1' | '5' + transaction?: { + purchaseData: any + purchaseLoading: boolean + purchaseSuccess: boolean + txHash?: string + } + totalPrice?: { + raw: string | number + pretty: string | number + } + mintQuantity?: { + name: string + queryValue: number + } + errors: { + unpredictableGasLimit: boolean + insufficientFunds: boolean + } + purchaseLimit?: { + maxAmount?: number + pastAmount?: boolean + prettyMaxAmount?: number | string + } + inventory?: { + totalSupply?: number + totalSold?: number + prettyInventory?: string + } + balance?: { + walletLimit: boolean + walletBalance: number | string + } + mintStatus?: { + text?: string + isEnded?: boolean + isActive?: boolean + startDate?: SaleDate + endDate?: SaleDate + preSale?: { + presaleStart?: SaleDate + presaleEnd?: SaleDate + presaleMerkleRoot?: string + } + } +} diff --git a/packages/zora-drops-utils/src/typings/index.ts b/packages/zora-drops-utils/src/typings/index.ts index 1619abf..ac8d6f1 100644 --- a/packages/zora-drops-utils/src/typings/index.ts +++ b/packages/zora-drops-utils/src/typings/index.ts @@ -1,2 +1,7 @@ export type { DropsRequestProps, DropsArrayRequestProps } from './requestTypes' export type { MetaDataProps } from './displayTypes' +export type { + DropsContractReturnTypes, + SaleDate, + DropsContractProps, +} from './dropsContractTypes' From 630cb6b19533285724bfc37bef9a1039fcac0981 Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Mon, 31 Oct 2022 10:05:29 -0700 Subject: [PATCH 04/32] bug: import issue --- .../src/components/DropsMinter.tsx | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/packages/zora-drops-utils/src/components/DropsMinter.tsx b/packages/zora-drops-utils/src/components/DropsMinter.tsx index dfbc48b..9d708b7 100644 --- a/packages/zora-drops-utils/src/components/DropsMinter.tsx +++ b/packages/zora-drops-utils/src/components/DropsMinter.tsx @@ -1,4 +1,5 @@ -import React from 'react' +/* @ts-ignore */ +import * as React from 'react' import { DropsContractProvider } from './../context/DropsContractProvider' import { @@ -13,25 +14,14 @@ import { export function DropsMinter({ collectionAddress, networkId = '1', - successCallback, }: { collectionAddress?: string networkId?: '1' | '5' - successCallback?: () => void }) { - const onSuccess = React.useCallback(() => { - if (successCallback) { - successCallback() - } - }, []) - if (!collectionAddress) return null return ( - +
From 6cbe88acb8e0625cf4ce02cd15b833c2286eb100 Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Mon, 31 Oct 2022 11:01:05 -0700 Subject: [PATCH 05/32] update next config to fix strange import errors --- examples/nextjs-dapp/next.config.js | 5 ++++- examples/nextjs-dapp/package.json | 2 ++ examples/nextjs-dapp/src/pages/index.tsx | 1 + examples/nextjs-dapp/tsconfig.json | 4 ++-- .../zora-drops-utils/src/components/drop-components/index.ts | 2 +- packages/zora-drops-utils/src/typings/index.ts | 2 ++ yarn.lock | 5 +++++ 7 files changed, 17 insertions(+), 4 deletions(-) diff --git a/examples/nextjs-dapp/next.config.js b/examples/nextjs-dapp/next.config.js index 2d364ea..27bfc53 100644 --- a/examples/nextjs-dapp/next.config.js +++ b/examples/nextjs-dapp/next.config.js @@ -1,4 +1,7 @@ /** @type {import('next').NextConfig} */ + +const withPreconstruct = require("@preconstruct/next"); + const nextConfig = { reactStrictMode: true, swcMinify: true, @@ -20,4 +23,4 @@ const nextConfig = { }, } -module.exports = nextConfig +module.exports = withPreconstruct({ ...nextConfig }); \ No newline at end of file diff --git a/examples/nextjs-dapp/package.json b/examples/nextjs-dapp/package.json index 4b27a84..a93db50 100644 --- a/examples/nextjs-dapp/package.json +++ b/examples/nextjs-dapp/package.json @@ -12,6 +12,8 @@ "clean": "rimraf --no-glob .next node_modules" }, "dependencies": { + "@preconstruct/next": "^4.0.0", + "@public-assembly/zora-drops-utils": "*", "@rainbow-me/rainbowkit": "^0.6.0", "@tailwindcss/forms": "^0.5.3", "@zoralabs/nft-drop-contracts": "^1.0.1", diff --git a/examples/nextjs-dapp/src/pages/index.tsx b/examples/nextjs-dapp/src/pages/index.tsx index 67de185..8e8599c 100644 --- a/examples/nextjs-dapp/src/pages/index.tsx +++ b/examples/nextjs-dapp/src/pages/index.tsx @@ -12,6 +12,7 @@ function Page() { {TEST_MINT_CONTRACTS.map((edition: any) => )} + ) } diff --git a/examples/nextjs-dapp/tsconfig.json b/examples/nextjs-dapp/tsconfig.json index 1563f3e..b8d5978 100644 --- a/examples/nextjs-dapp/tsconfig.json +++ b/examples/nextjs-dapp/tsconfig.json @@ -7,13 +7,13 @@ "strict": false, "forceConsistentCasingInFileNames": true, "noEmit": true, - "incremental": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, - "jsx": "preserve" + "jsx": "preserve", + "incremental": true }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "exclude": ["node_modules"] diff --git a/packages/zora-drops-utils/src/components/drop-components/index.ts b/packages/zora-drops-utils/src/components/drop-components/index.ts index 4b37b71..89d66e7 100644 --- a/packages/zora-drops-utils/src/components/drop-components/index.ts +++ b/packages/zora-drops-utils/src/components/drop-components/index.ts @@ -2,7 +2,7 @@ * Metadata Components */ -export { Metadata } from './Metadata' +export * from './Metadata' export { MetadataName } from './MetadataName' export { MetadataCreator } from './MetadataCreator' export { MetadataDescription } from './MetadataDescription' diff --git a/packages/zora-drops-utils/src/typings/index.ts b/packages/zora-drops-utils/src/typings/index.ts index ac8d6f1..07dee67 100644 --- a/packages/zora-drops-utils/src/typings/index.ts +++ b/packages/zora-drops-utils/src/typings/index.ts @@ -1,5 +1,7 @@ export type { DropsRequestProps, DropsArrayRequestProps } from './requestTypes' + export type { MetaDataProps } from './displayTypes' + export type { DropsContractReturnTypes, SaleDate, diff --git a/yarn.lock b/yarn.lock index 794a02c..6c02851 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2657,6 +2657,11 @@ pirates "^4.0.1" source-map-support "^0.5.16" +"@preconstruct/next@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@preconstruct/next/-/next-4.0.0.tgz#4d9c64ed68bb7cdc72d35d79d1dbe26ba2cae61e" + integrity sha512-vSrc8wFQgBErU7dKTKSQtr/DLWPHcN9jMoiWOAQodB1+B4Kpqqry6QhGYoRm0DQU5gNL+Rcp+Xb350O1E/gjsg== + "@rainbow-me/rainbowkit@^0.6.0": version "0.6.1" resolved "https://registry.yarnpkg.com/@rainbow-me/rainbowkit/-/rainbowkit-0.6.1.tgz#dd336871d64773a8ae39d2b4fd4d121c55894b88" From cba319195c3bb273959630c554dcddbe1588897c Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Mon, 31 Oct 2022 12:33:52 -0700 Subject: [PATCH 06/32] drops data salesData --- .../nextjs-dapp/src/components/Header.tsx | 3 +- .../nextjs-dapp/src/components/Navigation.tsx | 29 +++++++ .../nextjs-dapp/src/pages/presale-mint.tsx | 16 ++++ .../src/components/DropsData.tsx | 39 +++++++++ .../components/drop-components/Thumbnail.tsx | 2 +- .../src/context/DropsContractProvider.tsx | 20 +++-- .../src/hooks/useSaleStatus.ts | 80 +++++++++++++++++++ packages/zora-drops-utils/src/index.ts | 1 + .../src/typings/dropsContractTypes.ts | 15 ++++ 9 files changed, 196 insertions(+), 9 deletions(-) create mode 100644 examples/nextjs-dapp/src/components/Navigation.tsx create mode 100644 examples/nextjs-dapp/src/pages/presale-mint.tsx create mode 100644 packages/zora-drops-utils/src/components/DropsData.tsx create mode 100644 packages/zora-drops-utils/src/hooks/useSaleStatus.ts diff --git a/examples/nextjs-dapp/src/components/Header.tsx b/examples/nextjs-dapp/src/components/Header.tsx index 664ea66..40ffd14 100644 --- a/examples/nextjs-dapp/src/components/Header.tsx +++ b/examples/nextjs-dapp/src/components/Header.tsx @@ -1,9 +1,10 @@ import { ConnectButton } from './ConnectButton' +import { Navigation } from './Navigation' export function Header() { return (
- Header +
) diff --git a/examples/nextjs-dapp/src/components/Navigation.tsx b/examples/nextjs-dapp/src/components/Navigation.tsx new file mode 100644 index 0000000..5f6e9b6 --- /dev/null +++ b/examples/nextjs-dapp/src/components/Navigation.tsx @@ -0,0 +1,29 @@ +import Link from "next/link" +import { useRouter } from "next/router" + +const pages = [ + { + slug: '/', + title: 'Zora Drops Utils' + }, + { + slug: '/presale-mint', + title: 'Presale Mint' + }, +] + +export function Navigation() { + const router = useRouter() + + return ( +
+ {pages.map((page) => + + {page.title} + + )} +
+ ) +} \ No newline at end of file diff --git a/examples/nextjs-dapp/src/pages/presale-mint.tsx b/examples/nextjs-dapp/src/pages/presale-mint.tsx new file mode 100644 index 0000000..6cd2be3 --- /dev/null +++ b/examples/nextjs-dapp/src/pages/presale-mint.tsx @@ -0,0 +1,16 @@ +import { DropsComponents, DropsContractProvider, DropsData } from "@public-assembly/zora-drops-utils" + +function Page() { + return ( +
+

Presale Mint / Allowlist

+ + + + + +
+ ) +} + +export default Page diff --git a/packages/zora-drops-utils/src/components/DropsData.tsx b/packages/zora-drops-utils/src/components/DropsData.tsx new file mode 100644 index 0000000..315d202 --- /dev/null +++ b/packages/zora-drops-utils/src/components/DropsData.tsx @@ -0,0 +1,39 @@ +/* @ts-ignore */ +import * as React from 'react' +import { useDropsContractProvider } from './../context/DropsContractProvider' + +export function DropsData({ data = {} }: { data?: any }) { + const { + collectionData, + mintStatus, + purchaseLimit, + inventory, + balance, + errors, + saleStatus, + } = useDropsContractProvider() + + const dataToRender = React.useMemo( + () => + collectionData + ? { + collectionData, + mintStatus, + saleStatus, + purchaseLimit, + inventory, + balance, + errors, + } + : data, + [data, collectionData] + ) + + return ( +
+ +
{JSON.stringify(dataToRender, null, 2)}
+
+
+ ) +} diff --git a/packages/zora-drops-utils/src/components/drop-components/Thumbnail.tsx b/packages/zora-drops-utils/src/components/drop-components/Thumbnail.tsx index 209b691..a039532 100644 --- a/packages/zora-drops-utils/src/components/drop-components/Thumbnail.tsx +++ b/packages/zora-drops-utils/src/components/drop-components/Thumbnail.tsx @@ -18,7 +18,7 @@ export function Thumbnail({ ...props }) { className={`drops-ui__thumbnail--component relative aspect-square w-full overflow-hidden`} {...props}>
diff --git a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx index c3ecb8a..f87b2b7 100644 --- a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx +++ b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx @@ -10,6 +10,7 @@ import { ethers } from 'ethers' import { useSWRDrop } from '../hooks' import { dateFormat } from '../constants' import { DropsContractReturnTypes, DropsContractProps } from './../typings' +import { useSaleStatus } from '../hooks/useSaleStatus' const DEFAULT_MINT_QUANTITY = { name: '1', @@ -19,22 +20,23 @@ const DEFAULT_MINT_QUANTITY = { const DropsContractContext = React.createContext({ purchase: () => {}, onMintCallback: () => {}, + setMintQuantity: () => {}, + mintQuantity: DEFAULT_MINT_QUANTITY, transaction: { purchaseData: undefined, purchaseLoading: false, purchaseSuccess: false, txHash: undefined, }, - setMintQuantity: undefined, - collectionData: undefined, - collectionAddress: undefined, - networkId: '1', - totalPrice: undefined, - mintQuantity: DEFAULT_MINT_QUANTITY, errors: { unpredictableGasLimit: false, insufficientFunds: false, }, + networkId: '1', + collectionAddress: undefined, + collectionData: undefined, + totalPrice: undefined, + /* Sales Data */ purchaseLimit: { maxAmount: undefined, pastAmount: undefined, @@ -49,6 +51,7 @@ const DropsContractContext = React.createContext({ walletLimit: false, walletBalance: undefined, }, + saleStatus: undefined, mintStatus: { text: undefined, isEnded: undefined, @@ -77,7 +80,7 @@ const DropsContractContext = React.createContext({ presaleMerkleRoot: undefined, }, }, -}) +} as DropsContractReturnTypes) export function useDropsContractProvider() { return React.useContext(DropsContractContext) @@ -119,6 +122,8 @@ export function DropsContractProvider({ const { address } = useAccount() + const saleStatus = useSaleStatus({ collectionData: collectionData }) + const { data: balanceOf } = useContractRead({ addressOrName: collectionAddress, contractInterface: zoraDropsABI.abi, @@ -277,6 +282,7 @@ export function DropsContractProvider({ startDate: startDate, endDate: endDate, }, + saleStatus: saleStatus, } as DropsContractReturnTypes }> {children} diff --git a/packages/zora-drops-utils/src/hooks/useSaleStatus.ts b/packages/zora-drops-utils/src/hooks/useSaleStatus.ts new file mode 100644 index 0000000..e4e12ee --- /dev/null +++ b/packages/zora-drops-utils/src/hooks/useSaleStatus.ts @@ -0,0 +1,80 @@ +import * as React from 'react' +import { HashZero } from '@ethersproject/constants' +import { dateFormat } from '../constants' + +export function useSaleStatus({ + collectionData, + presale = false, +}: { + collectionData: any + presale?: boolean +}) { + const presaleStart = Number(collectionData?.salesConfig?.presaleStart) * 1000 + const presaleEnd = Number(collectionData?.salesConfig?.presaleEnd) * 1000 + const publicSaleStart = Number(collectionData?.salesConfig?.publicSaleStart) * 1000 + const publicSaleEnd = Number(collectionData?.salesConfig?.publicSaleEnd) * 1000 + + const startDate = presale ? presaleStart : publicSaleStart + const endDate = presale ? presaleEnd : publicSaleEnd + + const startDateFull = React.useMemo(() => { + if (collectionData?.salesConfig?.publicSaleStart) { + const isoDate = new Date( + Number(collectionData?.salesConfig?.publicSaleStart) * 1000 + ) + return { + iso: isoDate, + unixTime: collectionData?.salesConfig?.publicSaleStart, + pretty: `${isoDate.toLocaleString(...dateFormat)}`, + } + } + }, [collectionData?.salesConfig?.publicSaleStart]) + + const endDateFull = React.useMemo(() => { + if (collectionData?.salesConfig?.publicSaleEnd) { + const isoDate = new Date(Number(collectionData?.salesConfig?.publicSaleEnd) * 1000) + const formattedEndDate = `${isoDate.toLocaleString(...dateFormat)}` + return { + iso: isoDate, + unixTime: collectionData?.salesConfig?.publicSaleEnd, + pretty: formattedEndDate !== 'Invalid Date' ? formattedEndDate : undefined, + } + } + }, [collectionData?.salesConfig?.publicSaleEnd]) + + const isSoldOut = + collectionData?.maxSupply && + collectionData?.totalMinted && + collectionData?.totalMinted >= collectionData?.maxSupply + + const saleIsActive = startDate <= Date.now() && endDate > Date.now() + const saleNotStarted = startDate > Date.now() + const saleIsFinished = endDate < Date.now() + + const publicSaleExists = publicSaleStart + publicSaleEnd > 0 + const presaleExists = presaleStart + presaleEnd > 0 + + const merkleRootExists = + collectionData?.salesConfig?.presaleMerkleRoot !== HashZero.toString() + + const presaleIsActive = + merkleRootExists && presaleStart <= Date.now() && presaleEnd > Date.now() + + const merkleRoot = merkleRootExists && collectionData?.salesConfig?.presaleMerkleRoot + + return { + startDate, + endDate, + startDateFull, + endDateFull, + isSoldOut, + saleIsActive, + saleNotStarted, + saleIsFinished, + merkleRootExists, + presaleExists, + publicSaleExists, + presaleIsActive, + presaleMerkleRoot: merkleRoot, + } +} diff --git a/packages/zora-drops-utils/src/index.ts b/packages/zora-drops-utils/src/index.ts index cc7a6e0..4bb492e 100644 --- a/packages/zora-drops-utils/src/index.ts +++ b/packages/zora-drops-utils/src/index.ts @@ -78,3 +78,4 @@ export const DropsComponents = { } export { DropsMinter } from './components/DropsMinter' +export { DropsData } from './components/DropsData' diff --git a/packages/zora-drops-utils/src/typings/dropsContractTypes.ts b/packages/zora-drops-utils/src/typings/dropsContractTypes.ts index 2813018..8ab39e8 100644 --- a/packages/zora-drops-utils/src/typings/dropsContractTypes.ts +++ b/packages/zora-drops-utils/src/typings/dropsContractTypes.ts @@ -63,4 +63,19 @@ export type DropsContractReturnTypes = { presaleMerkleRoot?: string } } + saleStatus?: { + startDate?: number + endDate?: number + startDateFull?: SaleDate + endDateFull?: SaleDate + isSoldOut?: boolean + saleIsActive?: boolean + saleNotStarted?: boolean + saleIsFinished?: boolean + merkleRootExists?: boolean + presaleExists?: boolean + publicSaleExists?: boolean + presaleIsActive?: boolean + presaleMerkleRoot?: string + } } From 24399e72ad6e8e1062691cbd31f9f8f6b806ee71 Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Mon, 31 Oct 2022 13:29:51 -0700 Subject: [PATCH 07/32] added in presale config data, also extended HTML props for DropsMinter --- examples/nextjs-dapp/src/pages/index.tsx | 23 +++++++++++++++---- .../src/components/DropsMinter.tsx | 14 +++++++---- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/examples/nextjs-dapp/src/pages/index.tsx b/examples/nextjs-dapp/src/pages/index.tsx index 8e8599c..58ef6d1 100644 --- a/examples/nextjs-dapp/src/pages/index.tsx +++ b/examples/nextjs-dapp/src/pages/index.tsx @@ -1,18 +1,31 @@ import { DropsMinter } from '@public-assembly/zora-drops-utils' - +/* const TEST_MINT_CONTRACTS = [ '0xE3d8572a5B1e47cD87A6222A5F989332E88DeA69', '0x47191cb94c0b6925db9f15e000cf8e3e8864fc9b', ] +*/ + +const TESTNET_MINT_CONTRACTS = [ + '0xa3ba36ce1af5fa6bb8ab35a61c8ae72293b38b32', + '0x83b9f7ddd165e32ebea7da1b54405bf8c16708f7', + '0x31bed60ae0627575725f4460139f095cd9e4a08b' +] function Page() { return (

Nextjs App

- {TEST_MINT_CONTRACTS.map((edition: any) => - - )} - +
+ {TESTNET_MINT_CONTRACTS.map((edition: any) => + + )} +
) } diff --git a/packages/zora-drops-utils/src/components/DropsMinter.tsx b/packages/zora-drops-utils/src/components/DropsMinter.tsx index 9d708b7..461b2c0 100644 --- a/packages/zora-drops-utils/src/components/DropsMinter.tsx +++ b/packages/zora-drops-utils/src/components/DropsMinter.tsx @@ -11,19 +11,23 @@ import { TxStatus, } from './drop-components' +interface DropsMinterProps extends React.HTMLAttributes { + collectionAddress?: string + networkId?: '1' | '5' +} + export function DropsMinter({ collectionAddress, networkId = '1', -}: { - collectionAddress?: string - networkId?: '1' | '5' -}) { + ...props +}: DropsMinterProps) { if (!collectionAddress) return null return (
+ className={`drops-ui__minter--wrapper border-1 grid grid-cols-3 gap-4 rounded-xl border border-solid p-4`} + {...props}>
From 05ae445be9e548a2de8da64aa03f24bbc8e89498 Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Mon, 31 Oct 2022 14:03:45 -0700 Subject: [PATCH 08/32] publish 0.1.51 --- .changeset/smart-jobs-breathe.md | 5 +++++ packages/zora-drops-utils/package.json | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/smart-jobs-breathe.md diff --git a/.changeset/smart-jobs-breathe.md b/.changeset/smart-jobs-breathe.md new file mode 100644 index 0000000..3e0b381 --- /dev/null +++ b/.changeset/smart-jobs-breathe.md @@ -0,0 +1,5 @@ +--- +'@public-assembly/zora-drops-utils': minor +--- + +Added presale data diff --git a/packages/zora-drops-utils/package.json b/packages/zora-drops-utils/package.json index 4b5866f..cae059b 100644 --- a/packages/zora-drops-utils/package.json +++ b/packages/zora-drops-utils/package.json @@ -1,6 +1,6 @@ { "name": "@public-assembly/zora-drops-utils", - "version": "0.1.5", + "version": "0.1.51", "description": "Example package with some web3 peer dependencies", "main": "dist/public-assembly-zora-drops-utils.cjs.js", "module": "dist/public-assembly-zora-drops-utils.esm.js", @@ -27,5 +27,8 @@ "devDependencies": { "react": "^18.2.0", "react-dom": "^18.2.0" + }, + "dependencies": { + "@ethersproject/constants": "^5.7.0" } } From 1d96d05eb7e3ca338a02079206197b2094a73896 Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Mon, 31 Oct 2022 16:47:08 -0700 Subject: [PATCH 09/32] grabbing contractURI for drops style contract --- .../nextjs-dapp/src/pages/presale-mint.tsx | 10 +++++++- .../drop-components/MetadataDescription.tsx | 2 +- .../zora-drops-utils/src/data/dropsFetcher.ts | 25 ++++++++++++++++++- .../zora-drops-utils/src/data/dropsQuery.ts | 2 +- .../src/hooks/useSaleStatus.ts | 25 +++++++++++++++++++ .../src/typings/dropsContractTypes.ts | 2 ++ 6 files changed, 62 insertions(+), 4 deletions(-) diff --git a/examples/nextjs-dapp/src/pages/presale-mint.tsx b/examples/nextjs-dapp/src/pages/presale-mint.tsx index 6cd2be3..d807a60 100644 --- a/examples/nextjs-dapp/src/pages/presale-mint.tsx +++ b/examples/nextjs-dapp/src/pages/presale-mint.tsx @@ -4,9 +4,17 @@ function Page() { return (

Presale Mint / Allowlist

- + + + + +
+ + + +
diff --git a/packages/zora-drops-utils/src/components/drop-components/MetadataDescription.tsx b/packages/zora-drops-utils/src/components/drop-components/MetadataDescription.tsx index 891a8eb..4be0711 100644 --- a/packages/zora-drops-utils/src/components/drop-components/MetadataDescription.tsx +++ b/packages/zora-drops-utils/src/components/drop-components/MetadataDescription.tsx @@ -3,7 +3,7 @@ import React from 'react' import { useDropsContractProvider } from '../../context' import { MetaDataProps } from '../../typings' -export function MetadataDescription({ label = 'Creator:', ...props }: MetaDataProps) { +export function MetadataDescription({ label = 'Description:', ...props }: MetaDataProps) { const { collectionData } = useDropsContractProvider() return (

diff --git a/packages/zora-drops-utils/src/data/dropsFetcher.ts b/packages/zora-drops-utils/src/data/dropsFetcher.ts index cbc0a81..c0b0d00 100644 --- a/packages/zora-drops-utils/src/data/dropsFetcher.ts +++ b/packages/zora-drops-utils/src/data/dropsFetcher.ts @@ -1,5 +1,24 @@ import { GraphQLClient } from 'graphql-request' import { returnDropEndpoint, ChainIds } from '../constants' +import { addIPFSGateway } from '../lib' + +export async function decodeContractUri(contractURI?: string) { + const url = contractURI ? addIPFSGateway(contractURI) : undefined + try { + const contractURIData = await fetch(url) + .then((res) => res.text()) + .then((t) => { + try { + return JSON.parse(t.replace(/\\n/g, ' ')) + } catch (e) { + return undefined + } + }) + return contractURIData + } catch (err) { + console.error(err) + } +} export async function dropsFetcher( chainId: ChainIds, @@ -14,6 +33,10 @@ export async function dropsFetcher( const client = new GraphQLClient(endpoint, { headers: {} }) const data = await client.request(query, variables).then((data) => data?.erc721Drop) + const contractURI = await decodeContractUri(data?.contractURI) - return data + return { + ...data, + contractURI: contractURI, + } } diff --git a/packages/zora-drops-utils/src/data/dropsQuery.ts b/packages/zora-drops-utils/src/data/dropsQuery.ts index 6a2d2b4..5fdd4ee 100644 --- a/packages/zora-drops-utils/src/data/dropsQuery.ts +++ b/packages/zora-drops-utils/src/data/dropsQuery.ts @@ -5,6 +5,7 @@ export const EDITIONS_STYLE_CONTRACT_METADATA = gql` name owner symbol + contractURI salesConfig { id publicSalePrice @@ -21,7 +22,6 @@ export const EDITIONS_STYLE_CONTRACT_METADATA = gql` editionMetadata { imageURI animationURI - contractURI description } creator diff --git a/packages/zora-drops-utils/src/hooks/useSaleStatus.ts b/packages/zora-drops-utils/src/hooks/useSaleStatus.ts index e4e12ee..20bf0f3 100644 --- a/packages/zora-drops-utils/src/hooks/useSaleStatus.ts +++ b/packages/zora-drops-utils/src/hooks/useSaleStatus.ts @@ -42,6 +42,29 @@ export function useSaleStatus({ } }, [collectionData?.salesConfig?.publicSaleEnd]) + const presaleStartDateFull = React.useMemo(() => { + if (collectionData?.salesConfig?.preSaleStart) { + const isoDate = new Date(Number(collectionData?.salesConfig?.preSaleStart) * 1000) + return { + iso: isoDate, + unixTime: collectionData?.salesConfig?.preSaleStart, + pretty: `${isoDate.toLocaleString(...dateFormat)}`, + } + } + }, [collectionData?.salesConfig?.preSaleStart]) + + const presaleEndDateFull = React.useMemo(() => { + if (collectionData?.salesConfig?.preSaleEnd) { + const isoDate = new Date(Number(collectionData?.salesConfig?.preSaleEnd) * 1000) + const formattedEndDate = `${isoDate.toLocaleString(...dateFormat)}` + return { + iso: isoDate, + unixTime: collectionData?.salesConfig?.preSaleEnd, + pretty: formattedEndDate !== 'Invalid Date' ? formattedEndDate : undefined, + } + } + }, [collectionData?.salesConfig?.preSaleEnd]) + const isSoldOut = collectionData?.maxSupply && collectionData?.totalMinted && @@ -67,6 +90,8 @@ export function useSaleStatus({ endDate, startDateFull, endDateFull, + presaleStartDateFull, + presaleEndDateFull, isSoldOut, saleIsActive, saleNotStarted, diff --git a/packages/zora-drops-utils/src/typings/dropsContractTypes.ts b/packages/zora-drops-utils/src/typings/dropsContractTypes.ts index 8ab39e8..daaf39f 100644 --- a/packages/zora-drops-utils/src/typings/dropsContractTypes.ts +++ b/packages/zora-drops-utils/src/typings/dropsContractTypes.ts @@ -68,6 +68,8 @@ export type DropsContractReturnTypes = { endDate?: number startDateFull?: SaleDate endDateFull?: SaleDate + presaleStartDateFull?: SaleDate + presaleEndDateFull?: SaleDate isSoldOut?: boolean saleIsActive?: boolean saleNotStarted?: boolean From 590415608ec95c92cf70decae9f4f124199ef127 Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Tue, 1 Nov 2022 12:29:54 -0700 Subject: [PATCH 10/32] add presale data to drops data component --- examples/nextjs-dapp/src/pages/presale-mint.tsx | 7 ------- .../zora-drops-utils/src/components/DropsData.tsx | 13 +++++++++++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/examples/nextjs-dapp/src/pages/presale-mint.tsx b/examples/nextjs-dapp/src/pages/presale-mint.tsx index d807a60..d4dbb86 100644 --- a/examples/nextjs-dapp/src/pages/presale-mint.tsx +++ b/examples/nextjs-dapp/src/pages/presale-mint.tsx @@ -4,13 +4,6 @@ function Page() { return (

Presale Mint / Allowlist

- - - - - - -
diff --git a/packages/zora-drops-utils/src/components/DropsData.tsx b/packages/zora-drops-utils/src/components/DropsData.tsx index 315d202..1a66804 100644 --- a/packages/zora-drops-utils/src/components/DropsData.tsx +++ b/packages/zora-drops-utils/src/components/DropsData.tsx @@ -1,6 +1,8 @@ /* @ts-ignore */ import * as React from 'react' import { useDropsContractProvider } from './../context/DropsContractProvider' +import { useAllowlistEntry } from '../hooks/useAllowlistEntry' +import { useAccount } from 'wagmi' export function DropsData({ data = {} }: { data?: any }) { const { @@ -13,6 +15,13 @@ export function DropsData({ data = {} }: { data?: any }) { saleStatus, } = useDropsContractProvider() + const { address } = useAccount() + + const { allowlistEntry, accessAllowed } = useAllowlistEntry({ + merkleRoot: saleStatus?.presaleMerkleRoot, + address: address, + }) + const dataToRender = React.useMemo( () => collectionData @@ -24,6 +33,10 @@ export function DropsData({ data = {} }: { data?: any }) { inventory, balance, errors, + allowList: { + allowlistEntry, + accessAllowed, + }, } : data, [data, collectionData] From c59ae1818f6e955519ebfe1a095a7cc2dcc14681 Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Tue, 1 Nov 2022 13:26:11 -0700 Subject: [PATCH 11/32] presale config setup --- .../components/drop-components/MintButton.tsx | 75 ++++++++++++++----- .../src/context/DropsContractProvider.tsx | 67 ++++++++++++++--- .../src/typings/dropsContractTypes.ts | 1 + 3 files changed, 111 insertions(+), 32 deletions(-) diff --git a/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx b/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx index 62448a4..d96b0b2 100644 --- a/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx +++ b/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx @@ -1,5 +1,7 @@ import React from 'react' +import { useAllowlistEntry } from '../../hooks/useAllowlistEntry' import { useDropsContractProvider } from './../../context' +import { useAccount } from 'wagmi' export function MintButton({ mintCta, @@ -17,14 +19,28 @@ export function MintButton({ appendQuantity?: boolean mintButtonCallback?: () => void }) { - const { mintQuantity, errors, balance, purchase, onMintCallback } = - useDropsContractProvider() + const { address } = useAccount() + + const { + mintQuantity, + errors, + balance, + purchase, + purchasePresale, + onMintCallback, + saleStatus, + } = useDropsContractProvider() const cannotMint = React.useMemo( () => errors?.insufficientFunds || balance?.walletLimit, [errors, balance, errors?.insufficientFunds, balance?.walletLimit] ) + const { accessAllowed } = useAllowlistEntry({ + merkleRoot: saleStatus?.presaleMerkleRoot, + address: address, + }) + const quantity = React.useMemo( () => `${tokenDescriptor}${ @@ -44,26 +60,45 @@ export function MintButton({ mintButtonCallback() }, [purchase, onMintCallback, mintButtonCallback]) + const handlePresaleMintCall = React.useCallback(() => { + purchasePresale() + }, [purchasePresale]) + return (
- + {!saleStatus?.saleIsActive && saleStatus?.presaleIsActive && ( +
+ {accessAllowed ? ( + + ) : ( +
Public sale starts: {saleStatus?.startDateFull?.pretty}
+ )} +
+ )} + {saleStatus?.saleIsActive && !saleStatus?.presaleIsActive && ( + + )}
) } diff --git a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx index f87b2b7..21d5ed9 100644 --- a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx +++ b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx @@ -11,6 +11,7 @@ import { useSWRDrop } from '../hooks' import { dateFormat } from '../constants' import { DropsContractReturnTypes, DropsContractProps } from './../typings' import { useSaleStatus } from '../hooks/useSaleStatus' +import { useAllowlistEntry } from '../hooks/useAllowlistEntry' const DEFAULT_MINT_QUANTITY = { name: '1', @@ -19,6 +20,7 @@ const DEFAULT_MINT_QUANTITY = { const DropsContractContext = React.createContext({ purchase: () => {}, + purchasePresale: () => {}, onMintCallback: () => {}, setMintQuantity: () => {}, mintQuantity: DEFAULT_MINT_QUANTITY, @@ -132,6 +134,7 @@ export function DropsContractProvider({ watch: true, }) + /* PublicSale Purchase */ const { config, error } = usePrepareContractWrite({ addressOrName: collectionAddress, contractInterface: zoraDropsABI.abi, @@ -142,6 +145,57 @@ export function DropsContractProvider({ }, }) + const { + write: purchase, + data: purchaseData, + isLoading: purchaseLoading, + isSuccess: purchaseSuccess, + } = useContractWrite({ + ...config, + onSuccess() { + onSuccessCallback() + }, + }) + + /* PreSale Purchase */ + const { allowlistEntry } = useAllowlistEntry({ + merkleRoot: saleStatus?.presaleMerkleRoot, + address: address, + }) + + const { + config: presalePurchaseConfig, + // error: presalePurchaseError + } = usePrepareContractWrite({ + addressOrName: collectionAddress, + contractInterface: zoraDropsABI.abi, + functionName: 'purchasePresale', + args: [ + mintQuantity.queryValue, + allowlistEntry?.maxCanMint, + allowlistEntry?.price, + allowlistEntry?.proof[0], + ], + overrides: { + value: totalPurchasePrice, + }, + }) + + const { + write: purchasePresale, + /* + data: presalePurchaseData, + isLoading: presalePurchaseLoading, + isSuccess: presalePurchaseSuccess, + */ + } = useContractWrite({ + ...presalePurchaseConfig, + onSuccess() { + onSuccessCallback() + }, + }) + + /* Checks */ const insufficientFunds = React.useMemo(() => { if (error) { /* @ts-ignore */ @@ -196,18 +250,6 @@ export function DropsContractProvider({ } }, [totalPurchasePrice]) - const { - write: purchase, - data: purchaseData, - isLoading: purchaseLoading, - isSuccess: purchaseSuccess, - } = useContractWrite({ - ...config, - onSuccess() { - onSuccessCallback() - }, - }) - const startDate = React.useMemo(() => { if (collectionData?.salesConfig?.publicSaleStart) { const isoDate = new Date( @@ -254,6 +296,7 @@ export function DropsContractProvider({ collectionData, onMintCallback: onMintCallback, purchase, + purchasePresale, transaction: { purchaseData, purchaseLoading, diff --git a/packages/zora-drops-utils/src/typings/dropsContractTypes.ts b/packages/zora-drops-utils/src/typings/dropsContractTypes.ts index daaf39f..9b7e996 100644 --- a/packages/zora-drops-utils/src/typings/dropsContractTypes.ts +++ b/packages/zora-drops-utils/src/typings/dropsContractTypes.ts @@ -14,6 +14,7 @@ export type SaleDate = { export type DropsContractReturnTypes = { purchase?: () => void + purchasePresale?: () => void onMintCallback: () => void setMintQuantity?: React.ChangeEventHandler collectionData?: any From 308ab2c885df66c39e74b4d52c2fe863e462890c Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Tue, 1 Nov 2022 15:23:34 -0700 Subject: [PATCH 12/32] added typechain and set up contract writes to use it --- package.json | 3 - .../components/drop-components/MintButton.tsx | 8 +- .../typechain/DropMetadataRenderer.ts | 382 ++++ .../typechain/DummyMetadataRenderer.ts | 119 ++ .../src/constants/typechain/ERC1967Proxy.ts | 92 + .../src/constants/typechain/ERC721Drop.ts | 1851 +++++++++++++++++ .../constants/typechain/ERC721DropProxy.ts | 92 + .../typechain/ERC721DropStorageV1.ts | 158 ++ .../IERC721OnChainDataMock.ts | 148 ++ .../EditionMetadataRenderer.t.sol/index.ts | 4 + .../typechain/EditionMetadataRenderer.ts | 328 +++ .../src/constants/typechain/FundsReceiver.ts | 68 + .../src/constants/typechain/IBeacon.ts | 76 + .../src/constants/typechain/IERC721Drop.ts | 476 +++++ .../constants/typechain/IMetadataRenderer.ts | 119 ++ .../src/constants/typechain/IZoraDrop.ts | 343 +++ .../constants/typechain/IZoraFeeManager.ts | 96 + .../TestAdmin.ts | 102 + .../MetadataRenderAdminCheck.t.sol/index.ts | 4 + .../typechain/MetadataRenderAdminCheck.ts | 50 + .../typechain/MockMetadataRenderer.ts | 119 ++ .../constants/typechain/OwnableSkeleton.ts | 100 + .../src/constants/typechain/Proxy.ts | 50 + .../src/constants/typechain/SharedNFTLogic.ts | 268 +++ .../src/constants/typechain/Version.ts | 76 + .../src/constants/typechain/ZoraFeeManager.ts | 245 +++ .../typechain/ZoraNFTCreatorProxy.ts | 92 + .../constants/typechain/ZoraNFTCreatorV1.ts | 663 ++++++ .../typechain/ZoraNFTDropDeployer.ts | 156 ++ .../src/constants/typechain/common.ts | 38 + .../DropMetadataRenderer__factory.ts | 300 +++ .../DummyMetadataRenderer__factory.ts | 107 + .../factories/ERC1967Proxy__factory.ts | 136 ++ .../factories/ERC721DropProxy__factory.ts | 136 ++ .../factories/ERC721DropStorageV1__factory.ts | 152 ++ .../factories/ERC721Drop__factory.ts | 1671 +++++++++++++++ .../IERC721OnChainDataMock__factory.ts | 169 ++ .../EditionMetadataRenderer.t.sol/index.ts | 4 + .../EditionMetadataRenderer__factory.ts | 285 +++ .../factories/FundsReceiver__factory.ts | 79 + .../typechain/factories/IBeacon__factory.ts | 33 + .../factories/IERC721Drop__factory.ts | 467 +++++ .../factories/IMetadataRenderer__factory.ts | 68 + .../factories/IZoraFeeManager__factory.ts | 44 + .../TestAdmin__factory.ts | 83 + .../MetadataRenderAdminCheck.t.sol/index.ts | 4 + .../MetadataRenderAdminCheck__factory.ts | 67 + .../MockMetadataRenderer__factory.ts | 107 + .../factories/OwnableSkeleton__factory.ts | 88 + .../typechain/factories/Proxy__factory.ts | 28 + .../factories/SharedNFTLogic__factory.ts | 225 ++ .../typechain/factories/Version__factory.ts | 82 + .../factories/ZoraFeeManager__factory.ts | 193 ++ .../factories/ZoraNFTCreatorProxy__factory.ts | 142 ++ .../factories/ZoraNFTCreatorV1__factory.ts | 611 ++++++ .../constants/typechain/factories/index.ts | 26 + .../src/constants/typechain/index.ts | 54 + .../src/context/DropsContractProvider.tsx | 270 +-- .../src/typings/dropsContractTypes.ts | 17 +- .../zora-drops-utils/src/typings/index.ts | 1 + tsconfig.json | 9 +- 61 files changed, 11803 insertions(+), 181 deletions(-) create mode 100644 packages/zora-drops-utils/src/constants/typechain/DropMetadataRenderer.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/DummyMetadataRenderer.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/ERC1967Proxy.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/ERC721Drop.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/ERC721DropProxy.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/ERC721DropStorageV1.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/EditionMetadataRenderer.t.sol/IERC721OnChainDataMock.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/EditionMetadataRenderer.t.sol/index.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/EditionMetadataRenderer.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/FundsReceiver.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/IBeacon.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/IERC721Drop.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/IMetadataRenderer.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/IZoraDrop.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/IZoraFeeManager.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/MetadataRenderAdminCheck.t.sol/TestAdmin.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/MetadataRenderAdminCheck.t.sol/index.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/MetadataRenderAdminCheck.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/MockMetadataRenderer.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/OwnableSkeleton.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/Proxy.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/SharedNFTLogic.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/Version.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/ZoraFeeManager.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/ZoraNFTCreatorProxy.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/ZoraNFTCreatorV1.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/ZoraNFTDropDeployer.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/common.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/DropMetadataRenderer__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/DummyMetadataRenderer__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/ERC1967Proxy__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/ERC721DropProxy__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/ERC721DropStorageV1__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/ERC721Drop__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/EditionMetadataRenderer.t.sol/IERC721OnChainDataMock__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/EditionMetadataRenderer.t.sol/index.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/EditionMetadataRenderer__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/FundsReceiver__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/IBeacon__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/IERC721Drop__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/IMetadataRenderer__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/IZoraFeeManager__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/MetadataRenderAdminCheck.t.sol/TestAdmin__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/MetadataRenderAdminCheck.t.sol/index.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/MetadataRenderAdminCheck__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/MockMetadataRenderer__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/OwnableSkeleton__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/Proxy__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/SharedNFTLogic__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/Version__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/ZoraFeeManager__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/ZoraNFTCreatorProxy__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/ZoraNFTCreatorV1__factory.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/factories/index.ts create mode 100644 packages/zora-drops-utils/src/constants/typechain/index.ts diff --git a/package.json b/package.json index 40faf58..a14b3fa 100644 --- a/package.json +++ b/package.json @@ -61,9 +61,6 @@ ], "*.json": [ "prettier --write" - ], - "**/*.{ts,tsx}": [ - "tsc-files --noEmit" ] }, "engines": { diff --git a/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx b/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx index d96b0b2..332533d 100644 --- a/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx +++ b/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx @@ -36,7 +36,7 @@ export function MintButton({ [errors, balance, errors?.insufficientFunds, balance?.walletLimit] ) - const { accessAllowed } = useAllowlistEntry({ + const { accessAllowed, allowlistEntry } = useAllowlistEntry({ merkleRoot: saleStatus?.presaleMerkleRoot, address: address, }) @@ -61,8 +61,10 @@ export function MintButton({ }, [purchase, onMintCallback, mintButtonCallback]) const handlePresaleMintCall = React.useCallback(() => { - purchasePresale() - }, [purchasePresale]) + purchasePresale(mintQuantity?.queryValue, allowlistEntry) + onMintCallback() + mintButtonCallback() + }, [purchasePresale, mintQuantity?.queryValue, allowlistEntry]) return (
diff --git a/packages/zora-drops-utils/src/constants/typechain/DropMetadataRenderer.ts b/packages/zora-drops-utils/src/constants/typechain/DropMetadataRenderer.ts new file mode 100644 index 0000000..2b77ef2 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/DropMetadataRenderer.ts @@ -0,0 +1,382 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface DropMetadataRendererInterface extends utils.Interface { + functions: { + 'contractURI()': FunctionFragment + 'initializeWithData(bytes)': FunctionFragment + 'metadataBaseByContract(address)': FunctionFragment + 'provenanceHashes(address)': FunctionFragment + 'tokenURI(uint256)': FunctionFragment + 'updateMetadataBase(address,string,string)': FunctionFragment + 'updateMetadataBaseWithDetails(address,string,string,string,uint256)': FunctionFragment + 'updateProvenanceHash(address,bytes32)': FunctionFragment + } + + getFunction( + nameOrSignatureOrTopic: + | 'contractURI' + | 'initializeWithData' + | 'metadataBaseByContract' + | 'provenanceHashes' + | 'tokenURI' + | 'updateMetadataBase' + | 'updateMetadataBaseWithDetails' + | 'updateProvenanceHash' + ): FunctionFragment + + encodeFunctionData(functionFragment: 'contractURI', values?: undefined): string + encodeFunctionData(functionFragment: 'initializeWithData', values: [BytesLike]): string + encodeFunctionData(functionFragment: 'metadataBaseByContract', values: [string]): string + encodeFunctionData(functionFragment: 'provenanceHashes', values: [string]): string + encodeFunctionData(functionFragment: 'tokenURI', values: [BigNumberish]): string + encodeFunctionData( + functionFragment: 'updateMetadataBase', + values: [string, string, string] + ): string + encodeFunctionData( + functionFragment: 'updateMetadataBaseWithDetails', + values: [string, string, string, string, BigNumberish] + ): string + encodeFunctionData( + functionFragment: 'updateProvenanceHash', + values: [string, BytesLike] + ): string + + decodeFunctionResult(functionFragment: 'contractURI', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'initializeWithData', data: BytesLike): Result + decodeFunctionResult( + functionFragment: 'metadataBaseByContract', + data: BytesLike + ): Result + decodeFunctionResult(functionFragment: 'provenanceHashes', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'tokenURI', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'updateMetadataBase', data: BytesLike): Result + decodeFunctionResult( + functionFragment: 'updateMetadataBaseWithDetails', + data: BytesLike + ): Result + decodeFunctionResult(functionFragment: 'updateProvenanceHash', data: BytesLike): Result + + events: { + 'MetadataUpdated(address,string,string,string,uint256)': EventFragment + 'ProvenanceHashUpdated(address,bytes32)': EventFragment + } + + getEvent(nameOrSignatureOrTopic: 'MetadataUpdated'): EventFragment + getEvent(nameOrSignatureOrTopic: 'ProvenanceHashUpdated'): EventFragment +} + +export interface MetadataUpdatedEventObject { + target: string + metadataBase: string + metadataExtension: string + contractURI: string + freezeAt: BigNumber +} +export type MetadataUpdatedEvent = TypedEvent< + [string, string, string, string, BigNumber], + MetadataUpdatedEventObject +> + +export type MetadataUpdatedEventFilter = TypedEventFilter + +export interface ProvenanceHashUpdatedEventObject { + target: string + provenanceHash: string +} +export type ProvenanceHashUpdatedEvent = TypedEvent< + [string, string], + ProvenanceHashUpdatedEventObject +> + +export type ProvenanceHashUpdatedEventFilter = + TypedEventFilter + +export interface DropMetadataRenderer extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: DropMetadataRendererInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + contractURI(overrides?: CallOverrides): Promise<[string]> + + initializeWithData( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + metadataBaseByContract( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, string, string, BigNumber] & { + base: string + extension: string + contractURI: string + freezeAt: BigNumber + } + > + + provenanceHashes(arg0: string, overrides?: CallOverrides): Promise<[string]> + + tokenURI(tokenId: BigNumberish, overrides?: CallOverrides): Promise<[string]> + + updateMetadataBase( + target: string, + baseUri: string, + newContractUri: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + updateMetadataBaseWithDetails( + target: string, + metadataBase: string, + metadataExtension: string, + newContractURI: string, + freezeAt: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + updateProvenanceHash( + target: string, + provenanceHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + contractURI(overrides?: CallOverrides): Promise + + initializeWithData( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + metadataBaseByContract( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, string, string, BigNumber] & { + base: string + extension: string + contractURI: string + freezeAt: BigNumber + } + > + + provenanceHashes(arg0: string, overrides?: CallOverrides): Promise + + tokenURI(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + updateMetadataBase( + target: string, + baseUri: string, + newContractUri: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + updateMetadataBaseWithDetails( + target: string, + metadataBase: string, + metadataExtension: string, + newContractURI: string, + freezeAt: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + updateProvenanceHash( + target: string, + provenanceHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + callStatic: { + contractURI(overrides?: CallOverrides): Promise + + initializeWithData(data: BytesLike, overrides?: CallOverrides): Promise + + metadataBaseByContract( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, string, string, BigNumber] & { + base: string + extension: string + contractURI: string + freezeAt: BigNumber + } + > + + provenanceHashes(arg0: string, overrides?: CallOverrides): Promise + + tokenURI(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + updateMetadataBase( + target: string, + baseUri: string, + newContractUri: string, + overrides?: CallOverrides + ): Promise + + updateMetadataBaseWithDetails( + target: string, + metadataBase: string, + metadataExtension: string, + newContractURI: string, + freezeAt: BigNumberish, + overrides?: CallOverrides + ): Promise + + updateProvenanceHash( + target: string, + provenanceHash: BytesLike, + overrides?: CallOverrides + ): Promise + } + + filters: { + 'MetadataUpdated(address,string,string,string,uint256)'( + target?: string | null, + metadataBase?: null, + metadataExtension?: null, + contractURI?: null, + freezeAt?: null + ): MetadataUpdatedEventFilter + MetadataUpdated( + target?: string | null, + metadataBase?: null, + metadataExtension?: null, + contractURI?: null, + freezeAt?: null + ): MetadataUpdatedEventFilter + + 'ProvenanceHashUpdated(address,bytes32)'( + target?: string | null, + provenanceHash?: null + ): ProvenanceHashUpdatedEventFilter + ProvenanceHashUpdated( + target?: string | null, + provenanceHash?: null + ): ProvenanceHashUpdatedEventFilter + } + + estimateGas: { + contractURI(overrides?: CallOverrides): Promise + + initializeWithData( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + metadataBaseByContract(arg0: string, overrides?: CallOverrides): Promise + + provenanceHashes(arg0: string, overrides?: CallOverrides): Promise + + tokenURI(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + updateMetadataBase( + target: string, + baseUri: string, + newContractUri: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + updateMetadataBaseWithDetails( + target: string, + metadataBase: string, + metadataExtension: string, + newContractURI: string, + freezeAt: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + updateProvenanceHash( + target: string, + provenanceHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + populateTransaction: { + contractURI(overrides?: CallOverrides): Promise + + initializeWithData( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + metadataBaseByContract( + arg0: string, + overrides?: CallOverrides + ): Promise + + provenanceHashes( + arg0: string, + overrides?: CallOverrides + ): Promise + + tokenURI( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise + + updateMetadataBase( + target: string, + baseUri: string, + newContractUri: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + updateMetadataBaseWithDetails( + target: string, + metadataBase: string, + metadataExtension: string, + newContractURI: string, + freezeAt: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + updateProvenanceHash( + target: string, + provenanceHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/DummyMetadataRenderer.ts b/packages/zora-drops-utils/src/constants/typechain/DummyMetadataRenderer.ts new file mode 100644 index 0000000..33beb8b --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/DummyMetadataRenderer.ts @@ -0,0 +1,119 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface DummyMetadataRendererInterface extends utils.Interface { + functions: { + 'contractURI()': FunctionFragment + 'initializeWithData(bytes)': FunctionFragment + 'tokenURI(uint256)': FunctionFragment + } + + getFunction( + nameOrSignatureOrTopic: 'contractURI' | 'initializeWithData' | 'tokenURI' + ): FunctionFragment + + encodeFunctionData(functionFragment: 'contractURI', values?: undefined): string + encodeFunctionData(functionFragment: 'initializeWithData', values: [BytesLike]): string + encodeFunctionData(functionFragment: 'tokenURI', values: [BigNumberish]): string + + decodeFunctionResult(functionFragment: 'contractURI', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'initializeWithData', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'tokenURI', data: BytesLike): Result + + events: {} +} + +export interface DummyMetadataRenderer extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: DummyMetadataRendererInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + contractURI(overrides?: CallOverrides): Promise<[string]> + + initializeWithData( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenURI(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]> + } + + contractURI(overrides?: CallOverrides): Promise + + initializeWithData( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenURI(arg0: BigNumberish, overrides?: CallOverrides): Promise + + callStatic: { + contractURI(overrides?: CallOverrides): Promise + + initializeWithData(data: BytesLike, overrides?: CallOverrides): Promise + + tokenURI(arg0: BigNumberish, overrides?: CallOverrides): Promise + } + + filters: {} + + estimateGas: { + contractURI(overrides?: CallOverrides): Promise + + initializeWithData( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenURI(arg0: BigNumberish, overrides?: CallOverrides): Promise + } + + populateTransaction: { + contractURI(overrides?: CallOverrides): Promise + + initializeWithData( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenURI(arg0: BigNumberish, overrides?: CallOverrides): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/ERC1967Proxy.ts b/packages/zora-drops-utils/src/constants/typechain/ERC1967Proxy.ts new file mode 100644 index 0000000..0766b76 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/ERC1967Proxy.ts @@ -0,0 +1,92 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from 'ethers' +import type { EventFragment } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface ERC1967ProxyInterface extends utils.Interface { + functions: {} + + events: { + 'AdminChanged(address,address)': EventFragment + 'BeaconUpgraded(address)': EventFragment + 'Upgraded(address)': EventFragment + } + + getEvent(nameOrSignatureOrTopic: 'AdminChanged'): EventFragment + getEvent(nameOrSignatureOrTopic: 'BeaconUpgraded'): EventFragment + getEvent(nameOrSignatureOrTopic: 'Upgraded'): EventFragment +} + +export interface AdminChangedEventObject { + previousAdmin: string + newAdmin: string +} +export type AdminChangedEvent = TypedEvent<[string, string], AdminChangedEventObject> + +export type AdminChangedEventFilter = TypedEventFilter + +export interface BeaconUpgradedEventObject { + beacon: string +} +export type BeaconUpgradedEvent = TypedEvent<[string], BeaconUpgradedEventObject> + +export type BeaconUpgradedEventFilter = TypedEventFilter + +export interface UpgradedEventObject { + implementation: string +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject> + +export type UpgradedEventFilter = TypedEventFilter + +export interface ERC1967Proxy extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: ERC1967ProxyInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: {} + + callStatic: {} + + filters: { + 'AdminChanged(address,address)'( + previousAdmin?: null, + newAdmin?: null + ): AdminChangedEventFilter + AdminChanged(previousAdmin?: null, newAdmin?: null): AdminChangedEventFilter + + 'BeaconUpgraded(address)'(beacon?: string | null): BeaconUpgradedEventFilter + BeaconUpgraded(beacon?: string | null): BeaconUpgradedEventFilter + + 'Upgraded(address)'(implementation?: string | null): UpgradedEventFilter + Upgraded(implementation?: string | null): UpgradedEventFilter + } + + estimateGas: {} + + populateTransaction: {} +} diff --git a/packages/zora-drops-utils/src/constants/typechain/ERC721Drop.ts b/packages/zora-drops-utils/src/constants/typechain/ERC721Drop.ts new file mode 100644 index 0000000..070dffe --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/ERC721Drop.ts @@ -0,0 +1,1851 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export declare namespace IERC721Drop { + export type SalesConfigurationStruct = { + publicSalePrice: BigNumberish + maxSalePurchasePerAddress: BigNumberish + publicSaleStart: BigNumberish + publicSaleEnd: BigNumberish + presaleStart: BigNumberish + presaleEnd: BigNumberish + presaleMerkleRoot: BytesLike + } + + export type SalesConfigurationStructOutput = [ + BigNumber, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + string + ] & { + publicSalePrice: BigNumber + maxSalePurchasePerAddress: number + publicSaleStart: BigNumber + publicSaleEnd: BigNumber + presaleStart: BigNumber + presaleEnd: BigNumber + presaleMerkleRoot: string + } + + export type AddressMintDetailsStruct = { + totalMints: BigNumberish + presaleMints: BigNumberish + publicMints: BigNumberish + } + + export type AddressMintDetailsStructOutput = [BigNumber, BigNumber, BigNumber] & { + totalMints: BigNumber + presaleMints: BigNumber + publicMints: BigNumber + } + + export type SaleDetailsStruct = { + publicSaleActive: boolean + presaleActive: boolean + publicSalePrice: BigNumberish + publicSaleStart: BigNumberish + publicSaleEnd: BigNumberish + presaleStart: BigNumberish + presaleEnd: BigNumberish + presaleMerkleRoot: BytesLike + maxSalePurchasePerAddress: BigNumberish + totalMinted: BigNumberish + maxSupply: BigNumberish + } + + export type SaleDetailsStructOutput = [ + boolean, + boolean, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber + ] & { + publicSaleActive: boolean + presaleActive: boolean + publicSalePrice: BigNumber + publicSaleStart: BigNumber + publicSaleEnd: BigNumber + presaleStart: BigNumber + presaleEnd: BigNumber + presaleMerkleRoot: string + maxSalePurchasePerAddress: BigNumber + totalMinted: BigNumber + maxSupply: BigNumber + } +} + +export interface ERC721DropInterface extends utils.Interface { + functions: { + 'DEFAULT_ADMIN_ROLE()': FunctionFragment + 'MINTER_ROLE()': FunctionFragment + 'SALES_MANAGER_ROLE()': FunctionFragment + 'adminMint(address,uint256)': FunctionFragment + 'adminMintAirdrop(address[])': FunctionFragment + 'approve(address,uint256)': FunctionFragment + 'balanceOf(address)': FunctionFragment + 'burn(uint256)': FunctionFragment + 'config()': FunctionFragment + 'contractURI()': FunctionFragment + 'contractVersion()': FunctionFragment + 'finalizeOpenEdition()': FunctionFragment + 'getApproved(uint256)': FunctionFragment + 'getRoleAdmin(bytes32)': FunctionFragment + 'grantRole(bytes32,address)': FunctionFragment + 'hasRole(bytes32,address)': FunctionFragment + 'initialize(string,string,address,address,uint64,uint16,(uint104,uint32,uint64,uint64,uint64,uint64,bytes32),address,bytes)': FunctionFragment + 'isAdmin(address)': FunctionFragment + 'isApprovedForAll(address,address)': FunctionFragment + 'metadataRenderer()': FunctionFragment + 'mintedPerAddress(address)': FunctionFragment + 'name()': FunctionFragment + 'owner()': FunctionFragment + 'ownerOf(uint256)': FunctionFragment + 'presaleMintsByAddress(address)': FunctionFragment + 'proxiableUUID()': FunctionFragment + 'purchase(uint256)': FunctionFragment + 'purchasePresale(uint256,uint256,uint256,bytes32[])': FunctionFragment + 'renounceRole(bytes32,address)': FunctionFragment + 'revokeRole(bytes32,address)': FunctionFragment + 'royaltyInfo(uint256,uint256)': FunctionFragment + 'safeTransferFrom(address,address,uint256)': FunctionFragment + 'safeTransferFrom(address,address,uint256,bytes)': FunctionFragment + 'saleDetails()': FunctionFragment + 'salesConfig()': FunctionFragment + 'setApprovalForAll(address,bool)': FunctionFragment + 'setFundsRecipient(address)': FunctionFragment + 'setMetadataRenderer(address,bytes)': FunctionFragment + 'setOwner(address)': FunctionFragment + 'setSaleConfiguration(uint104,uint32,uint64,uint64,uint64,uint64,bytes32)': FunctionFragment + 'supportsInterface(bytes4)': FunctionFragment + 'symbol()': FunctionFragment + 'tokenURI(uint256)': FunctionFragment + 'totalSupply()': FunctionFragment + 'transferFrom(address,address,uint256)': FunctionFragment + 'upgradeTo(address)': FunctionFragment + 'upgradeToAndCall(address,bytes)': FunctionFragment + 'withdraw()': FunctionFragment + 'zoraFeeForAmount(uint256)': FunctionFragment + 'zoraFeeManager()': FunctionFragment + } + + getFunction( + nameOrSignatureOrTopic: + | 'DEFAULT_ADMIN_ROLE' + | 'MINTER_ROLE' + | 'SALES_MANAGER_ROLE' + | 'adminMint' + | 'adminMintAirdrop' + | 'approve' + | 'balanceOf' + | 'burn' + | 'config' + | 'contractURI' + | 'contractVersion' + | 'finalizeOpenEdition' + | 'getApproved' + | 'getRoleAdmin' + | 'grantRole' + | 'hasRole' + | 'initialize' + | 'isAdmin' + | 'isApprovedForAll' + | 'metadataRenderer' + | 'mintedPerAddress' + | 'name' + | 'owner' + | 'ownerOf' + | 'presaleMintsByAddress' + | 'proxiableUUID' + | 'purchase' + | 'purchasePresale' + | 'renounceRole' + | 'revokeRole' + | 'royaltyInfo' + | 'safeTransferFrom(address,address,uint256)' + | 'safeTransferFrom(address,address,uint256,bytes)' + | 'saleDetails' + | 'salesConfig' + | 'setApprovalForAll' + | 'setFundsRecipient' + | 'setMetadataRenderer' + | 'setOwner' + | 'setSaleConfiguration' + | 'supportsInterface' + | 'symbol' + | 'tokenURI' + | 'totalSupply' + | 'transferFrom' + | 'upgradeTo' + | 'upgradeToAndCall' + | 'withdraw' + | 'zoraFeeForAmount' + | 'zoraFeeManager' + ): FunctionFragment + + encodeFunctionData(functionFragment: 'DEFAULT_ADMIN_ROLE', values?: undefined): string + encodeFunctionData(functionFragment: 'MINTER_ROLE', values?: undefined): string + encodeFunctionData(functionFragment: 'SALES_MANAGER_ROLE', values?: undefined): string + encodeFunctionData( + functionFragment: 'adminMint', + values: [string, BigNumberish] + ): string + encodeFunctionData(functionFragment: 'adminMintAirdrop', values: [string[]]): string + encodeFunctionData(functionFragment: 'approve', values: [string, BigNumberish]): string + encodeFunctionData(functionFragment: 'balanceOf', values: [string]): string + encodeFunctionData(functionFragment: 'burn', values: [BigNumberish]): string + encodeFunctionData(functionFragment: 'config', values?: undefined): string + encodeFunctionData(functionFragment: 'contractURI', values?: undefined): string + encodeFunctionData(functionFragment: 'contractVersion', values?: undefined): string + encodeFunctionData(functionFragment: 'finalizeOpenEdition', values?: undefined): string + encodeFunctionData(functionFragment: 'getApproved', values: [BigNumberish]): string + encodeFunctionData(functionFragment: 'getRoleAdmin', values: [BytesLike]): string + encodeFunctionData(functionFragment: 'grantRole', values: [BytesLike, string]): string + encodeFunctionData(functionFragment: 'hasRole', values: [BytesLike, string]): string + encodeFunctionData( + functionFragment: 'initialize', + values: [ + string, + string, + string, + string, + BigNumberish, + BigNumberish, + IERC721Drop.SalesConfigurationStruct, + string, + BytesLike + ] + ): string + encodeFunctionData(functionFragment: 'isAdmin', values: [string]): string + encodeFunctionData( + functionFragment: 'isApprovedForAll', + values: [string, string] + ): string + encodeFunctionData(functionFragment: 'metadataRenderer', values?: undefined): string + encodeFunctionData(functionFragment: 'mintedPerAddress', values: [string]): string + encodeFunctionData(functionFragment: 'name', values?: undefined): string + encodeFunctionData(functionFragment: 'owner', values?: undefined): string + encodeFunctionData(functionFragment: 'ownerOf', values: [BigNumberish]): string + encodeFunctionData(functionFragment: 'presaleMintsByAddress', values: [string]): string + encodeFunctionData(functionFragment: 'proxiableUUID', values?: undefined): string + encodeFunctionData(functionFragment: 'purchase', values: [BigNumberish]): string + encodeFunctionData( + functionFragment: 'purchasePresale', + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike[]] + ): string + encodeFunctionData( + functionFragment: 'renounceRole', + values: [BytesLike, string] + ): string + encodeFunctionData(functionFragment: 'revokeRole', values: [BytesLike, string]): string + encodeFunctionData( + functionFragment: 'royaltyInfo', + values: [BigNumberish, BigNumberish] + ): string + encodeFunctionData( + functionFragment: 'safeTransferFrom(address,address,uint256)', + values: [string, string, BigNumberish] + ): string + encodeFunctionData( + functionFragment: 'safeTransferFrom(address,address,uint256,bytes)', + values: [string, string, BigNumberish, BytesLike] + ): string + encodeFunctionData(functionFragment: 'saleDetails', values?: undefined): string + encodeFunctionData(functionFragment: 'salesConfig', values?: undefined): string + encodeFunctionData( + functionFragment: 'setApprovalForAll', + values: [string, boolean] + ): string + encodeFunctionData(functionFragment: 'setFundsRecipient', values: [string]): string + encodeFunctionData( + functionFragment: 'setMetadataRenderer', + values: [string, BytesLike] + ): string + encodeFunctionData(functionFragment: 'setOwner', values: [string]): string + encodeFunctionData( + functionFragment: 'setSaleConfiguration', + values: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike + ] + ): string + encodeFunctionData(functionFragment: 'supportsInterface', values: [BytesLike]): string + encodeFunctionData(functionFragment: 'symbol', values?: undefined): string + encodeFunctionData(functionFragment: 'tokenURI', values: [BigNumberish]): string + encodeFunctionData(functionFragment: 'totalSupply', values?: undefined): string + encodeFunctionData( + functionFragment: 'transferFrom', + values: [string, string, BigNumberish] + ): string + encodeFunctionData(functionFragment: 'upgradeTo', values: [string]): string + encodeFunctionData( + functionFragment: 'upgradeToAndCall', + values: [string, BytesLike] + ): string + encodeFunctionData(functionFragment: 'withdraw', values?: undefined): string + encodeFunctionData(functionFragment: 'zoraFeeForAmount', values: [BigNumberish]): string + encodeFunctionData(functionFragment: 'zoraFeeManager', values?: undefined): string + + decodeFunctionResult(functionFragment: 'DEFAULT_ADMIN_ROLE', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'MINTER_ROLE', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'SALES_MANAGER_ROLE', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'adminMint', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'adminMintAirdrop', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'burn', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'config', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'contractURI', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'contractVersion', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'finalizeOpenEdition', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'getApproved', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'getRoleAdmin', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'grantRole', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'hasRole', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'initialize', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'isAdmin', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'isApprovedForAll', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'metadataRenderer', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'mintedPerAddress', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'ownerOf', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'presaleMintsByAddress', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'proxiableUUID', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'purchase', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'purchasePresale', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'renounceRole', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'revokeRole', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'royaltyInfo', data: BytesLike): Result + decodeFunctionResult( + functionFragment: 'safeTransferFrom(address,address,uint256)', + data: BytesLike + ): Result + decodeFunctionResult( + functionFragment: 'safeTransferFrom(address,address,uint256,bytes)', + data: BytesLike + ): Result + decodeFunctionResult(functionFragment: 'saleDetails', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'salesConfig', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'setApprovalForAll', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'setFundsRecipient', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'setMetadataRenderer', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'setOwner', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'setSaleConfiguration', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'supportsInterface', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'tokenURI', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'totalSupply', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'upgradeTo', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'upgradeToAndCall', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'withdraw', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'zoraFeeForAmount', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'zoraFeeManager', data: BytesLike): Result + + events: { + 'AdminChanged(address,address)': EventFragment + 'Approval(address,address,uint256)': EventFragment + 'ApprovalForAll(address,address,bool)': EventFragment + 'BeaconUpgraded(address)': EventFragment + 'FundsReceived(address,uint256)': EventFragment + 'FundsRecipientChanged(address,address)': EventFragment + 'OpenMintFinalized(address,uint256)': EventFragment + 'OwnershipTransferred(address,address)': EventFragment + 'RoleAdminChanged(bytes32,bytes32,bytes32)': EventFragment + 'RoleGranted(bytes32,address,address)': EventFragment + 'RoleRevoked(bytes32,address,address)': EventFragment + 'Sale(address,uint256,uint256,uint256)': EventFragment + 'SalesConfigChanged(address)': EventFragment + 'Transfer(address,address,uint256)': EventFragment + 'UpdatedMetadataRenderer(address,address)': EventFragment + 'Upgraded(address)': EventFragment + } + + getEvent(nameOrSignatureOrTopic: 'AdminChanged'): EventFragment + getEvent(nameOrSignatureOrTopic: 'Approval'): EventFragment + getEvent(nameOrSignatureOrTopic: 'ApprovalForAll'): EventFragment + getEvent(nameOrSignatureOrTopic: 'BeaconUpgraded'): EventFragment + getEvent(nameOrSignatureOrTopic: 'FundsReceived'): EventFragment + getEvent(nameOrSignatureOrTopic: 'FundsRecipientChanged'): EventFragment + getEvent(nameOrSignatureOrTopic: 'OpenMintFinalized'): EventFragment + getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment + getEvent(nameOrSignatureOrTopic: 'RoleAdminChanged'): EventFragment + getEvent(nameOrSignatureOrTopic: 'RoleGranted'): EventFragment + getEvent(nameOrSignatureOrTopic: 'RoleRevoked'): EventFragment + getEvent(nameOrSignatureOrTopic: 'Sale'): EventFragment + getEvent(nameOrSignatureOrTopic: 'SalesConfigChanged'): EventFragment + getEvent(nameOrSignatureOrTopic: 'Transfer'): EventFragment + getEvent(nameOrSignatureOrTopic: 'UpdatedMetadataRenderer'): EventFragment + getEvent(nameOrSignatureOrTopic: 'Upgraded'): EventFragment +} + +export interface AdminChangedEventObject { + previousAdmin: string + newAdmin: string +} +export type AdminChangedEvent = TypedEvent<[string, string], AdminChangedEventObject> + +export type AdminChangedEventFilter = TypedEventFilter + +export interface ApprovalEventObject { + owner: string + approved: string + tokenId: BigNumber +} +export type ApprovalEvent = TypedEvent<[string, string, BigNumber], ApprovalEventObject> + +export type ApprovalEventFilter = TypedEventFilter + +export interface ApprovalForAllEventObject { + owner: string + operator: string + approved: boolean +} +export type ApprovalForAllEvent = TypedEvent< + [string, string, boolean], + ApprovalForAllEventObject +> + +export type ApprovalForAllEventFilter = TypedEventFilter + +export interface BeaconUpgradedEventObject { + beacon: string +} +export type BeaconUpgradedEvent = TypedEvent<[string], BeaconUpgradedEventObject> + +export type BeaconUpgradedEventFilter = TypedEventFilter + +export interface FundsReceivedEventObject { + source: string + amount: BigNumber +} +export type FundsReceivedEvent = TypedEvent<[string, BigNumber], FundsReceivedEventObject> + +export type FundsReceivedEventFilter = TypedEventFilter + +export interface FundsRecipientChangedEventObject { + newAddress: string + changedBy: string +} +export type FundsRecipientChangedEvent = TypedEvent< + [string, string], + FundsRecipientChangedEventObject +> + +export type FundsRecipientChangedEventFilter = + TypedEventFilter + +export interface OpenMintFinalizedEventObject { + sender: string + numberOfMints: BigNumber +} +export type OpenMintFinalizedEvent = TypedEvent< + [string, BigNumber], + OpenMintFinalizedEventObject +> + +export type OpenMintFinalizedEventFilter = TypedEventFilter + +export interface OwnershipTransferredEventObject { + previousOwner: string + newOwner: string +} +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +> + +export type OwnershipTransferredEventFilter = TypedEventFilter + +export interface RoleAdminChangedEventObject { + role: string + previousAdminRole: string + newAdminRole: string +} +export type RoleAdminChangedEvent = TypedEvent< + [string, string, string], + RoleAdminChangedEventObject +> + +export type RoleAdminChangedEventFilter = TypedEventFilter + +export interface RoleGrantedEventObject { + role: string + account: string + sender: string +} +export type RoleGrantedEvent = TypedEvent< + [string, string, string], + RoleGrantedEventObject +> + +export type RoleGrantedEventFilter = TypedEventFilter + +export interface RoleRevokedEventObject { + role: string + account: string + sender: string +} +export type RoleRevokedEvent = TypedEvent< + [string, string, string], + RoleRevokedEventObject +> + +export type RoleRevokedEventFilter = TypedEventFilter + +export interface SaleEventObject { + to: string + quantity: BigNumber + pricePerToken: BigNumber + firstPurchasedTokenId: BigNumber +} +export type SaleEvent = TypedEvent< + [string, BigNumber, BigNumber, BigNumber], + SaleEventObject +> + +export type SaleEventFilter = TypedEventFilter + +export interface SalesConfigChangedEventObject { + changedBy: string +} +export type SalesConfigChangedEvent = TypedEvent<[string], SalesConfigChangedEventObject> + +export type SalesConfigChangedEventFilter = TypedEventFilter + +export interface TransferEventObject { + from: string + to: string + tokenId: BigNumber +} +export type TransferEvent = TypedEvent<[string, string, BigNumber], TransferEventObject> + +export type TransferEventFilter = TypedEventFilter + +export interface UpdatedMetadataRendererEventObject { + sender: string + renderer: string +} +export type UpdatedMetadataRendererEvent = TypedEvent< + [string, string], + UpdatedMetadataRendererEventObject +> + +export type UpdatedMetadataRendererEventFilter = + TypedEventFilter + +export interface UpgradedEventObject { + implementation: string +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject> + +export type UpgradedEventFilter = TypedEventFilter + +export interface ERC721Drop extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: ERC721DropInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise<[string]> + + MINTER_ROLE(overrides?: CallOverrides): Promise<[string]> + + SALES_MANAGER_ROLE(overrides?: CallOverrides): Promise<[string]> + + adminMint( + recipient: string, + quantity: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + adminMintAirdrop( + recipients: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise + + approve( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + balanceOf(owner: string, overrides?: CallOverrides): Promise<[BigNumber]> + + burn( + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + config(overrides?: CallOverrides): Promise< + [string, BigNumber, number, string] & { + metadataRenderer: string + editionSize: BigNumber + royaltyBPS: number + fundsRecipient: string + } + > + + contractURI(overrides?: CallOverrides): Promise<[string]> + + contractVersion(overrides?: CallOverrides): Promise<[number]> + + finalizeOpenEdition( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + getApproved(tokenId: BigNumberish, overrides?: CallOverrides): Promise<[string]> + + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise<[string]> + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]> + + initialize( + _contractName: string, + _contractSymbol: string, + _initialOwner: string, + _fundsRecipient: string, + _editionSize: BigNumberish, + _royaltyBPS: BigNumberish, + _salesConfig: IERC721Drop.SalesConfigurationStruct, + _metadataRenderer: string, + _metadataRendererInit: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + isAdmin(user: string, overrides?: CallOverrides): Promise<[boolean]> + + isApprovedForAll( + nftOwner: string, + operator: string, + overrides?: CallOverrides + ): Promise<[boolean]> + + metadataRenderer(overrides?: CallOverrides): Promise<[string]> + + mintedPerAddress( + minter: string, + overrides?: CallOverrides + ): Promise<[IERC721Drop.AddressMintDetailsStructOutput]> + + name(overrides?: CallOverrides): Promise<[string]> + + owner(overrides?: CallOverrides): Promise<[string]> + + ownerOf(tokenId: BigNumberish, overrides?: CallOverrides): Promise<[string]> + + presaleMintsByAddress(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]> + + proxiableUUID(overrides?: CallOverrides): Promise<[string]> + + purchase( + quantity: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + purchasePresale( + quantity: BigNumberish, + maxQuantity: BigNumberish, + pricePerToken: BigNumberish, + merkleProof: BytesLike[], + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + royaltyInfo( + arg0: BigNumberish, + _salePrice: BigNumberish, + overrides?: CallOverrides + ): Promise<[string, BigNumber] & { receiver: string; royaltyAmount: BigNumber }> + + 'safeTransferFrom(address,address,uint256)'( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + 'safeTransferFrom(address,address,uint256,bytes)'( + from: string, + to: string, + tokenId: BigNumberish, + _data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + saleDetails(overrides?: CallOverrides): Promise<[IERC721Drop.SaleDetailsStructOutput]> + + salesConfig(overrides?: CallOverrides): Promise< + [BigNumber, number, BigNumber, BigNumber, BigNumber, BigNumber, string] & { + publicSalePrice: BigNumber + maxSalePurchasePerAddress: number + publicSaleStart: BigNumber + publicSaleEnd: BigNumber + presaleStart: BigNumber + presaleEnd: BigNumber + presaleMerkleRoot: string + } + > + + setApprovalForAll( + operator: string, + approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setFundsRecipient( + newRecipientAddress: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setMetadataRenderer( + newRenderer: string, + setupRenderer: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setOwner( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setSaleConfiguration( + publicSalePrice: BigNumberish, + maxSalePurchasePerAddress: BigNumberish, + publicSaleStart: BigNumberish, + publicSaleEnd: BigNumberish, + presaleStart: BigNumberish, + presaleEnd: BigNumberish, + presaleMerkleRoot: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]> + + symbol(overrides?: CallOverrides): Promise<[string]> + + tokenURI(tokenId: BigNumberish, overrides?: CallOverrides): Promise<[string]> + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]> + + transferFrom( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + withdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + zoraFeeForAmount( + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + zoraFeeManager(overrides?: CallOverrides): Promise<[string]> + } + + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise + + MINTER_ROLE(overrides?: CallOverrides): Promise + + SALES_MANAGER_ROLE(overrides?: CallOverrides): Promise + + adminMint( + recipient: string, + quantity: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + adminMintAirdrop( + recipients: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise + + approve( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + balanceOf(owner: string, overrides?: CallOverrides): Promise + + burn( + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + config(overrides?: CallOverrides): Promise< + [string, BigNumber, number, string] & { + metadataRenderer: string + editionSize: BigNumber + royaltyBPS: number + fundsRecipient: string + } + > + + contractURI(overrides?: CallOverrides): Promise + + contractVersion(overrides?: CallOverrides): Promise + + finalizeOpenEdition( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + getApproved(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise + + initialize( + _contractName: string, + _contractSymbol: string, + _initialOwner: string, + _fundsRecipient: string, + _editionSize: BigNumberish, + _royaltyBPS: BigNumberish, + _salesConfig: IERC721Drop.SalesConfigurationStruct, + _metadataRenderer: string, + _metadataRendererInit: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + isAdmin(user: string, overrides?: CallOverrides): Promise + + isApprovedForAll( + nftOwner: string, + operator: string, + overrides?: CallOverrides + ): Promise + + metadataRenderer(overrides?: CallOverrides): Promise + + mintedPerAddress( + minter: string, + overrides?: CallOverrides + ): Promise + + name(overrides?: CallOverrides): Promise + + owner(overrides?: CallOverrides): Promise + + ownerOf(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + presaleMintsByAddress(arg0: string, overrides?: CallOverrides): Promise + + proxiableUUID(overrides?: CallOverrides): Promise + + purchase( + quantity: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + purchasePresale( + quantity: BigNumberish, + maxQuantity: BigNumberish, + pricePerToken: BigNumberish, + merkleProof: BytesLike[], + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + royaltyInfo( + arg0: BigNumberish, + _salePrice: BigNumberish, + overrides?: CallOverrides + ): Promise<[string, BigNumber] & { receiver: string; royaltyAmount: BigNumber }> + + 'safeTransferFrom(address,address,uint256)'( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + 'safeTransferFrom(address,address,uint256,bytes)'( + from: string, + to: string, + tokenId: BigNumberish, + _data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + saleDetails(overrides?: CallOverrides): Promise + + salesConfig(overrides?: CallOverrides): Promise< + [BigNumber, number, BigNumber, BigNumber, BigNumber, BigNumber, string] & { + publicSalePrice: BigNumber + maxSalePurchasePerAddress: number + publicSaleStart: BigNumber + publicSaleEnd: BigNumber + presaleStart: BigNumber + presaleEnd: BigNumber + presaleMerkleRoot: string + } + > + + setApprovalForAll( + operator: string, + approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setFundsRecipient( + newRecipientAddress: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setMetadataRenderer( + newRenderer: string, + setupRenderer: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setOwner( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setSaleConfiguration( + publicSalePrice: BigNumberish, + maxSalePurchasePerAddress: BigNumberish, + publicSaleStart: BigNumberish, + publicSaleEnd: BigNumberish, + presaleStart: BigNumberish, + presaleEnd: BigNumberish, + presaleMerkleRoot: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise + + symbol(overrides?: CallOverrides): Promise + + tokenURI(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + totalSupply(overrides?: CallOverrides): Promise + + transferFrom( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + withdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + zoraFeeForAmount( + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + zoraFeeManager(overrides?: CallOverrides): Promise + + callStatic: { + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise + + MINTER_ROLE(overrides?: CallOverrides): Promise + + SALES_MANAGER_ROLE(overrides?: CallOverrides): Promise + + adminMint( + recipient: string, + quantity: BigNumberish, + overrides?: CallOverrides + ): Promise + + adminMintAirdrop(recipients: string[], overrides?: CallOverrides): Promise + + approve(to: string, tokenId: BigNumberish, overrides?: CallOverrides): Promise + + balanceOf(owner: string, overrides?: CallOverrides): Promise + + burn(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + config(overrides?: CallOverrides): Promise< + [string, BigNumber, number, string] & { + metadataRenderer: string + editionSize: BigNumber + royaltyBPS: number + fundsRecipient: string + } + > + + contractURI(overrides?: CallOverrides): Promise + + contractVersion(overrides?: CallOverrides): Promise + + finalizeOpenEdition(overrides?: CallOverrides): Promise + + getApproved(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise + + grantRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise + + hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise + + initialize( + _contractName: string, + _contractSymbol: string, + _initialOwner: string, + _fundsRecipient: string, + _editionSize: BigNumberish, + _royaltyBPS: BigNumberish, + _salesConfig: IERC721Drop.SalesConfigurationStruct, + _metadataRenderer: string, + _metadataRendererInit: BytesLike, + overrides?: CallOverrides + ): Promise + + isAdmin(user: string, overrides?: CallOverrides): Promise + + isApprovedForAll( + nftOwner: string, + operator: string, + overrides?: CallOverrides + ): Promise + + metadataRenderer(overrides?: CallOverrides): Promise + + mintedPerAddress( + minter: string, + overrides?: CallOverrides + ): Promise + + name(overrides?: CallOverrides): Promise + + owner(overrides?: CallOverrides): Promise + + ownerOf(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + presaleMintsByAddress(arg0: string, overrides?: CallOverrides): Promise + + proxiableUUID(overrides?: CallOverrides): Promise + + purchase(quantity: BigNumberish, overrides?: CallOverrides): Promise + + purchasePresale( + quantity: BigNumberish, + maxQuantity: BigNumberish, + pricePerToken: BigNumberish, + merkleProof: BytesLike[], + overrides?: CallOverrides + ): Promise + + renounceRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise + + revokeRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise + + royaltyInfo( + arg0: BigNumberish, + _salePrice: BigNumberish, + overrides?: CallOverrides + ): Promise<[string, BigNumber] & { receiver: string; royaltyAmount: BigNumber }> + + 'safeTransferFrom(address,address,uint256)'( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise + + 'safeTransferFrom(address,address,uint256,bytes)'( + from: string, + to: string, + tokenId: BigNumberish, + _data: BytesLike, + overrides?: CallOverrides + ): Promise + + saleDetails(overrides?: CallOverrides): Promise + + salesConfig(overrides?: CallOverrides): Promise< + [BigNumber, number, BigNumber, BigNumber, BigNumber, BigNumber, string] & { + publicSalePrice: BigNumber + maxSalePurchasePerAddress: number + publicSaleStart: BigNumber + publicSaleEnd: BigNumber + presaleStart: BigNumber + presaleEnd: BigNumber + presaleMerkleRoot: string + } + > + + setApprovalForAll( + operator: string, + approved: boolean, + overrides?: CallOverrides + ): Promise + + setFundsRecipient( + newRecipientAddress: string, + overrides?: CallOverrides + ): Promise + + setMetadataRenderer( + newRenderer: string, + setupRenderer: BytesLike, + overrides?: CallOverrides + ): Promise + + setOwner(newOwner: string, overrides?: CallOverrides): Promise + + setSaleConfiguration( + publicSalePrice: BigNumberish, + maxSalePurchasePerAddress: BigNumberish, + publicSaleStart: BigNumberish, + publicSaleEnd: BigNumberish, + presaleStart: BigNumberish, + presaleEnd: BigNumberish, + presaleMerkleRoot: BytesLike, + overrides?: CallOverrides + ): Promise + + supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise + + symbol(overrides?: CallOverrides): Promise + + tokenURI(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + totalSupply(overrides?: CallOverrides): Promise + + transferFrom( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise + + upgradeTo(newImplementation: string, overrides?: CallOverrides): Promise + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: CallOverrides + ): Promise + + withdraw(overrides?: CallOverrides): Promise + + zoraFeeForAmount( + amount: BigNumberish, + overrides?: CallOverrides + ): Promise<[string, BigNumber]> + + zoraFeeManager(overrides?: CallOverrides): Promise + } + + filters: { + 'AdminChanged(address,address)'( + previousAdmin?: null, + newAdmin?: null + ): AdminChangedEventFilter + AdminChanged(previousAdmin?: null, newAdmin?: null): AdminChangedEventFilter + + 'Approval(address,address,uint256)'( + owner?: string | null, + approved?: string | null, + tokenId?: BigNumberish | null + ): ApprovalEventFilter + Approval( + owner?: string | null, + approved?: string | null, + tokenId?: BigNumberish | null + ): ApprovalEventFilter + + 'ApprovalForAll(address,address,bool)'( + owner?: string | null, + operator?: string | null, + approved?: null + ): ApprovalForAllEventFilter + ApprovalForAll( + owner?: string | null, + operator?: string | null, + approved?: null + ): ApprovalForAllEventFilter + + 'BeaconUpgraded(address)'(beacon?: string | null): BeaconUpgradedEventFilter + BeaconUpgraded(beacon?: string | null): BeaconUpgradedEventFilter + + 'FundsReceived(address,uint256)'( + source?: string | null, + amount?: null + ): FundsReceivedEventFilter + FundsReceived(source?: string | null, amount?: null): FundsReceivedEventFilter + + 'FundsRecipientChanged(address,address)'( + newAddress?: string | null, + changedBy?: string | null + ): FundsRecipientChangedEventFilter + FundsRecipientChanged( + newAddress?: string | null, + changedBy?: string | null + ): FundsRecipientChangedEventFilter + + 'OpenMintFinalized(address,uint256)'( + sender?: string | null, + numberOfMints?: null + ): OpenMintFinalizedEventFilter + OpenMintFinalized( + sender?: string | null, + numberOfMints?: null + ): OpenMintFinalizedEventFilter + + 'OwnershipTransferred(address,address)'( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter + OwnershipTransferred( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter + + 'RoleAdminChanged(bytes32,bytes32,bytes32)'( + role?: BytesLike | null, + previousAdminRole?: BytesLike | null, + newAdminRole?: BytesLike | null + ): RoleAdminChangedEventFilter + RoleAdminChanged( + role?: BytesLike | null, + previousAdminRole?: BytesLike | null, + newAdminRole?: BytesLike | null + ): RoleAdminChangedEventFilter + + 'RoleGranted(bytes32,address,address)'( + role?: BytesLike | null, + account?: string | null, + sender?: string | null + ): RoleGrantedEventFilter + RoleGranted( + role?: BytesLike | null, + account?: string | null, + sender?: string | null + ): RoleGrantedEventFilter + + 'RoleRevoked(bytes32,address,address)'( + role?: BytesLike | null, + account?: string | null, + sender?: string | null + ): RoleRevokedEventFilter + RoleRevoked( + role?: BytesLike | null, + account?: string | null, + sender?: string | null + ): RoleRevokedEventFilter + + 'Sale(address,uint256,uint256,uint256)'( + to?: string | null, + quantity?: BigNumberish | null, + pricePerToken?: BigNumberish | null, + firstPurchasedTokenId?: null + ): SaleEventFilter + Sale( + to?: string | null, + quantity?: BigNumberish | null, + pricePerToken?: BigNumberish | null, + firstPurchasedTokenId?: null + ): SaleEventFilter + + 'SalesConfigChanged(address)'( + changedBy?: string | null + ): SalesConfigChangedEventFilter + SalesConfigChanged(changedBy?: string | null): SalesConfigChangedEventFilter + + 'Transfer(address,address,uint256)'( + from?: string | null, + to?: string | null, + tokenId?: BigNumberish | null + ): TransferEventFilter + Transfer( + from?: string | null, + to?: string | null, + tokenId?: BigNumberish | null + ): TransferEventFilter + + 'UpdatedMetadataRenderer(address,address)'( + sender?: null, + renderer?: null + ): UpdatedMetadataRendererEventFilter + UpdatedMetadataRenderer( + sender?: null, + renderer?: null + ): UpdatedMetadataRendererEventFilter + + 'Upgraded(address)'(implementation?: string | null): UpgradedEventFilter + Upgraded(implementation?: string | null): UpgradedEventFilter + } + + estimateGas: { + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise + + MINTER_ROLE(overrides?: CallOverrides): Promise + + SALES_MANAGER_ROLE(overrides?: CallOverrides): Promise + + adminMint( + recipient: string, + quantity: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + adminMintAirdrop( + recipients: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise + + approve( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + balanceOf(owner: string, overrides?: CallOverrides): Promise + + burn( + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + config(overrides?: CallOverrides): Promise + + contractURI(overrides?: CallOverrides): Promise + + contractVersion(overrides?: CallOverrides): Promise + + finalizeOpenEdition( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + getApproved(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise + + initialize( + _contractName: string, + _contractSymbol: string, + _initialOwner: string, + _fundsRecipient: string, + _editionSize: BigNumberish, + _royaltyBPS: BigNumberish, + _salesConfig: IERC721Drop.SalesConfigurationStruct, + _metadataRenderer: string, + _metadataRendererInit: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + isAdmin(user: string, overrides?: CallOverrides): Promise + + isApprovedForAll( + nftOwner: string, + operator: string, + overrides?: CallOverrides + ): Promise + + metadataRenderer(overrides?: CallOverrides): Promise + + mintedPerAddress(minter: string, overrides?: CallOverrides): Promise + + name(overrides?: CallOverrides): Promise + + owner(overrides?: CallOverrides): Promise + + ownerOf(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + presaleMintsByAddress(arg0: string, overrides?: CallOverrides): Promise + + proxiableUUID(overrides?: CallOverrides): Promise + + purchase( + quantity: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + purchasePresale( + quantity: BigNumberish, + maxQuantity: BigNumberish, + pricePerToken: BigNumberish, + merkleProof: BytesLike[], + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + royaltyInfo( + arg0: BigNumberish, + _salePrice: BigNumberish, + overrides?: CallOverrides + ): Promise + + 'safeTransferFrom(address,address,uint256)'( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + 'safeTransferFrom(address,address,uint256,bytes)'( + from: string, + to: string, + tokenId: BigNumberish, + _data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + saleDetails(overrides?: CallOverrides): Promise + + salesConfig(overrides?: CallOverrides): Promise + + setApprovalForAll( + operator: string, + approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setFundsRecipient( + newRecipientAddress: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setMetadataRenderer( + newRenderer: string, + setupRenderer: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setOwner( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setSaleConfiguration( + publicSalePrice: BigNumberish, + maxSalePurchasePerAddress: BigNumberish, + publicSaleStart: BigNumberish, + publicSaleEnd: BigNumberish, + presaleStart: BigNumberish, + presaleEnd: BigNumberish, + presaleMerkleRoot: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise + + symbol(overrides?: CallOverrides): Promise + + tokenURI(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + totalSupply(overrides?: CallOverrides): Promise + + transferFrom( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + withdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + zoraFeeForAmount( + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + zoraFeeManager(overrides?: CallOverrides): Promise + } + + populateTransaction: { + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise + + MINTER_ROLE(overrides?: CallOverrides): Promise + + SALES_MANAGER_ROLE(overrides?: CallOverrides): Promise + + adminMint( + recipient: string, + quantity: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + adminMintAirdrop( + recipients: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise + + approve( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + balanceOf(owner: string, overrides?: CallOverrides): Promise + + burn( + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + config(overrides?: CallOverrides): Promise + + contractURI(overrides?: CallOverrides): Promise + + contractVersion(overrides?: CallOverrides): Promise + + finalizeOpenEdition( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + getApproved( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise + + getRoleAdmin( + role: BytesLike, + overrides?: CallOverrides + ): Promise + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise + + initialize( + _contractName: string, + _contractSymbol: string, + _initialOwner: string, + _fundsRecipient: string, + _editionSize: BigNumberish, + _royaltyBPS: BigNumberish, + _salesConfig: IERC721Drop.SalesConfigurationStruct, + _metadataRenderer: string, + _metadataRendererInit: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + isAdmin(user: string, overrides?: CallOverrides): Promise + + isApprovedForAll( + nftOwner: string, + operator: string, + overrides?: CallOverrides + ): Promise + + metadataRenderer(overrides?: CallOverrides): Promise + + mintedPerAddress( + minter: string, + overrides?: CallOverrides + ): Promise + + name(overrides?: CallOverrides): Promise + + owner(overrides?: CallOverrides): Promise + + ownerOf( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise + + presaleMintsByAddress( + arg0: string, + overrides?: CallOverrides + ): Promise + + proxiableUUID(overrides?: CallOverrides): Promise + + purchase( + quantity: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + purchasePresale( + quantity: BigNumberish, + maxQuantity: BigNumberish, + pricePerToken: BigNumberish, + merkleProof: BytesLike[], + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + royaltyInfo( + arg0: BigNumberish, + _salePrice: BigNumberish, + overrides?: CallOverrides + ): Promise + + 'safeTransferFrom(address,address,uint256)'( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + 'safeTransferFrom(address,address,uint256,bytes)'( + from: string, + to: string, + tokenId: BigNumberish, + _data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + saleDetails(overrides?: CallOverrides): Promise + + salesConfig(overrides?: CallOverrides): Promise + + setApprovalForAll( + operator: string, + approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setFundsRecipient( + newRecipientAddress: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setMetadataRenderer( + newRenderer: string, + setupRenderer: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setOwner( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setSaleConfiguration( + publicSalePrice: BigNumberish, + maxSalePurchasePerAddress: BigNumberish, + publicSaleStart: BigNumberish, + publicSaleEnd: BigNumberish, + presaleStart: BigNumberish, + presaleEnd: BigNumberish, + presaleMerkleRoot: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise + + symbol(overrides?: CallOverrides): Promise + + tokenURI( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise + + totalSupply(overrides?: CallOverrides): Promise + + transferFrom( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + withdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + zoraFeeForAmount( + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + zoraFeeManager(overrides?: CallOverrides): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/ERC721DropProxy.ts b/packages/zora-drops-utils/src/constants/typechain/ERC721DropProxy.ts new file mode 100644 index 0000000..ccecb65 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/ERC721DropProxy.ts @@ -0,0 +1,92 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from 'ethers' +import type { EventFragment } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface ERC721DropProxyInterface extends utils.Interface { + functions: {} + + events: { + 'AdminChanged(address,address)': EventFragment + 'BeaconUpgraded(address)': EventFragment + 'Upgraded(address)': EventFragment + } + + getEvent(nameOrSignatureOrTopic: 'AdminChanged'): EventFragment + getEvent(nameOrSignatureOrTopic: 'BeaconUpgraded'): EventFragment + getEvent(nameOrSignatureOrTopic: 'Upgraded'): EventFragment +} + +export interface AdminChangedEventObject { + previousAdmin: string + newAdmin: string +} +export type AdminChangedEvent = TypedEvent<[string, string], AdminChangedEventObject> + +export type AdminChangedEventFilter = TypedEventFilter + +export interface BeaconUpgradedEventObject { + beacon: string +} +export type BeaconUpgradedEvent = TypedEvent<[string], BeaconUpgradedEventObject> + +export type BeaconUpgradedEventFilter = TypedEventFilter + +export interface UpgradedEventObject { + implementation: string +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject> + +export type UpgradedEventFilter = TypedEventFilter + +export interface ERC721DropProxy extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: ERC721DropProxyInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: {} + + callStatic: {} + + filters: { + 'AdminChanged(address,address)'( + previousAdmin?: null, + newAdmin?: null + ): AdminChangedEventFilter + AdminChanged(previousAdmin?: null, newAdmin?: null): AdminChangedEventFilter + + 'BeaconUpgraded(address)'(beacon?: string | null): BeaconUpgradedEventFilter + BeaconUpgraded(beacon?: string | null): BeaconUpgradedEventFilter + + 'Upgraded(address)'(implementation?: string | null): UpgradedEventFilter + Upgraded(implementation?: string | null): UpgradedEventFilter + } + + estimateGas: {} + + populateTransaction: {} +} diff --git a/packages/zora-drops-utils/src/constants/typechain/ERC721DropStorageV1.ts b/packages/zora-drops-utils/src/constants/typechain/ERC721DropStorageV1.ts new file mode 100644 index 0000000..269b628 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/ERC721DropStorageV1.ts @@ -0,0 +1,158 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface ERC721DropStorageV1Interface extends utils.Interface { + functions: { + 'config()': FunctionFragment + 'presaleMintsByAddress(address)': FunctionFragment + 'salesConfig()': FunctionFragment + } + + getFunction( + nameOrSignatureOrTopic: 'config' | 'presaleMintsByAddress' | 'salesConfig' + ): FunctionFragment + + encodeFunctionData(functionFragment: 'config', values?: undefined): string + encodeFunctionData(functionFragment: 'presaleMintsByAddress', values: [string]): string + encodeFunctionData(functionFragment: 'salesConfig', values?: undefined): string + + decodeFunctionResult(functionFragment: 'config', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'presaleMintsByAddress', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'salesConfig', data: BytesLike): Result + + events: {} +} + +export interface ERC721DropStorageV1 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: ERC721DropStorageV1Interface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + config(overrides?: CallOverrides): Promise< + [string, BigNumber, number, string] & { + metadataRenderer: string + editionSize: BigNumber + royaltyBPS: number + fundsRecipient: string + } + > + + presaleMintsByAddress(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]> + + salesConfig(overrides?: CallOverrides): Promise< + [BigNumber, number, BigNumber, BigNumber, BigNumber, BigNumber, string] & { + publicSalePrice: BigNumber + maxSalePurchasePerAddress: number + publicSaleStart: BigNumber + publicSaleEnd: BigNumber + presaleStart: BigNumber + presaleEnd: BigNumber + presaleMerkleRoot: string + } + > + } + + config(overrides?: CallOverrides): Promise< + [string, BigNumber, number, string] & { + metadataRenderer: string + editionSize: BigNumber + royaltyBPS: number + fundsRecipient: string + } + > + + presaleMintsByAddress(arg0: string, overrides?: CallOverrides): Promise + + salesConfig(overrides?: CallOverrides): Promise< + [BigNumber, number, BigNumber, BigNumber, BigNumber, BigNumber, string] & { + publicSalePrice: BigNumber + maxSalePurchasePerAddress: number + publicSaleStart: BigNumber + publicSaleEnd: BigNumber + presaleStart: BigNumber + presaleEnd: BigNumber + presaleMerkleRoot: string + } + > + + callStatic: { + config(overrides?: CallOverrides): Promise< + [string, BigNumber, number, string] & { + metadataRenderer: string + editionSize: BigNumber + royaltyBPS: number + fundsRecipient: string + } + > + + presaleMintsByAddress(arg0: string, overrides?: CallOverrides): Promise + + salesConfig(overrides?: CallOverrides): Promise< + [BigNumber, number, BigNumber, BigNumber, BigNumber, BigNumber, string] & { + publicSalePrice: BigNumber + maxSalePurchasePerAddress: number + publicSaleStart: BigNumber + publicSaleEnd: BigNumber + presaleStart: BigNumber + presaleEnd: BigNumber + presaleMerkleRoot: string + } + > + } + + filters: {} + + estimateGas: { + config(overrides?: CallOverrides): Promise + + presaleMintsByAddress(arg0: string, overrides?: CallOverrides): Promise + + salesConfig(overrides?: CallOverrides): Promise + } + + populateTransaction: { + config(overrides?: CallOverrides): Promise + + presaleMintsByAddress( + arg0: string, + overrides?: CallOverrides + ): Promise + + salesConfig(overrides?: CallOverrides): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/EditionMetadataRenderer.t.sol/IERC721OnChainDataMock.ts b/packages/zora-drops-utils/src/constants/typechain/EditionMetadataRenderer.t.sol/IERC721OnChainDataMock.ts new file mode 100644 index 0000000..59150cb --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/EditionMetadataRenderer.t.sol/IERC721OnChainDataMock.ts @@ -0,0 +1,148 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from '../common' + +export declare namespace IERC721Drop { + export type SaleDetailsStruct = { + publicSaleActive: boolean + presaleActive: boolean + publicSalePrice: BigNumberish + publicSaleStart: BigNumberish + publicSaleEnd: BigNumberish + presaleStart: BigNumberish + presaleEnd: BigNumberish + presaleMerkleRoot: BytesLike + maxSalePurchasePerAddress: BigNumberish + totalMinted: BigNumberish + maxSupply: BigNumberish + } + + export type SaleDetailsStructOutput = [ + boolean, + boolean, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber + ] & { + publicSaleActive: boolean + presaleActive: boolean + publicSalePrice: BigNumber + publicSaleStart: BigNumber + publicSaleEnd: BigNumber + presaleStart: BigNumber + presaleEnd: BigNumber + presaleMerkleRoot: string + maxSalePurchasePerAddress: BigNumber + totalMinted: BigNumber + maxSupply: BigNumber + } +} + +export interface IERC721OnChainDataMockInterface extends utils.Interface { + functions: { + 'name()': FunctionFragment + 'saleDetails()': FunctionFragment + } + + getFunction(nameOrSignatureOrTopic: 'name' | 'saleDetails'): FunctionFragment + + encodeFunctionData(functionFragment: 'name', values?: undefined): string + encodeFunctionData(functionFragment: 'saleDetails', values?: undefined): string + + decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'saleDetails', data: BytesLike): Result + + events: {} +} + +export interface IERC721OnChainDataMock extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: IERC721OnChainDataMockInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + name( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + saleDetails( + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + name( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + saleDetails( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + callStatic: { + name(overrides?: CallOverrides): Promise + + saleDetails(overrides?: CallOverrides): Promise + } + + filters: {} + + estimateGas: { + name(overrides?: Overrides & { from?: string | Promise }): Promise + + saleDetails( + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + populateTransaction: { + name( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + saleDetails( + overrides?: Overrides & { from?: string | Promise } + ): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/EditionMetadataRenderer.t.sol/index.ts b/packages/zora-drops-utils/src/constants/typechain/EditionMetadataRenderer.t.sol/index.ts new file mode 100644 index 0000000..734ab32 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/EditionMetadataRenderer.t.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IERC721OnChainDataMock } from './IERC721OnChainDataMock' diff --git a/packages/zora-drops-utils/src/constants/typechain/EditionMetadataRenderer.ts b/packages/zora-drops-utils/src/constants/typechain/EditionMetadataRenderer.ts new file mode 100644 index 0000000..15c1004 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/EditionMetadataRenderer.ts @@ -0,0 +1,328 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface EditionMetadataRendererInterface extends utils.Interface { + functions: { + 'contractURI()': FunctionFragment + 'initializeWithData(bytes)': FunctionFragment + 'tokenInfos(address)': FunctionFragment + 'tokenURI(uint256)': FunctionFragment + 'updateDescription(address,string)': FunctionFragment + 'updateMediaURIs(address,string,string)': FunctionFragment + } + + getFunction( + nameOrSignatureOrTopic: + | 'contractURI' + | 'initializeWithData' + | 'tokenInfos' + | 'tokenURI' + | 'updateDescription' + | 'updateMediaURIs' + ): FunctionFragment + + encodeFunctionData(functionFragment: 'contractURI', values?: undefined): string + encodeFunctionData(functionFragment: 'initializeWithData', values: [BytesLike]): string + encodeFunctionData(functionFragment: 'tokenInfos', values: [string]): string + encodeFunctionData(functionFragment: 'tokenURI', values: [BigNumberish]): string + encodeFunctionData( + functionFragment: 'updateDescription', + values: [string, string] + ): string + encodeFunctionData( + functionFragment: 'updateMediaURIs', + values: [string, string, string] + ): string + + decodeFunctionResult(functionFragment: 'contractURI', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'initializeWithData', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'tokenInfos', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'tokenURI', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'updateDescription', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'updateMediaURIs', data: BytesLike): Result + + events: { + 'DescriptionUpdated(address,address,string)': EventFragment + 'EditionInitialized(address,string,string,string)': EventFragment + 'MediaURIsUpdated(address,address,string,string)': EventFragment + } + + getEvent(nameOrSignatureOrTopic: 'DescriptionUpdated'): EventFragment + getEvent(nameOrSignatureOrTopic: 'EditionInitialized'): EventFragment + getEvent(nameOrSignatureOrTopic: 'MediaURIsUpdated'): EventFragment +} + +export interface DescriptionUpdatedEventObject { + target: string + sender: string + newDescription: string +} +export type DescriptionUpdatedEvent = TypedEvent< + [string, string, string], + DescriptionUpdatedEventObject +> + +export type DescriptionUpdatedEventFilter = TypedEventFilter + +export interface EditionInitializedEventObject { + target: string + description: string + imageURI: string + animationURI: string +} +export type EditionInitializedEvent = TypedEvent< + [string, string, string, string], + EditionInitializedEventObject +> + +export type EditionInitializedEventFilter = TypedEventFilter + +export interface MediaURIsUpdatedEventObject { + target: string + sender: string + imageURI: string + animationURI: string +} +export type MediaURIsUpdatedEvent = TypedEvent< + [string, string, string, string], + MediaURIsUpdatedEventObject +> + +export type MediaURIsUpdatedEventFilter = TypedEventFilter + +export interface EditionMetadataRenderer extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: EditionMetadataRendererInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + contractURI(overrides?: CallOverrides): Promise<[string]> + + initializeWithData( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenInfos( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, string, string] & { + description: string + imageURI: string + animationURI: string + } + > + + tokenURI(tokenId: BigNumberish, overrides?: CallOverrides): Promise<[string]> + + updateDescription( + target: string, + newDescription: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + updateMediaURIs( + target: string, + imageURI: string, + animationURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + contractURI(overrides?: CallOverrides): Promise + + initializeWithData( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenInfos( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, string, string] & { + description: string + imageURI: string + animationURI: string + } + > + + tokenURI(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + updateDescription( + target: string, + newDescription: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + updateMediaURIs( + target: string, + imageURI: string, + animationURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + callStatic: { + contractURI(overrides?: CallOverrides): Promise + + initializeWithData(data: BytesLike, overrides?: CallOverrides): Promise + + tokenInfos( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, string, string] & { + description: string + imageURI: string + animationURI: string + } + > + + tokenURI(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + updateDescription( + target: string, + newDescription: string, + overrides?: CallOverrides + ): Promise + + updateMediaURIs( + target: string, + imageURI: string, + animationURI: string, + overrides?: CallOverrides + ): Promise + } + + filters: { + 'DescriptionUpdated(address,address,string)'( + target?: string | null, + sender?: null, + newDescription?: null + ): DescriptionUpdatedEventFilter + DescriptionUpdated( + target?: string | null, + sender?: null, + newDescription?: null + ): DescriptionUpdatedEventFilter + + 'EditionInitialized(address,string,string,string)'( + target?: string | null, + description?: null, + imageURI?: null, + animationURI?: null + ): EditionInitializedEventFilter + EditionInitialized( + target?: string | null, + description?: null, + imageURI?: null, + animationURI?: null + ): EditionInitializedEventFilter + + 'MediaURIsUpdated(address,address,string,string)'( + target?: string | null, + sender?: null, + imageURI?: null, + animationURI?: null + ): MediaURIsUpdatedEventFilter + MediaURIsUpdated( + target?: string | null, + sender?: null, + imageURI?: null, + animationURI?: null + ): MediaURIsUpdatedEventFilter + } + + estimateGas: { + contractURI(overrides?: CallOverrides): Promise + + initializeWithData( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenInfos(arg0: string, overrides?: CallOverrides): Promise + + tokenURI(tokenId: BigNumberish, overrides?: CallOverrides): Promise + + updateDescription( + target: string, + newDescription: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + updateMediaURIs( + target: string, + imageURI: string, + animationURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + populateTransaction: { + contractURI(overrides?: CallOverrides): Promise + + initializeWithData( + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenInfos(arg0: string, overrides?: CallOverrides): Promise + + tokenURI( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise + + updateDescription( + target: string, + newDescription: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + updateMediaURIs( + target: string, + imageURI: string, + animationURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/FundsReceiver.ts b/packages/zora-drops-utils/src/constants/typechain/FundsReceiver.ts new file mode 100644 index 0000000..26cb86b --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/FundsReceiver.ts @@ -0,0 +1,68 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumber, Signer, utils } from 'ethers' +import type { EventFragment } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface FundsReceiverInterface extends utils.Interface { + functions: {} + + events: { + 'FundsReceived(address,uint256)': EventFragment + } + + getEvent(nameOrSignatureOrTopic: 'FundsReceived'): EventFragment +} + +export interface FundsReceivedEventObject { + source: string + amount: BigNumber +} +export type FundsReceivedEvent = TypedEvent<[string, BigNumber], FundsReceivedEventObject> + +export type FundsReceivedEventFilter = TypedEventFilter + +export interface FundsReceiver extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: FundsReceiverInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: {} + + callStatic: {} + + filters: { + 'FundsReceived(address,uint256)'( + source?: string | null, + amount?: null + ): FundsReceivedEventFilter + FundsReceived(source?: string | null, amount?: null): FundsReceivedEventFilter + } + + estimateGas: {} + + populateTransaction: {} +} diff --git a/packages/zora-drops-utils/src/constants/typechain/IBeacon.ts b/packages/zora-drops-utils/src/constants/typechain/IBeacon.ts new file mode 100644 index 0000000..0ce51db --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/IBeacon.ts @@ -0,0 +1,76 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface IBeaconInterface extends utils.Interface { + functions: { + 'implementation()': FunctionFragment + } + + getFunction(nameOrSignatureOrTopic: 'implementation'): FunctionFragment + + encodeFunctionData(functionFragment: 'implementation', values?: undefined): string + + decodeFunctionResult(functionFragment: 'implementation', data: BytesLike): Result + + events: {} +} + +export interface IBeacon extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: IBeaconInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + implementation(overrides?: CallOverrides): Promise<[string]> + } + + implementation(overrides?: CallOverrides): Promise + + callStatic: { + implementation(overrides?: CallOverrides): Promise + } + + filters: {} + + estimateGas: { + implementation(overrides?: CallOverrides): Promise + } + + populateTransaction: { + implementation(overrides?: CallOverrides): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/IERC721Drop.ts b/packages/zora-drops-utils/src/constants/typechain/IERC721Drop.ts new file mode 100644 index 0000000..7bdb3de --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/IERC721Drop.ts @@ -0,0 +1,476 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export declare namespace IERC721Drop { + export type AddressMintDetailsStruct = { + totalMints: BigNumberish + presaleMints: BigNumberish + publicMints: BigNumberish + } + + export type AddressMintDetailsStructOutput = [BigNumber, BigNumber, BigNumber] & { + totalMints: BigNumber + presaleMints: BigNumber + publicMints: BigNumber + } + + export type SaleDetailsStruct = { + publicSaleActive: boolean + presaleActive: boolean + publicSalePrice: BigNumberish + publicSaleStart: BigNumberish + publicSaleEnd: BigNumberish + presaleStart: BigNumberish + presaleEnd: BigNumberish + presaleMerkleRoot: BytesLike + maxSalePurchasePerAddress: BigNumberish + totalMinted: BigNumberish + maxSupply: BigNumberish + } + + export type SaleDetailsStructOutput = [ + boolean, + boolean, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber + ] & { + publicSaleActive: boolean + presaleActive: boolean + publicSalePrice: BigNumber + publicSaleStart: BigNumber + publicSaleEnd: BigNumber + presaleStart: BigNumber + presaleEnd: BigNumber + presaleMerkleRoot: string + maxSalePurchasePerAddress: BigNumber + totalMinted: BigNumber + maxSupply: BigNumber + } +} + +export interface IERC721DropInterface extends utils.Interface { + functions: { + 'adminMint(address,uint256)': FunctionFragment + 'adminMintAirdrop(address[])': FunctionFragment + 'isAdmin(address)': FunctionFragment + 'mintedPerAddress(address)': FunctionFragment + 'owner()': FunctionFragment + 'purchase(uint256)': FunctionFragment + 'purchasePresale(uint256,uint256,uint256,bytes32[])': FunctionFragment + 'saleDetails()': FunctionFragment + 'setMetadataRenderer(address,bytes)': FunctionFragment + } + + getFunction( + nameOrSignatureOrTopic: + | 'adminMint' + | 'adminMintAirdrop' + | 'isAdmin' + | 'mintedPerAddress' + | 'owner' + | 'purchase' + | 'purchasePresale' + | 'saleDetails' + | 'setMetadataRenderer' + ): FunctionFragment + + encodeFunctionData( + functionFragment: 'adminMint', + values: [string, BigNumberish] + ): string + encodeFunctionData(functionFragment: 'adminMintAirdrop', values: [string[]]): string + encodeFunctionData(functionFragment: 'isAdmin', values: [string]): string + encodeFunctionData(functionFragment: 'mintedPerAddress', values: [string]): string + encodeFunctionData(functionFragment: 'owner', values?: undefined): string + encodeFunctionData(functionFragment: 'purchase', values: [BigNumberish]): string + encodeFunctionData( + functionFragment: 'purchasePresale', + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike[]] + ): string + encodeFunctionData(functionFragment: 'saleDetails', values?: undefined): string + encodeFunctionData( + functionFragment: 'setMetadataRenderer', + values: [string, BytesLike] + ): string + + decodeFunctionResult(functionFragment: 'adminMint', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'adminMintAirdrop', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'isAdmin', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'mintedPerAddress', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'purchase', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'purchasePresale', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'saleDetails', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'setMetadataRenderer', data: BytesLike): Result + + events: { + 'FundsRecipientChanged(address,address)': EventFragment + 'OpenMintFinalized(address,uint256)': EventFragment + 'Sale(address,uint256,uint256,uint256)': EventFragment + 'SalesConfigChanged(address)': EventFragment + 'UpdatedMetadataRenderer(address,address)': EventFragment + } + + getEvent(nameOrSignatureOrTopic: 'FundsRecipientChanged'): EventFragment + getEvent(nameOrSignatureOrTopic: 'OpenMintFinalized'): EventFragment + getEvent(nameOrSignatureOrTopic: 'Sale'): EventFragment + getEvent(nameOrSignatureOrTopic: 'SalesConfigChanged'): EventFragment + getEvent(nameOrSignatureOrTopic: 'UpdatedMetadataRenderer'): EventFragment +} + +export interface FundsRecipientChangedEventObject { + newAddress: string + changedBy: string +} +export type FundsRecipientChangedEvent = TypedEvent< + [string, string], + FundsRecipientChangedEventObject +> + +export type FundsRecipientChangedEventFilter = + TypedEventFilter + +export interface OpenMintFinalizedEventObject { + sender: string + numberOfMints: BigNumber +} +export type OpenMintFinalizedEvent = TypedEvent< + [string, BigNumber], + OpenMintFinalizedEventObject +> + +export type OpenMintFinalizedEventFilter = TypedEventFilter + +export interface SaleEventObject { + to: string + quantity: BigNumber + pricePerToken: BigNumber + firstPurchasedTokenId: BigNumber +} +export type SaleEvent = TypedEvent< + [string, BigNumber, BigNumber, BigNumber], + SaleEventObject +> + +export type SaleEventFilter = TypedEventFilter + +export interface SalesConfigChangedEventObject { + changedBy: string +} +export type SalesConfigChangedEvent = TypedEvent<[string], SalesConfigChangedEventObject> + +export type SalesConfigChangedEventFilter = TypedEventFilter + +export interface UpdatedMetadataRendererEventObject { + sender: string + renderer: string +} +export type UpdatedMetadataRendererEvent = TypedEvent< + [string, string], + UpdatedMetadataRendererEventObject +> + +export type UpdatedMetadataRendererEventFilter = + TypedEventFilter + +export interface IERC721Drop extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: IERC721DropInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + adminMint( + to: string, + quantity: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + adminMintAirdrop( + to: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise + + isAdmin(user: string, overrides?: CallOverrides): Promise<[boolean]> + + mintedPerAddress( + minter: string, + overrides?: CallOverrides + ): Promise<[IERC721Drop.AddressMintDetailsStructOutput]> + + owner(overrides?: CallOverrides): Promise<[string]> + + purchase( + quantity: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + purchasePresale( + quantity: BigNumberish, + maxQuantity: BigNumberish, + pricePerToken: BigNumberish, + merkleProof: BytesLike[], + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + saleDetails(overrides?: CallOverrides): Promise<[IERC721Drop.SaleDetailsStructOutput]> + + setMetadataRenderer( + newRenderer: string, + setupRenderer: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + adminMint( + to: string, + quantity: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + adminMintAirdrop( + to: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise + + isAdmin(user: string, overrides?: CallOverrides): Promise + + mintedPerAddress( + minter: string, + overrides?: CallOverrides + ): Promise + + owner(overrides?: CallOverrides): Promise + + purchase( + quantity: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + purchasePresale( + quantity: BigNumberish, + maxQuantity: BigNumberish, + pricePerToken: BigNumberish, + merkleProof: BytesLike[], + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + saleDetails(overrides?: CallOverrides): Promise + + setMetadataRenderer( + newRenderer: string, + setupRenderer: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + callStatic: { + adminMint( + to: string, + quantity: BigNumberish, + overrides?: CallOverrides + ): Promise + + adminMintAirdrop(to: string[], overrides?: CallOverrides): Promise + + isAdmin(user: string, overrides?: CallOverrides): Promise + + mintedPerAddress( + minter: string, + overrides?: CallOverrides + ): Promise + + owner(overrides?: CallOverrides): Promise + + purchase(quantity: BigNumberish, overrides?: CallOverrides): Promise + + purchasePresale( + quantity: BigNumberish, + maxQuantity: BigNumberish, + pricePerToken: BigNumberish, + merkleProof: BytesLike[], + overrides?: CallOverrides + ): Promise + + saleDetails(overrides?: CallOverrides): Promise + + setMetadataRenderer( + newRenderer: string, + setupRenderer: BytesLike, + overrides?: CallOverrides + ): Promise + } + + filters: { + 'FundsRecipientChanged(address,address)'( + newAddress?: string | null, + changedBy?: string | null + ): FundsRecipientChangedEventFilter + FundsRecipientChanged( + newAddress?: string | null, + changedBy?: string | null + ): FundsRecipientChangedEventFilter + + 'OpenMintFinalized(address,uint256)'( + sender?: string | null, + numberOfMints?: null + ): OpenMintFinalizedEventFilter + OpenMintFinalized( + sender?: string | null, + numberOfMints?: null + ): OpenMintFinalizedEventFilter + + 'Sale(address,uint256,uint256,uint256)'( + to?: string | null, + quantity?: BigNumberish | null, + pricePerToken?: BigNumberish | null, + firstPurchasedTokenId?: null + ): SaleEventFilter + Sale( + to?: string | null, + quantity?: BigNumberish | null, + pricePerToken?: BigNumberish | null, + firstPurchasedTokenId?: null + ): SaleEventFilter + + 'SalesConfigChanged(address)'( + changedBy?: string | null + ): SalesConfigChangedEventFilter + SalesConfigChanged(changedBy?: string | null): SalesConfigChangedEventFilter + + 'UpdatedMetadataRenderer(address,address)'( + sender?: null, + renderer?: null + ): UpdatedMetadataRendererEventFilter + UpdatedMetadataRenderer( + sender?: null, + renderer?: null + ): UpdatedMetadataRendererEventFilter + } + + estimateGas: { + adminMint( + to: string, + quantity: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + adminMintAirdrop( + to: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise + + isAdmin(user: string, overrides?: CallOverrides): Promise + + mintedPerAddress(minter: string, overrides?: CallOverrides): Promise + + owner(overrides?: CallOverrides): Promise + + purchase( + quantity: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + purchasePresale( + quantity: BigNumberish, + maxQuantity: BigNumberish, + pricePerToken: BigNumberish, + merkleProof: BytesLike[], + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + saleDetails(overrides?: CallOverrides): Promise + + setMetadataRenderer( + newRenderer: string, + setupRenderer: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + populateTransaction: { + adminMint( + to: string, + quantity: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + adminMintAirdrop( + to: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise + + isAdmin(user: string, overrides?: CallOverrides): Promise + + mintedPerAddress( + minter: string, + overrides?: CallOverrides + ): Promise + + owner(overrides?: CallOverrides): Promise + + purchase( + quantity: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + purchasePresale( + quantity: BigNumberish, + maxQuantity: BigNumberish, + pricePerToken: BigNumberish, + merkleProof: BytesLike[], + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + saleDetails(overrides?: CallOverrides): Promise + + setMetadataRenderer( + newRenderer: string, + setupRenderer: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/IMetadataRenderer.ts b/packages/zora-drops-utils/src/constants/typechain/IMetadataRenderer.ts new file mode 100644 index 0000000..fd877be --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/IMetadataRenderer.ts @@ -0,0 +1,119 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface IMetadataRendererInterface extends utils.Interface { + functions: { + 'contractURI()': FunctionFragment + 'initializeWithData(bytes)': FunctionFragment + 'tokenURI(uint256)': FunctionFragment + } + + getFunction( + nameOrSignatureOrTopic: 'contractURI' | 'initializeWithData' | 'tokenURI' + ): FunctionFragment + + encodeFunctionData(functionFragment: 'contractURI', values?: undefined): string + encodeFunctionData(functionFragment: 'initializeWithData', values: [BytesLike]): string + encodeFunctionData(functionFragment: 'tokenURI', values: [BigNumberish]): string + + decodeFunctionResult(functionFragment: 'contractURI', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'initializeWithData', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'tokenURI', data: BytesLike): Result + + events: {} +} + +export interface IMetadataRenderer extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: IMetadataRendererInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + contractURI(overrides?: CallOverrides): Promise<[string]> + + initializeWithData( + initData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenURI(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]> + } + + contractURI(overrides?: CallOverrides): Promise + + initializeWithData( + initData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenURI(arg0: BigNumberish, overrides?: CallOverrides): Promise + + callStatic: { + contractURI(overrides?: CallOverrides): Promise + + initializeWithData(initData: BytesLike, overrides?: CallOverrides): Promise + + tokenURI(arg0: BigNumberish, overrides?: CallOverrides): Promise + } + + filters: {} + + estimateGas: { + contractURI(overrides?: CallOverrides): Promise + + initializeWithData( + initData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenURI(arg0: BigNumberish, overrides?: CallOverrides): Promise + } + + populateTransaction: { + contractURI(overrides?: CallOverrides): Promise + + initializeWithData( + initData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenURI(arg0: BigNumberish, overrides?: CallOverrides): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/IZoraDrop.ts b/packages/zora-drops-utils/src/constants/typechain/IZoraDrop.ts new file mode 100644 index 0000000..ba3f624 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/IZoraDrop.ts @@ -0,0 +1,343 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export declare namespace IZoraDrop { + export type AddressMintDetailsStruct = { + totalMints: BigNumberish + presaleMints: BigNumberish + publicMints: BigNumberish + } + + export type AddressMintDetailsStructOutput = [BigNumber, BigNumber, BigNumber] & { + totalMints: BigNumber + presaleMints: BigNumber + publicMints: BigNumber + } + + export type SaleDetailsStruct = { + presaleActive: boolean + publicSaleActive: boolean + publicSaleStart: BigNumberish + publicSaleEnd: BigNumberish + publicSalePrice: BigNumberish + presaleStart: BigNumberish + presaleEnd: BigNumberish + presaleMerkleRoot: BytesLike + maxSalePurchasePerAddress: BigNumberish + totalMinted: BigNumberish + maxSupply: BigNumberish + } + + export type SaleDetailsStructOutput = [ + boolean, + boolean, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber + ] & { + presaleActive: boolean + publicSaleActive: boolean + publicSaleStart: BigNumber + publicSaleEnd: BigNumber + publicSalePrice: BigNumber + presaleStart: BigNumber + presaleEnd: BigNumber + presaleMerkleRoot: string + maxSalePurchasePerAddress: BigNumber + totalMinted: BigNumber + maxSupply: BigNumber + } +} + +export interface IZoraDropInterface extends utils.Interface { + functions: { + 'adminMint(address,uint256)': FunctionFragment + 'adminMintAirdrop(address[])': FunctionFragment + 'mintedPerAddress(address)': FunctionFragment + 'owner()': FunctionFragment + 'purchase(uint256)': FunctionFragment + 'purchasePresale(uint256,uint256,uint256,bytes32[])': FunctionFragment + 'saleDetails()': FunctionFragment + } + + getFunction( + nameOrSignatureOrTopic: + | 'adminMint' + | 'adminMintAirdrop' + | 'mintedPerAddress' + | 'owner' + | 'purchase' + | 'purchasePresale' + | 'saleDetails' + ): FunctionFragment + + encodeFunctionData( + functionFragment: 'adminMint', + values: [string, BigNumberish] + ): string + encodeFunctionData(functionFragment: 'adminMintAirdrop', values: [string[]]): string + encodeFunctionData(functionFragment: 'mintedPerAddress', values: [string]): string + encodeFunctionData(functionFragment: 'owner', values?: undefined): string + encodeFunctionData(functionFragment: 'purchase', values: [BigNumberish]): string + encodeFunctionData( + functionFragment: 'purchasePresale', + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike[]] + ): string + encodeFunctionData(functionFragment: 'saleDetails', values?: undefined): string + + decodeFunctionResult(functionFragment: 'adminMint', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'adminMintAirdrop', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'mintedPerAddress', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'purchase', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'purchasePresale', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'saleDetails', data: BytesLike): Result + + events: { + 'Sale(address,uint256,uint256,uint256)': EventFragment + } + + getEvent(nameOrSignatureOrTopic: 'Sale'): EventFragment +} + +export interface SaleEventObject { + to: string + quantity: BigNumber + pricePerToken: BigNumber + firstPurchasedTokenId: BigNumber +} +export type SaleEvent = TypedEvent< + [string, BigNumber, BigNumber, BigNumber], + SaleEventObject +> + +export type SaleEventFilter = TypedEventFilter + +export interface IZoraDrop extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: IZoraDropInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + adminMint( + to: string, + quantity: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + adminMintAirdrop( + to: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise + + mintedPerAddress( + minter: string, + overrides?: CallOverrides + ): Promise<[IZoraDrop.AddressMintDetailsStructOutput]> + + owner(overrides?: CallOverrides): Promise<[string]> + + purchase( + quantity: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + purchasePresale( + quantity: BigNumberish, + maxQuantity: BigNumberish, + pricePerToken: BigNumberish, + merkleProof: BytesLike[], + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + saleDetails(overrides?: CallOverrides): Promise<[IZoraDrop.SaleDetailsStructOutput]> + } + + adminMint( + to: string, + quantity: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + adminMintAirdrop( + to: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise + + mintedPerAddress( + minter: string, + overrides?: CallOverrides + ): Promise + + owner(overrides?: CallOverrides): Promise + + purchase( + quantity: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + purchasePresale( + quantity: BigNumberish, + maxQuantity: BigNumberish, + pricePerToken: BigNumberish, + merkleProof: BytesLike[], + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + saleDetails(overrides?: CallOverrides): Promise + + callStatic: { + adminMint( + to: string, + quantity: BigNumberish, + overrides?: CallOverrides + ): Promise + + adminMintAirdrop(to: string[], overrides?: CallOverrides): Promise + + mintedPerAddress( + minter: string, + overrides?: CallOverrides + ): Promise + + owner(overrides?: CallOverrides): Promise + + purchase(quantity: BigNumberish, overrides?: CallOverrides): Promise + + purchasePresale( + quantity: BigNumberish, + maxQuantity: BigNumberish, + pricePerToken: BigNumberish, + merkleProof: BytesLike[], + overrides?: CallOverrides + ): Promise + + saleDetails(overrides?: CallOverrides): Promise + } + + filters: { + 'Sale(address,uint256,uint256,uint256)'( + to?: string | null, + quantity?: BigNumberish | null, + pricePerToken?: BigNumberish | null, + firstPurchasedTokenId?: null + ): SaleEventFilter + Sale( + to?: string | null, + quantity?: BigNumberish | null, + pricePerToken?: BigNumberish | null, + firstPurchasedTokenId?: null + ): SaleEventFilter + } + + estimateGas: { + adminMint( + to: string, + quantity: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + adminMintAirdrop( + to: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise + + mintedPerAddress(minter: string, overrides?: CallOverrides): Promise + + owner(overrides?: CallOverrides): Promise + + purchase( + quantity: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + purchasePresale( + quantity: BigNumberish, + maxQuantity: BigNumberish, + pricePerToken: BigNumberish, + merkleProof: BytesLike[], + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + saleDetails(overrides?: CallOverrides): Promise + } + + populateTransaction: { + adminMint( + to: string, + quantity: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + adminMintAirdrop( + to: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise + + mintedPerAddress( + minter: string, + overrides?: CallOverrides + ): Promise + + owner(overrides?: CallOverrides): Promise + + purchase( + quantity: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + purchasePresale( + quantity: BigNumberish, + maxQuantity: BigNumberish, + pricePerToken: BigNumberish, + merkleProof: BytesLike[], + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + saleDetails(overrides?: CallOverrides): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/IZoraFeeManager.ts b/packages/zora-drops-utils/src/constants/typechain/IZoraFeeManager.ts new file mode 100644 index 0000000..7fe4d11 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/IZoraFeeManager.ts @@ -0,0 +1,96 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface IZoraFeeManagerInterface extends utils.Interface { + functions: { + 'getZORAWithdrawFeesBPS(address)': FunctionFragment + } + + getFunction(nameOrSignatureOrTopic: 'getZORAWithdrawFeesBPS'): FunctionFragment + + encodeFunctionData(functionFragment: 'getZORAWithdrawFeesBPS', values: [string]): string + + decodeFunctionResult( + functionFragment: 'getZORAWithdrawFeesBPS', + data: BytesLike + ): Result + + events: {} +} + +export interface IZoraFeeManager extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: IZoraFeeManagerInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + getZORAWithdrawFeesBPS( + sender: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + getZORAWithdrawFeesBPS( + sender: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + callStatic: { + getZORAWithdrawFeesBPS( + sender: string, + overrides?: CallOverrides + ): Promise<[string, BigNumber]> + } + + filters: {} + + estimateGas: { + getZORAWithdrawFeesBPS( + sender: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + populateTransaction: { + getZORAWithdrawFeesBPS( + sender: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/MetadataRenderAdminCheck.t.sol/TestAdmin.ts b/packages/zora-drops-utils/src/constants/typechain/MetadataRenderAdminCheck.t.sol/TestAdmin.ts new file mode 100644 index 0000000..4c9f0cf --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/MetadataRenderAdminCheck.t.sol/TestAdmin.ts @@ -0,0 +1,102 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from '../common' + +export interface TestAdminInterface extends utils.Interface { + functions: { + 'updateSomething(address)': FunctionFragment + } + + getFunction(nameOrSignatureOrTopic: 'updateSomething'): FunctionFragment + + encodeFunctionData(functionFragment: 'updateSomething', values: [string]): string + + decodeFunctionResult(functionFragment: 'updateSomething', data: BytesLike): Result + + events: { + 'Ok()': EventFragment + } + + getEvent(nameOrSignatureOrTopic: 'Ok'): EventFragment +} + +export interface OkEventObject {} +export type OkEvent = TypedEvent<[], OkEventObject> + +export type OkEventFilter = TypedEventFilter + +export interface TestAdmin extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: TestAdminInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + updateSomething( + target: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + updateSomething( + target: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + callStatic: { + updateSomething(target: string, overrides?: CallOverrides): Promise + } + + filters: { + 'Ok()'(): OkEventFilter + Ok(): OkEventFilter + } + + estimateGas: { + updateSomething( + target: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + populateTransaction: { + updateSomething( + target: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/MetadataRenderAdminCheck.t.sol/index.ts b/packages/zora-drops-utils/src/constants/typechain/MetadataRenderAdminCheck.t.sol/index.ts new file mode 100644 index 0000000..fc37f23 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/MetadataRenderAdminCheck.t.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { TestAdmin } from './TestAdmin' diff --git a/packages/zora-drops-utils/src/constants/typechain/MetadataRenderAdminCheck.ts b/packages/zora-drops-utils/src/constants/typechain/MetadataRenderAdminCheck.ts new file mode 100644 index 0000000..df4e51b --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/MetadataRenderAdminCheck.ts @@ -0,0 +1,50 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from 'ethers' + +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface MetadataRenderAdminCheckInterface extends utils.Interface { + functions: {} + + events: {} +} + +export interface MetadataRenderAdminCheck extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: MetadataRenderAdminCheckInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: {} + + callStatic: {} + + filters: {} + + estimateGas: {} + + populateTransaction: {} +} diff --git a/packages/zora-drops-utils/src/constants/typechain/MockMetadataRenderer.ts b/packages/zora-drops-utils/src/constants/typechain/MockMetadataRenderer.ts new file mode 100644 index 0000000..00c291c --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/MockMetadataRenderer.ts @@ -0,0 +1,119 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface MockMetadataRendererInterface extends utils.Interface { + functions: { + 'contractURI()': FunctionFragment + 'initializeWithData(bytes)': FunctionFragment + 'tokenURI(uint256)': FunctionFragment + } + + getFunction( + nameOrSignatureOrTopic: 'contractURI' | 'initializeWithData' | 'tokenURI' + ): FunctionFragment + + encodeFunctionData(functionFragment: 'contractURI', values?: undefined): string + encodeFunctionData(functionFragment: 'initializeWithData', values: [BytesLike]): string + encodeFunctionData(functionFragment: 'tokenURI', values: [BigNumberish]): string + + decodeFunctionResult(functionFragment: 'contractURI', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'initializeWithData', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'tokenURI', data: BytesLike): Result + + events: {} +} + +export interface MockMetadataRenderer extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: MockMetadataRendererInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + contractURI(overrides?: CallOverrides): Promise<[string]> + + initializeWithData( + initData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenURI(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]> + } + + contractURI(overrides?: CallOverrides): Promise + + initializeWithData( + initData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenURI(arg0: BigNumberish, overrides?: CallOverrides): Promise + + callStatic: { + contractURI(overrides?: CallOverrides): Promise + + initializeWithData(initData: BytesLike, overrides?: CallOverrides): Promise + + tokenURI(arg0: BigNumberish, overrides?: CallOverrides): Promise + } + + filters: {} + + estimateGas: { + contractURI(overrides?: CallOverrides): Promise + + initializeWithData( + initData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenURI(arg0: BigNumberish, overrides?: CallOverrides): Promise + } + + populateTransaction: { + contractURI(overrides?: CallOverrides): Promise + + initializeWithData( + initData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + tokenURI(arg0: BigNumberish, overrides?: CallOverrides): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/OwnableSkeleton.ts b/packages/zora-drops-utils/src/constants/typechain/OwnableSkeleton.ts new file mode 100644 index 0000000..f3bb4ca --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/OwnableSkeleton.ts @@ -0,0 +1,100 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface OwnableSkeletonInterface extends utils.Interface { + functions: { + 'owner()': FunctionFragment + } + + getFunction(nameOrSignatureOrTopic: 'owner'): FunctionFragment + + encodeFunctionData(functionFragment: 'owner', values?: undefined): string + + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result + + events: { + 'OwnershipTransferred(address,address)': EventFragment + } + + getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment +} + +export interface OwnershipTransferredEventObject { + previousOwner: string + newOwner: string +} +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +> + +export type OwnershipTransferredEventFilter = TypedEventFilter + +export interface OwnableSkeleton extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: OwnableSkeletonInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + owner(overrides?: CallOverrides): Promise<[string]> + } + + owner(overrides?: CallOverrides): Promise + + callStatic: { + owner(overrides?: CallOverrides): Promise + } + + filters: { + 'OwnershipTransferred(address,address)'( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter + OwnershipTransferred( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter + } + + estimateGas: { + owner(overrides?: CallOverrides): Promise + } + + populateTransaction: { + owner(overrides?: CallOverrides): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/Proxy.ts b/packages/zora-drops-utils/src/constants/typechain/Proxy.ts new file mode 100644 index 0000000..3b94b51 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/Proxy.ts @@ -0,0 +1,50 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from 'ethers' + +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface ProxyInterface extends utils.Interface { + functions: {} + + events: {} +} + +export interface Proxy extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: ProxyInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: {} + + callStatic: {} + + filters: {} + + estimateGas: {} + + populateTransaction: {} +} diff --git a/packages/zora-drops-utils/src/constants/typechain/SharedNFTLogic.ts b/packages/zora-drops-utils/src/constants/typechain/SharedNFTLogic.ts new file mode 100644 index 0000000..9b8c41e --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/SharedNFTLogic.ts @@ -0,0 +1,268 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface SharedNFTLogicInterface extends utils.Interface { + functions: { + 'base64Encode(bytes)': FunctionFragment + 'createMetadataEdition(string,string,string,string,uint256,uint256)': FunctionFragment + 'createMetadataJSON(string,string,string,uint256,uint256)': FunctionFragment + 'encodeMetadataJSON(bytes)': FunctionFragment + 'numberToString(uint256)': FunctionFragment + 'tokenMediaData(string,string,uint256)': FunctionFragment + } + + getFunction( + nameOrSignatureOrTopic: + | 'base64Encode' + | 'createMetadataEdition' + | 'createMetadataJSON' + | 'encodeMetadataJSON' + | 'numberToString' + | 'tokenMediaData' + ): FunctionFragment + + encodeFunctionData(functionFragment: 'base64Encode', values: [BytesLike]): string + encodeFunctionData( + functionFragment: 'createMetadataEdition', + values: [string, string, string, string, BigNumberish, BigNumberish] + ): string + encodeFunctionData( + functionFragment: 'createMetadataJSON', + values: [string, string, string, BigNumberish, BigNumberish] + ): string + encodeFunctionData(functionFragment: 'encodeMetadataJSON', values: [BytesLike]): string + encodeFunctionData(functionFragment: 'numberToString', values: [BigNumberish]): string + encodeFunctionData( + functionFragment: 'tokenMediaData', + values: [string, string, BigNumberish] + ): string + + decodeFunctionResult(functionFragment: 'base64Encode', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'createMetadataEdition', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'createMetadataJSON', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'encodeMetadataJSON', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'numberToString', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'tokenMediaData', data: BytesLike): Result + + events: {} +} + +export interface SharedNFTLogic extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: SharedNFTLogicInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + base64Encode(unencoded: BytesLike, overrides?: CallOverrides): Promise<[string]> + + createMetadataEdition( + name: string, + description: string, + imageUrl: string, + animationUrl: string, + tokenOfEdition: BigNumberish, + editionSize: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]> + + createMetadataJSON( + name: string, + description: string, + mediaData: string, + tokenOfEdition: BigNumberish, + editionSize: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]> + + encodeMetadataJSON(json: BytesLike, overrides?: CallOverrides): Promise<[string]> + + numberToString(value: BigNumberish, overrides?: CallOverrides): Promise<[string]> + + tokenMediaData( + imageUrl: string, + animationUrl: string, + tokenOfEdition: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]> + } + + base64Encode(unencoded: BytesLike, overrides?: CallOverrides): Promise + + createMetadataEdition( + name: string, + description: string, + imageUrl: string, + animationUrl: string, + tokenOfEdition: BigNumberish, + editionSize: BigNumberish, + overrides?: CallOverrides + ): Promise + + createMetadataJSON( + name: string, + description: string, + mediaData: string, + tokenOfEdition: BigNumberish, + editionSize: BigNumberish, + overrides?: CallOverrides + ): Promise + + encodeMetadataJSON(json: BytesLike, overrides?: CallOverrides): Promise + + numberToString(value: BigNumberish, overrides?: CallOverrides): Promise + + tokenMediaData( + imageUrl: string, + animationUrl: string, + tokenOfEdition: BigNumberish, + overrides?: CallOverrides + ): Promise + + callStatic: { + base64Encode(unencoded: BytesLike, overrides?: CallOverrides): Promise + + createMetadataEdition( + name: string, + description: string, + imageUrl: string, + animationUrl: string, + tokenOfEdition: BigNumberish, + editionSize: BigNumberish, + overrides?: CallOverrides + ): Promise + + createMetadataJSON( + name: string, + description: string, + mediaData: string, + tokenOfEdition: BigNumberish, + editionSize: BigNumberish, + overrides?: CallOverrides + ): Promise + + encodeMetadataJSON(json: BytesLike, overrides?: CallOverrides): Promise + + numberToString(value: BigNumberish, overrides?: CallOverrides): Promise + + tokenMediaData( + imageUrl: string, + animationUrl: string, + tokenOfEdition: BigNumberish, + overrides?: CallOverrides + ): Promise + } + + filters: {} + + estimateGas: { + base64Encode(unencoded: BytesLike, overrides?: CallOverrides): Promise + + createMetadataEdition( + name: string, + description: string, + imageUrl: string, + animationUrl: string, + tokenOfEdition: BigNumberish, + editionSize: BigNumberish, + overrides?: CallOverrides + ): Promise + + createMetadataJSON( + name: string, + description: string, + mediaData: string, + tokenOfEdition: BigNumberish, + editionSize: BigNumberish, + overrides?: CallOverrides + ): Promise + + encodeMetadataJSON(json: BytesLike, overrides?: CallOverrides): Promise + + numberToString(value: BigNumberish, overrides?: CallOverrides): Promise + + tokenMediaData( + imageUrl: string, + animationUrl: string, + tokenOfEdition: BigNumberish, + overrides?: CallOverrides + ): Promise + } + + populateTransaction: { + base64Encode( + unencoded: BytesLike, + overrides?: CallOverrides + ): Promise + + createMetadataEdition( + name: string, + description: string, + imageUrl: string, + animationUrl: string, + tokenOfEdition: BigNumberish, + editionSize: BigNumberish, + overrides?: CallOverrides + ): Promise + + createMetadataJSON( + name: string, + description: string, + mediaData: string, + tokenOfEdition: BigNumberish, + editionSize: BigNumberish, + overrides?: CallOverrides + ): Promise + + encodeMetadataJSON( + json: BytesLike, + overrides?: CallOverrides + ): Promise + + numberToString( + value: BigNumberish, + overrides?: CallOverrides + ): Promise + + tokenMediaData( + imageUrl: string, + animationUrl: string, + tokenOfEdition: BigNumberish, + overrides?: CallOverrides + ): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/Version.ts b/packages/zora-drops-utils/src/constants/typechain/Version.ts new file mode 100644 index 0000000..06e616d --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/Version.ts @@ -0,0 +1,76 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface VersionInterface extends utils.Interface { + functions: { + 'contractVersion()': FunctionFragment + } + + getFunction(nameOrSignatureOrTopic: 'contractVersion'): FunctionFragment + + encodeFunctionData(functionFragment: 'contractVersion', values?: undefined): string + + decodeFunctionResult(functionFragment: 'contractVersion', data: BytesLike): Result + + events: {} +} + +export interface Version extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: VersionInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + contractVersion(overrides?: CallOverrides): Promise<[number]> + } + + contractVersion(overrides?: CallOverrides): Promise + + callStatic: { + contractVersion(overrides?: CallOverrides): Promise + } + + filters: {} + + estimateGas: { + contractVersion(overrides?: CallOverrides): Promise + } + + populateTransaction: { + contractVersion(overrides?: CallOverrides): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/ZoraFeeManager.ts b/packages/zora-drops-utils/src/constants/typechain/ZoraFeeManager.ts new file mode 100644 index 0000000..2a61624 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/ZoraFeeManager.ts @@ -0,0 +1,245 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface ZoraFeeManagerInterface extends utils.Interface { + functions: { + 'getZORAWithdrawFeesBPS(address)': FunctionFragment + 'owner()': FunctionFragment + 'renounceOwnership()': FunctionFragment + 'setFeeOverride(address,uint256)': FunctionFragment + 'transferOwnership(address)': FunctionFragment + } + + getFunction( + nameOrSignatureOrTopic: + | 'getZORAWithdrawFeesBPS' + | 'owner' + | 'renounceOwnership' + | 'setFeeOverride' + | 'transferOwnership' + ): FunctionFragment + + encodeFunctionData(functionFragment: 'getZORAWithdrawFeesBPS', values: [string]): string + encodeFunctionData(functionFragment: 'owner', values?: undefined): string + encodeFunctionData(functionFragment: 'renounceOwnership', values?: undefined): string + encodeFunctionData( + functionFragment: 'setFeeOverride', + values: [string, BigNumberish] + ): string + encodeFunctionData(functionFragment: 'transferOwnership', values: [string]): string + + decodeFunctionResult( + functionFragment: 'getZORAWithdrawFeesBPS', + data: BytesLike + ): Result + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'renounceOwnership', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'setFeeOverride', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'transferOwnership', data: BytesLike): Result + + events: { + 'FeeOverrideSet(address,uint256)': EventFragment + 'OwnershipTransferred(address,address)': EventFragment + } + + getEvent(nameOrSignatureOrTopic: 'FeeOverrideSet'): EventFragment + getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment +} + +export interface FeeOverrideSetEventObject { + arg0: string + arg1: BigNumber +} +export type FeeOverrideSetEvent = TypedEvent< + [string, BigNumber], + FeeOverrideSetEventObject +> + +export type FeeOverrideSetEventFilter = TypedEventFilter + +export interface OwnershipTransferredEventObject { + previousOwner: string + newOwner: string +} +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +> + +export type OwnershipTransferredEventFilter = TypedEventFilter + +export interface ZoraFeeManager extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: ZoraFeeManagerInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + getZORAWithdrawFeesBPS( + mediaContract: string, + overrides?: CallOverrides + ): Promise<[string, BigNumber]> + + owner(overrides?: CallOverrides): Promise<[string]> + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setFeeOverride( + mediaContract: string, + amountBPS: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + getZORAWithdrawFeesBPS( + mediaContract: string, + overrides?: CallOverrides + ): Promise<[string, BigNumber]> + + owner(overrides?: CallOverrides): Promise + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setFeeOverride( + mediaContract: string, + amountBPS: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + callStatic: { + getZORAWithdrawFeesBPS( + mediaContract: string, + overrides?: CallOverrides + ): Promise<[string, BigNumber]> + + owner(overrides?: CallOverrides): Promise + + renounceOwnership(overrides?: CallOverrides): Promise + + setFeeOverride( + mediaContract: string, + amountBPS: BigNumberish, + overrides?: CallOverrides + ): Promise + + transferOwnership(newOwner: string, overrides?: CallOverrides): Promise + } + + filters: { + 'FeeOverrideSet(address,uint256)'( + arg0?: string | null, + arg1?: BigNumberish | null + ): FeeOverrideSetEventFilter + FeeOverrideSet( + arg0?: string | null, + arg1?: BigNumberish | null + ): FeeOverrideSetEventFilter + + 'OwnershipTransferred(address,address)'( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter + OwnershipTransferred( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter + } + + estimateGas: { + getZORAWithdrawFeesBPS( + mediaContract: string, + overrides?: CallOverrides + ): Promise + + owner(overrides?: CallOverrides): Promise + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setFeeOverride( + mediaContract: string, + amountBPS: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + populateTransaction: { + getZORAWithdrawFeesBPS( + mediaContract: string, + overrides?: CallOverrides + ): Promise + + owner(overrides?: CallOverrides): Promise + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setFeeOverride( + mediaContract: string, + amountBPS: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/ZoraNFTCreatorProxy.ts b/packages/zora-drops-utils/src/constants/typechain/ZoraNFTCreatorProxy.ts new file mode 100644 index 0000000..e8af143 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/ZoraNFTCreatorProxy.ts @@ -0,0 +1,92 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from 'ethers' +import type { EventFragment } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface ZoraNFTCreatorProxyInterface extends utils.Interface { + functions: {} + + events: { + 'AdminChanged(address,address)': EventFragment + 'BeaconUpgraded(address)': EventFragment + 'Upgraded(address)': EventFragment + } + + getEvent(nameOrSignatureOrTopic: 'AdminChanged'): EventFragment + getEvent(nameOrSignatureOrTopic: 'BeaconUpgraded'): EventFragment + getEvent(nameOrSignatureOrTopic: 'Upgraded'): EventFragment +} + +export interface AdminChangedEventObject { + previousAdmin: string + newAdmin: string +} +export type AdminChangedEvent = TypedEvent<[string, string], AdminChangedEventObject> + +export type AdminChangedEventFilter = TypedEventFilter + +export interface BeaconUpgradedEventObject { + beacon: string +} +export type BeaconUpgradedEvent = TypedEvent<[string], BeaconUpgradedEventObject> + +export type BeaconUpgradedEventFilter = TypedEventFilter + +export interface UpgradedEventObject { + implementation: string +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject> + +export type UpgradedEventFilter = TypedEventFilter + +export interface ZoraNFTCreatorProxy extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: ZoraNFTCreatorProxyInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: {} + + callStatic: {} + + filters: { + 'AdminChanged(address,address)'( + previousAdmin?: null, + newAdmin?: null + ): AdminChangedEventFilter + AdminChanged(previousAdmin?: null, newAdmin?: null): AdminChangedEventFilter + + 'BeaconUpgraded(address)'(beacon?: string | null): BeaconUpgradedEventFilter + BeaconUpgraded(beacon?: string | null): BeaconUpgradedEventFilter + + 'Upgraded(address)'(implementation?: string | null): UpgradedEventFilter + Upgraded(implementation?: string | null): UpgradedEventFilter + } + + estimateGas: {} + + populateTransaction: {} +} diff --git a/packages/zora-drops-utils/src/constants/typechain/ZoraNFTCreatorV1.ts b/packages/zora-drops-utils/src/constants/typechain/ZoraNFTCreatorV1.ts new file mode 100644 index 0000000..42b9bc5 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/ZoraNFTCreatorV1.ts @@ -0,0 +1,663 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export declare namespace IERC721Drop { + export type SalesConfigurationStruct = { + publicSalePrice: BigNumberish + maxSalePurchasePerAddress: BigNumberish + publicSaleStart: BigNumberish + publicSaleEnd: BigNumberish + presaleStart: BigNumberish + presaleEnd: BigNumberish + presaleMerkleRoot: BytesLike + } + + export type SalesConfigurationStructOutput = [ + BigNumber, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + string + ] & { + publicSalePrice: BigNumber + maxSalePurchasePerAddress: number + publicSaleStart: BigNumber + publicSaleEnd: BigNumber + presaleStart: BigNumber + presaleEnd: BigNumber + presaleMerkleRoot: string + } +} + +export interface ZoraNFTCreatorV1Interface extends utils.Interface { + functions: { + 'contractVersion()': FunctionFragment + 'createDrop(string,string,address,uint64,uint16,address,(uint104,uint32,uint64,uint64,uint64,uint64,bytes32),string,string)': FunctionFragment + 'createEdition(string,string,uint64,uint16,address,address,(uint104,uint32,uint64,uint64,uint64,uint64,bytes32),string,string,string)': FunctionFragment + 'dropMetadataRenderer()': FunctionFragment + 'editionMetadataRenderer()': FunctionFragment + 'implementation()': FunctionFragment + 'initialize()': FunctionFragment + 'owner()': FunctionFragment + 'proxiableUUID()': FunctionFragment + 'renounceOwnership()': FunctionFragment + 'setupDropsContract(string,string,address,uint64,uint16,address,(uint104,uint32,uint64,uint64,uint64,uint64,bytes32),address,bytes)': FunctionFragment + 'transferOwnership(address)': FunctionFragment + 'upgradeTo(address)': FunctionFragment + 'upgradeToAndCall(address,bytes)': FunctionFragment + } + + getFunction( + nameOrSignatureOrTopic: + | 'contractVersion' + | 'createDrop' + | 'createEdition' + | 'dropMetadataRenderer' + | 'editionMetadataRenderer' + | 'implementation' + | 'initialize' + | 'owner' + | 'proxiableUUID' + | 'renounceOwnership' + | 'setupDropsContract' + | 'transferOwnership' + | 'upgradeTo' + | 'upgradeToAndCall' + ): FunctionFragment + + encodeFunctionData(functionFragment: 'contractVersion', values?: undefined): string + encodeFunctionData( + functionFragment: 'createDrop', + values: [ + string, + string, + string, + BigNumberish, + BigNumberish, + string, + IERC721Drop.SalesConfigurationStruct, + string, + string + ] + ): string + encodeFunctionData( + functionFragment: 'createEdition', + values: [ + string, + string, + BigNumberish, + BigNumberish, + string, + string, + IERC721Drop.SalesConfigurationStruct, + string, + string, + string + ] + ): string + encodeFunctionData(functionFragment: 'dropMetadataRenderer', values?: undefined): string + encodeFunctionData( + functionFragment: 'editionMetadataRenderer', + values?: undefined + ): string + encodeFunctionData(functionFragment: 'implementation', values?: undefined): string + encodeFunctionData(functionFragment: 'initialize', values?: undefined): string + encodeFunctionData(functionFragment: 'owner', values?: undefined): string + encodeFunctionData(functionFragment: 'proxiableUUID', values?: undefined): string + encodeFunctionData(functionFragment: 'renounceOwnership', values?: undefined): string + encodeFunctionData( + functionFragment: 'setupDropsContract', + values: [ + string, + string, + string, + BigNumberish, + BigNumberish, + string, + IERC721Drop.SalesConfigurationStruct, + string, + BytesLike + ] + ): string + encodeFunctionData(functionFragment: 'transferOwnership', values: [string]): string + encodeFunctionData(functionFragment: 'upgradeTo', values: [string]): string + encodeFunctionData( + functionFragment: 'upgradeToAndCall', + values: [string, BytesLike] + ): string + + decodeFunctionResult(functionFragment: 'contractVersion', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'createDrop', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'createEdition', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'dropMetadataRenderer', data: BytesLike): Result + decodeFunctionResult( + functionFragment: 'editionMetadataRenderer', + data: BytesLike + ): Result + decodeFunctionResult(functionFragment: 'implementation', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'initialize', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'proxiableUUID', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'renounceOwnership', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'setupDropsContract', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'transferOwnership', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'upgradeTo', data: BytesLike): Result + decodeFunctionResult(functionFragment: 'upgradeToAndCall', data: BytesLike): Result + + events: { + 'AdminChanged(address,address)': EventFragment + 'BeaconUpgraded(address)': EventFragment + 'CreatedDrop(address,address,uint256)': EventFragment + 'OwnershipTransferred(address,address)': EventFragment + 'Upgraded(address)': EventFragment + } + + getEvent(nameOrSignatureOrTopic: 'AdminChanged'): EventFragment + getEvent(nameOrSignatureOrTopic: 'BeaconUpgraded'): EventFragment + getEvent(nameOrSignatureOrTopic: 'CreatedDrop'): EventFragment + getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment + getEvent(nameOrSignatureOrTopic: 'Upgraded'): EventFragment +} + +export interface AdminChangedEventObject { + previousAdmin: string + newAdmin: string +} +export type AdminChangedEvent = TypedEvent<[string, string], AdminChangedEventObject> + +export type AdminChangedEventFilter = TypedEventFilter + +export interface BeaconUpgradedEventObject { + beacon: string +} +export type BeaconUpgradedEvent = TypedEvent<[string], BeaconUpgradedEventObject> + +export type BeaconUpgradedEventFilter = TypedEventFilter + +export interface CreatedDropEventObject { + creator: string + editionContractAddress: string + editionSize: BigNumber +} +export type CreatedDropEvent = TypedEvent< + [string, string, BigNumber], + CreatedDropEventObject +> + +export type CreatedDropEventFilter = TypedEventFilter + +export interface OwnershipTransferredEventObject { + previousOwner: string + newOwner: string +} +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +> + +export type OwnershipTransferredEventFilter = TypedEventFilter + +export interface UpgradedEventObject { + implementation: string +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject> + +export type UpgradedEventFilter = TypedEventFilter + +export interface ZoraNFTCreatorV1 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: ZoraNFTCreatorV1Interface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + contractVersion(overrides?: CallOverrides): Promise<[number]> + + createDrop( + name: string, + symbol: string, + defaultAdmin: string, + editionSize: BigNumberish, + royaltyBPS: BigNumberish, + fundsRecipient: string, + saleConfig: IERC721Drop.SalesConfigurationStruct, + metadataURIBase: string, + metadataContractURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + createEdition( + name: string, + symbol: string, + editionSize: BigNumberish, + royaltyBPS: BigNumberish, + fundsRecipient: string, + defaultAdmin: string, + saleConfig: IERC721Drop.SalesConfigurationStruct, + description: string, + animationURI: string, + imageURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + dropMetadataRenderer(overrides?: CallOverrides): Promise<[string]> + + editionMetadataRenderer(overrides?: CallOverrides): Promise<[string]> + + implementation(overrides?: CallOverrides): Promise<[string]> + + initialize( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + owner(overrides?: CallOverrides): Promise<[string]> + + proxiableUUID(overrides?: CallOverrides): Promise<[string]> + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setupDropsContract( + name: string, + symbol: string, + defaultAdmin: string, + editionSize: BigNumberish, + royaltyBPS: BigNumberish, + fundsRecipient: string, + saleConfig: IERC721Drop.SalesConfigurationStruct, + metadataRenderer: string, + metadataInitializer: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + } + + contractVersion(overrides?: CallOverrides): Promise + + createDrop( + name: string, + symbol: string, + defaultAdmin: string, + editionSize: BigNumberish, + royaltyBPS: BigNumberish, + fundsRecipient: string, + saleConfig: IERC721Drop.SalesConfigurationStruct, + metadataURIBase: string, + metadataContractURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + createEdition( + name: string, + symbol: string, + editionSize: BigNumberish, + royaltyBPS: BigNumberish, + fundsRecipient: string, + defaultAdmin: string, + saleConfig: IERC721Drop.SalesConfigurationStruct, + description: string, + animationURI: string, + imageURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + dropMetadataRenderer(overrides?: CallOverrides): Promise + + editionMetadataRenderer(overrides?: CallOverrides): Promise + + implementation(overrides?: CallOverrides): Promise + + initialize( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + owner(overrides?: CallOverrides): Promise + + proxiableUUID(overrides?: CallOverrides): Promise + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setupDropsContract( + name: string, + symbol: string, + defaultAdmin: string, + editionSize: BigNumberish, + royaltyBPS: BigNumberish, + fundsRecipient: string, + saleConfig: IERC721Drop.SalesConfigurationStruct, + metadataRenderer: string, + metadataInitializer: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + + callStatic: { + contractVersion(overrides?: CallOverrides): Promise + + createDrop( + name: string, + symbol: string, + defaultAdmin: string, + editionSize: BigNumberish, + royaltyBPS: BigNumberish, + fundsRecipient: string, + saleConfig: IERC721Drop.SalesConfigurationStruct, + metadataURIBase: string, + metadataContractURI: string, + overrides?: CallOverrides + ): Promise + + createEdition( + name: string, + symbol: string, + editionSize: BigNumberish, + royaltyBPS: BigNumberish, + fundsRecipient: string, + defaultAdmin: string, + saleConfig: IERC721Drop.SalesConfigurationStruct, + description: string, + animationURI: string, + imageURI: string, + overrides?: CallOverrides + ): Promise + + dropMetadataRenderer(overrides?: CallOverrides): Promise + + editionMetadataRenderer(overrides?: CallOverrides): Promise + + implementation(overrides?: CallOverrides): Promise + + initialize(overrides?: CallOverrides): Promise + + owner(overrides?: CallOverrides): Promise + + proxiableUUID(overrides?: CallOverrides): Promise + + renounceOwnership(overrides?: CallOverrides): Promise + + setupDropsContract( + name: string, + symbol: string, + defaultAdmin: string, + editionSize: BigNumberish, + royaltyBPS: BigNumberish, + fundsRecipient: string, + saleConfig: IERC721Drop.SalesConfigurationStruct, + metadataRenderer: string, + metadataInitializer: BytesLike, + overrides?: CallOverrides + ): Promise + + transferOwnership(newOwner: string, overrides?: CallOverrides): Promise + + upgradeTo(newImplementation: string, overrides?: CallOverrides): Promise + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: CallOverrides + ): Promise + } + + filters: { + 'AdminChanged(address,address)'( + previousAdmin?: null, + newAdmin?: null + ): AdminChangedEventFilter + AdminChanged(previousAdmin?: null, newAdmin?: null): AdminChangedEventFilter + + 'BeaconUpgraded(address)'(beacon?: string | null): BeaconUpgradedEventFilter + BeaconUpgraded(beacon?: string | null): BeaconUpgradedEventFilter + + 'CreatedDrop(address,address,uint256)'( + creator?: string | null, + editionContractAddress?: string | null, + editionSize?: null + ): CreatedDropEventFilter + CreatedDrop( + creator?: string | null, + editionContractAddress?: string | null, + editionSize?: null + ): CreatedDropEventFilter + + 'OwnershipTransferred(address,address)'( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter + OwnershipTransferred( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter + + 'Upgraded(address)'(implementation?: string | null): UpgradedEventFilter + Upgraded(implementation?: string | null): UpgradedEventFilter + } + + estimateGas: { + contractVersion(overrides?: CallOverrides): Promise + + createDrop( + name: string, + symbol: string, + defaultAdmin: string, + editionSize: BigNumberish, + royaltyBPS: BigNumberish, + fundsRecipient: string, + saleConfig: IERC721Drop.SalesConfigurationStruct, + metadataURIBase: string, + metadataContractURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + createEdition( + name: string, + symbol: string, + editionSize: BigNumberish, + royaltyBPS: BigNumberish, + fundsRecipient: string, + defaultAdmin: string, + saleConfig: IERC721Drop.SalesConfigurationStruct, + description: string, + animationURI: string, + imageURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + dropMetadataRenderer(overrides?: CallOverrides): Promise + + editionMetadataRenderer(overrides?: CallOverrides): Promise + + implementation(overrides?: CallOverrides): Promise + + initialize( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + owner(overrides?: CallOverrides): Promise + + proxiableUUID(overrides?: CallOverrides): Promise + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setupDropsContract( + name: string, + symbol: string, + defaultAdmin: string, + editionSize: BigNumberish, + royaltyBPS: BigNumberish, + fundsRecipient: string, + saleConfig: IERC721Drop.SalesConfigurationStruct, + metadataRenderer: string, + metadataInitializer: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + } + + populateTransaction: { + contractVersion(overrides?: CallOverrides): Promise + + createDrop( + name: string, + symbol: string, + defaultAdmin: string, + editionSize: BigNumberish, + royaltyBPS: BigNumberish, + fundsRecipient: string, + saleConfig: IERC721Drop.SalesConfigurationStruct, + metadataURIBase: string, + metadataContractURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + createEdition( + name: string, + symbol: string, + editionSize: BigNumberish, + royaltyBPS: BigNumberish, + fundsRecipient: string, + defaultAdmin: string, + saleConfig: IERC721Drop.SalesConfigurationStruct, + description: string, + animationURI: string, + imageURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + dropMetadataRenderer(overrides?: CallOverrides): Promise + + editionMetadataRenderer(overrides?: CallOverrides): Promise + + implementation(overrides?: CallOverrides): Promise + + initialize( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + owner(overrides?: CallOverrides): Promise + + proxiableUUID(overrides?: CallOverrides): Promise + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise + + setupDropsContract( + name: string, + symbol: string, + defaultAdmin: string, + editionSize: BigNumberish, + royaltyBPS: BigNumberish, + fundsRecipient: string, + saleConfig: IERC721Drop.SalesConfigurationStruct, + metadataRenderer: string, + metadataInitializer: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/ZoraNFTDropDeployer.ts b/packages/zora-drops-utils/src/constants/typechain/ZoraNFTDropDeployer.ts new file mode 100644 index 0000000..73445e5 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/ZoraNFTDropDeployer.ts @@ -0,0 +1,156 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers' +import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi' +import type { Listener, Provider } from '@ethersproject/providers' +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common' + +export interface ZoraNFTDropDeployerInterface extends utils.Interface { + functions: { + 'createDrop(address,string,string,address,uint16,uint64,string,string)': FunctionFragment + } + + getFunction(nameOrSignatureOrTopic: 'createDrop'): FunctionFragment + + encodeFunctionData( + functionFragment: 'createDrop', + values: [string, string, string, string, BigNumberish, BigNumberish, string, string] + ): string + + decodeFunctionResult(functionFragment: 'createDrop', data: BytesLike): Result + + events: { + 'DeployedNewContract(address,address)': EventFragment + } + + getEvent(nameOrSignatureOrTopic: 'DeployedNewContract'): EventFragment +} + +export interface DeployedNewContractEventObject { + from: string + newContract: string +} +export type DeployedNewContractEvent = TypedEvent< + [string, string], + DeployedNewContractEventObject +> + +export type DeployedNewContractEventFilter = TypedEventFilter + +export interface ZoraNFTDropDeployer extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this + attach(addressOrName: string): this + deployed(): Promise + + interface: ZoraNFTDropDeployerInterface + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise> + + listeners( + eventFilter?: TypedEventFilter + ): Array> + listeners(eventName?: string): Array + removeAllListeners( + eventFilter: TypedEventFilter + ): this + removeAllListeners(eventName?: string): this + off: OnEvent + on: OnEvent + once: OnEvent + removeListener: OnEvent + + functions: { + createDrop( + owner: string, + name: string, + symbol: string, + fundsRecipient: string, + royaltyBPS: BigNumberish, + editionSize: BigNumberish, + metadataURIBase: string, + metadataContractURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + createDrop( + owner: string, + name: string, + symbol: string, + fundsRecipient: string, + royaltyBPS: BigNumberish, + editionSize: BigNumberish, + metadataURIBase: string, + metadataContractURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + + callStatic: { + createDrop( + owner: string, + name: string, + symbol: string, + fundsRecipient: string, + royaltyBPS: BigNumberish, + editionSize: BigNumberish, + metadataURIBase: string, + metadataContractURI: string, + overrides?: CallOverrides + ): Promise + } + + filters: { + 'DeployedNewContract(address,address)'( + from?: string | null, + newContract?: string | null + ): DeployedNewContractEventFilter + DeployedNewContract( + from?: string | null, + newContract?: string | null + ): DeployedNewContractEventFilter + } + + estimateGas: { + createDrop( + owner: string, + name: string, + symbol: string, + fundsRecipient: string, + royaltyBPS: BigNumberish, + editionSize: BigNumberish, + metadataURIBase: string, + metadataContractURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } + + populateTransaction: { + createDrop( + owner: string, + name: string, + symbol: string, + fundsRecipient: string, + royaltyBPS: BigNumberish, + editionSize: BigNumberish, + metadataURIBase: string, + metadataContractURI: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/common.ts b/packages/zora-drops-utils/src/constants/typechain/common.ts new file mode 100644 index 0000000..376a864 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/common.ts @@ -0,0 +1,38 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { Listener } from '@ethersproject/providers' +import type { Event, EventFilter } from 'ethers' + +export interface TypedEvent = any, TArgsObject = any> + extends Event { + args: TArgsArray & TArgsObject +} + +export interface TypedEventFilter<_TEvent extends TypedEvent> extends EventFilter {} + +export interface TypedListener { + (...listenerArg: [...__TypechainArgsArray, TEvent]): void +} + +type __TypechainArgsArray = T extends TypedEvent ? U : never + +export interface OnEvent { + ( + eventFilter: TypedEventFilter, + listener: TypedListener + ): TRes + (eventName: string, listener: Listener): TRes +} + +export type MinEthersFactory = { + deploy(...a: ARGS[]): Promise +} + +export type GetContractTypeFromFactory = F extends MinEthersFactory + ? C + : never + +export type GetARGsTypeFromFactory = F extends MinEthersFactory + ? Parameters + : never diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/DropMetadataRenderer__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/DropMetadataRenderer__factory.ts new file mode 100644 index 0000000..e909841 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/DropMetadataRenderer__factory.ts @@ -0,0 +1,300 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { + DropMetadataRenderer, + DropMetadataRendererInterface, +} from '../DropMetadataRenderer' + +const _abi = [ + { + inputs: [], + name: 'Access_OnlyAdmin', + type: 'error', + }, + { + inputs: [], + name: 'MetadataFrozen', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'target', + type: 'address', + }, + { + indexed: false, + internalType: 'string', + name: 'metadataBase', + type: 'string', + }, + { + indexed: false, + internalType: 'string', + name: 'metadataExtension', + type: 'string', + }, + { + indexed: false, + internalType: 'string', + name: 'contractURI', + type: 'string', + }, + { + indexed: false, + internalType: 'uint256', + name: 'freezeAt', + type: 'uint256', + }, + ], + name: 'MetadataUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'target', + type: 'address', + }, + { + indexed: false, + internalType: 'bytes32', + name: 'provenanceHash', + type: 'bytes32', + }, + ], + name: 'ProvenanceHashUpdated', + type: 'event', + }, + { + inputs: [], + name: 'contractURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'initializeWithData', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'metadataBaseByContract', + outputs: [ + { + internalType: 'string', + name: 'base', + type: 'string', + }, + { + internalType: 'string', + name: 'extension', + type: 'string', + }, + { + internalType: 'string', + name: 'contractURI', + type: 'string', + }, + { + internalType: 'uint256', + name: 'freezeAt', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'provenanceHashes', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'tokenURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'target', + type: 'address', + }, + { + internalType: 'string', + name: 'baseUri', + type: 'string', + }, + { + internalType: 'string', + name: 'newContractUri', + type: 'string', + }, + ], + name: 'updateMetadataBase', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'target', + type: 'address', + }, + { + internalType: 'string', + name: 'metadataBase', + type: 'string', + }, + { + internalType: 'string', + name: 'metadataExtension', + type: 'string', + }, + { + internalType: 'string', + name: 'newContractURI', + type: 'string', + }, + { + internalType: 'uint256', + name: 'freezeAt', + type: 'uint256', + }, + ], + name: 'updateMetadataBaseWithDetails', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'target', + type: 'address', + }, + { + internalType: 'bytes32', + name: 'provenanceHash', + type: 'bytes32', + }, + ], + name: 'updateProvenanceHash', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, +] + +const _bytecode = + '0x608060405234801561001057600080fd5b506112dc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063c87b56dd1161005b578063c87b56dd146100f4578063cc1306db14610114578063de5af49b14610127578063e8a3d4851461015557600080fd5b806342495a951461008d578063856a7ffa146100a257806391074f98146100b5578063af806d56146100e1575b600080fd5b6100a061009b366004610db5565b61015d565b005b6100a06100b0366004610e56565b61025b565b6100c86100c3366004610e9f565b610298565b6040516100d89493929190610f12565b60405180910390f35b6100a06100ef366004610f5d565b610458565b610107610102366004610fd1565b610564565b6040516100d89190610fea565b6100a0610122366004610ffd565b61078e565b610147610135366004610e9f565b60016020526000908152604090205481565b6040519081526020016100d8565b6101076108de565b8473ffffffffffffffffffffffffffffffffffffffff8116331480159061020f57506040517f24d7806c00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8216906324d7806c90602401602060405180830381865afa1580156101e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020d9190611027565b155b15610246576040517f02bd6bd100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102538686868686610994565b505050505050565b60008082806020019051810190610272919061108e565b91509150610293338360405180602001604052806000815250846000610994565b505050565b6000602081905290815260409020805481906102b3906110f2565b80601f01602080910402602001604051908101604052809291908181526020018280546102df906110f2565b801561032c5780601f106103015761010080835404028352916020019161032c565b820191906000526020600020905b81548152906001019060200180831161030f57829003601f168201915b505050505090806001018054610341906110f2565b80601f016020809104026020016040519081016040528092919081815260200182805461036d906110f2565b80156103ba5780601f1061038f576101008083540402835291602001916103ba565b820191906000526020600020905b81548152906001019060200180831161039d57829003601f168201915b5050505050908060020180546103cf906110f2565b80601f01602080910402602001604051908101604052809291908181526020018280546103fb906110f2565b80156104485780601f1061041d57610100808354040283529160200191610448565b820191906000526020600020905b81548152906001019060200180831161042b57829003601f168201915b5050505050908060030154905084565b8273ffffffffffffffffffffffffffffffffffffffff8116331480159061050a57506040517f24d7806c00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8216906324d7806c90602401602060405180830381865afa1580156104e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105089190611027565b155b15610541576040517f02bd6bd100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61055e848460405180602001604052806000815250856000610994565b50505050565b33600090815260208190526040808220815160808101909252805460609392919082908290610592906110f2565b80601f01602080910402602001604051908101604052809291908181526020018280546105be906110f2565b801561060b5780601f106105e05761010080835404028352916020019161060b565b820191906000526020600020905b8154815290600101906020018083116105ee57829003601f168201915b50505050508152602001600182018054610624906110f2565b80601f0160208091040260200160405190810160405280929190818152602001828054610650906110f2565b801561069d5780601f106106725761010080835404028352916020019161069d565b820191906000526020600020905b81548152906001019060200180831161068057829003601f168201915b505050505081526020016002820180546106b6906110f2565b80601f01602080910402602001604051908101604052809291908181526020018280546106e2906110f2565b801561072f5780601f106107045761010080835404028352916020019161072f565b820191906000526020600020905b81548152906001019060200180831161071257829003601f168201915b5050505050815260200160038201548152505090508060000151516000141561075757600080fd5b805161076284610ad1565b60208084015160405161077794939201611146565b604051602081830303815290604052915050919050565b8173ffffffffffffffffffffffffffffffffffffffff8116331480159061084057506040517f24d7806c00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8216906324d7806c90602401602060405180830381865afa15801561081a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083e9190611027565b155b15610877576040517f02bd6bd100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602052604090819020849055517ff2e078c4022bfd6c56addd06540a4a5dd4252b6b2c424b6840c184063f48fc27906108d19085815260200190565b60405180910390a2505050565b33600090815260208190526040812060020180546060929190610900906110f2565b80601f016020809104026020016040519081016040528092919081815260200182805461092c906110f2565b80156109795780601f1061094e57610100808354040283529160200191610979565b820191906000526020600020905b81548152906001019060200180831161095c57829003601f168201915b5050505050905080516000141561098f57600080fd5b919050565b80158015906109a257504281115b156109d9576040517feef043fe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160808101825285815260208082018690528183018590526060820184905273ffffffffffffffffffffffffffffffffffffffff88166000908152808252929092208151805192939192610a339284920190610c0b565b506020828101518051610a4c9260018501920190610c0b565b5060408201518051610a68916002840191602090910190610c0b565b50606082015181600301559050508473ffffffffffffffffffffffffffffffffffffffff167f5eff125d5659803f33dbda215d6e8bfe0a404fd213a9ecb5e61973ee16cb17e785858585604051610ac29493929190610f12565b60405180910390a25050505050565b606081610b1157505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610b3b5780610b25816111b8565b9150610b349050600a83611220565b9150610b15565b60008167ffffffffffffffff811115610b5657610b56610cc8565b6040519080825280601f01601f191660200182016040528015610b80576020820181803683370190505b5090505b8415610c0357610b95600183611234565b9150610ba2600a8661124b565b610bad90603061125f565b60f81b818381518110610bc257610bc2611277565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610bfc600a86611220565b9450610b84565b949350505050565b828054610c17906110f2565b90600052602060002090601f016020900481019282610c395760008555610c7f565b82601f10610c5257805160ff1916838001178555610c7f565b82800160010185558215610c7f579182015b82811115610c7f578251825591602001919060010190610c64565b50610c8b929150610c8f565b5090565b5b80821115610c8b5760008155600101610c90565b803573ffffffffffffffffffffffffffffffffffffffff8116811461098f57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610d2057610d20610cc8565b604052919050565b600067ffffffffffffffff821115610d4257610d42610cc8565b50601f01601f191660200190565b6000610d63610d5e84610d28565b610cf7565b9050828152838383011115610d7757600080fd5b828260208301376000602084830101529392505050565b600082601f830112610d9f57600080fd5b610dae83833560208501610d50565b9392505050565b600080600080600060a08688031215610dcd57600080fd5b610dd686610ca4565b9450602086013567ffffffffffffffff80821115610df357600080fd5b610dff89838a01610d8e565b95506040880135915080821115610e1557600080fd5b610e2189838a01610d8e565b94506060880135915080821115610e3757600080fd5b50610e4488828901610d8e565b95989497509295608001359392505050565b600060208284031215610e6857600080fd5b813567ffffffffffffffff811115610e7f57600080fd5b8201601f81018413610e9057600080fd5b610c0384823560208401610d50565b600060208284031215610eb157600080fd5b610dae82610ca4565b60005b83811015610ed5578181015183820152602001610ebd565b8381111561055e5750506000910152565b60008151808452610efe816020860160208601610eba565b601f01601f19169290920160200192915050565b608081526000610f256080830187610ee6565b8281036020840152610f378187610ee6565b90508281036040840152610f4b8186610ee6565b91505082606083015295945050505050565b600080600060608486031215610f7257600080fd5b610f7b84610ca4565b9250602084013567ffffffffffffffff80821115610f9857600080fd5b610fa487838801610d8e565b93506040860135915080821115610fba57600080fd5b50610fc786828701610d8e565b9150509250925092565b600060208284031215610fe357600080fd5b5035919050565b602081526000610dae6020830184610ee6565b6000806040838503121561101057600080fd5b61101983610ca4565b946020939093013593505050565b60006020828403121561103957600080fd5b81518015158114610dae57600080fd5b600082601f83011261105a57600080fd5b8151611068610d5e82610d28565b81815284602083860101111561107d57600080fd5b610c03826020830160208701610eba565b600080604083850312156110a157600080fd5b825167ffffffffffffffff808211156110b957600080fd5b6110c586838701611049565b935060208501519150808211156110db57600080fd5b506110e885828601611049565b9150509250929050565b600181811c9082168061110657607f821691505b60208210811415611140577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60008451611158818460208901610eba565b84519083019061116c818360208901610eba565b845191019061117f818360208801610eba565b0195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156111ea576111ea611189565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261122f5761122f6111f1565b500490565b60008282101561124657611246611189565b500390565b60008261125a5761125a6111f1565b500690565b6000821982111561127257611272611189565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea26469706673582212205cd755d85e43524e04f7e9dbba617d6c33145a36a9be22bd3d1090ea152f7c4164736f6c634300080a0033' + +type DropMetadataRendererConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: DropMetadataRendererConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class DropMetadataRenderer__factory extends ContractFactory { + constructor(...args: DropMetadataRendererConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise + } + override getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}) + } + override attach(address: string): DropMetadataRenderer { + return super.attach(address) as DropMetadataRenderer + } + override connect(signer: Signer): DropMetadataRenderer__factory { + return super.connect(signer) as DropMetadataRenderer__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): DropMetadataRendererInterface { + return new utils.Interface(_abi) as DropMetadataRendererInterface + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): DropMetadataRenderer { + return new Contract(address, _abi, signerOrProvider) as DropMetadataRenderer + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/DummyMetadataRenderer__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/DummyMetadataRenderer__factory.ts new file mode 100644 index 0000000..e17497b --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/DummyMetadataRenderer__factory.ts @@ -0,0 +1,107 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { + DummyMetadataRenderer, + DummyMetadataRendererInterface, +} from '../DummyMetadataRenderer' + +const _abi = [ + { + inputs: [], + name: 'contractURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'initializeWithData', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + name: 'tokenURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'pure', + type: 'function', + }, +] + +const _bytecode = + '0x608060405234801561001057600080fd5b506102ae806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063856a7ffa14610046578063c87b56dd14610059578063e8a3d485146100b5575b600080fd5b61005761005436600461011d565b50565b005b61009f6100673660046101ec565b5060408051808201909152600581527f44554d4d59000000000000000000000000000000000000000000000000000000602082015290565b6040516100ac9190610205565b60405180910390f35b60408051808201909152600581527f44554d4d59000000000000000000000000000000000000000000000000000000602082015261009f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60006020828403121561012f57600080fd5b813567ffffffffffffffff8082111561014757600080fd5b818401915084601f83011261015b57600080fd5b81358181111561016d5761016d6100ee565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156101b3576101b36100ee565b816040528281528760208487010111156101cc57600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000602082840312156101fe57600080fd5b5035919050565b600060208083528351808285015260005b8181101561023257858101830151858201604001528201610216565b81811115610244576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01692909201604001939250505056fea26469706673582212209b22e58b55fdc5ae95c0de7f7ffc765b26bd1a54ff8d629f82a776277323268f64736f6c634300080a0033' + +type DummyMetadataRendererConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: DummyMetadataRendererConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class DummyMetadataRenderer__factory extends ContractFactory { + constructor(...args: DummyMetadataRendererConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise + } + override getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}) + } + override attach(address: string): DummyMetadataRenderer { + return super.attach(address) as DummyMetadataRenderer + } + override connect(signer: Signer): DummyMetadataRenderer__factory { + return super.connect(signer) as DummyMetadataRenderer__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): DummyMetadataRendererInterface { + return new utils.Interface(_abi) as DummyMetadataRendererInterface + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): DummyMetadataRenderer { + return new Contract(address, _abi, signerOrProvider) as DummyMetadataRenderer + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/ERC1967Proxy__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/ERC1967Proxy__factory.ts new file mode 100644 index 0000000..11fc971 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/ERC1967Proxy__factory.ts @@ -0,0 +1,136 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Signer, + utils, + Contract, + ContractFactory, + PayableOverrides, + BytesLike, +} from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { ERC1967Proxy, ERC1967ProxyInterface } from '../ERC1967Proxy' + +const _abi = [ + { + inputs: [ + { + internalType: 'address', + name: '_logic', + type: 'address', + }, + { + internalType: 'bytes', + name: '_data', + type: 'bytes', + }, + ], + stateMutability: 'payable', + type: 'constructor', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'previousAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + ], + name: 'AdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'beacon', + type: 'address', + }, + ], + name: 'BeaconUpgraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'implementation', + type: 'address', + }, + ], + name: 'Upgraded', + type: 'event', + }, + { + stateMutability: 'payable', + type: 'fallback', + }, + { + stateMutability: 'payable', + type: 'receive', + }, +] + +const _bytecode = + '0x608060405260405161084e38038061084e83398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b600080516020610807833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606101178383604051806060016040528060278152602001610827602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061080783398151915260001b6102cb60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b610357806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220073f2d9e8e8bea28ad5fca7c8bf6e8dfb9ae5015f6c2a4ac098b594e1b76c76e64736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564' + +type ERC1967ProxyConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: ERC1967ProxyConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class ERC1967Proxy__factory extends ContractFactory { + constructor(...args: ERC1967ProxyConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise { + return super.deploy(_logic, _data, overrides || {}) as Promise + } + override getDeployTransaction( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(_logic, _data, overrides || {}) + } + override attach(address: string): ERC1967Proxy { + return super.attach(address) as ERC1967Proxy + } + override connect(signer: Signer): ERC1967Proxy__factory { + return super.connect(signer) as ERC1967Proxy__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): ERC1967ProxyInterface { + return new utils.Interface(_abi) as ERC1967ProxyInterface + } + static connect(address: string, signerOrProvider: Signer | Provider): ERC1967Proxy { + return new Contract(address, _abi, signerOrProvider) as ERC1967Proxy + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/ERC721DropProxy__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/ERC721DropProxy__factory.ts new file mode 100644 index 0000000..548be35 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/ERC721DropProxy__factory.ts @@ -0,0 +1,136 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Signer, + utils, + Contract, + ContractFactory, + PayableOverrides, + BytesLike, +} from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { ERC721DropProxy, ERC721DropProxyInterface } from '../ERC721DropProxy' + +const _abi = [ + { + inputs: [ + { + internalType: 'address', + name: '_logic', + type: 'address', + }, + { + internalType: 'bytes', + name: '_data', + type: 'bytes', + }, + ], + stateMutability: 'payable', + type: 'constructor', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'previousAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + ], + name: 'AdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'beacon', + type: 'address', + }, + ], + name: 'BeaconUpgraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'implementation', + type: 'address', + }, + ], + name: 'Upgraded', + type: 'event', + }, + { + stateMutability: 'payable', + type: 'fallback', + }, + { + stateMutability: 'payable', + type: 'receive', + }, +] + +const _bytecode = + '0x60806040526040516108523803806108528339810160408190526100229161034d565b818161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd61041b565b60008051602061080b8339815191521461006b5761006b610440565b61007782826000610080565b505050506104a5565b610089836100b6565b6000825111806100965750805b156100b1576100af83836100f660201b6100291760201c565b505b505050565b6100bf81610122565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061011b838360405180606001604052806027815260200161082b602791396101e2565b9392505050565b610135816102c060201b6100551760201c565b61019c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101c160008051602061080b83398151915260001b6102cf60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b61024a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610193565b600080856001600160a01b0316856040516102659190610456565b600060405180830381855af49150503d80600081146102a0576040519150601f19603f3d011682016040523d82523d6000602084013e6102a5565b606091505b5090925090506102b68282866102d2565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102e157508161011b565b8251156102f15782518084602001fd5b8160405162461bcd60e51b81526004016101939190610472565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561033c578181015183820152602001610324565b838111156100af5750506000910152565b6000806040838503121561036057600080fd5b82516001600160a01b038116811461037757600080fd5b60208401519092506001600160401b038082111561039457600080fd5b818501915085601f8301126103a857600080fd5b8151818111156103ba576103ba61030b565b604051601f8201601f19908116603f011681019083821181831017156103e2576103e261030b565b816040528281528860208487010111156103fb57600080fd5b61040c836020830160208801610321565b80955050505050509250929050565b60008282101561043b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b60008251610468818460208701610321565b9190910192915050565b6020815260008251806020840152610491816040850160208701610321565b601f01601f19169190910160400192915050565b610357806104b46000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207b739cd7387f455c17ca8ed057865df6f924ca4fbc539854a8aae913cc20656664736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564' + +type ERC721DropProxyConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: ERC721DropProxyConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class ERC721DropProxy__factory extends ContractFactory { + constructor(...args: ERC721DropProxyConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise { + return super.deploy(_logic, _data, overrides || {}) as Promise + } + override getDeployTransaction( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(_logic, _data, overrides || {}) + } + override attach(address: string): ERC721DropProxy { + return super.attach(address) as ERC721DropProxy + } + override connect(signer: Signer): ERC721DropProxy__factory { + return super.connect(signer) as ERC721DropProxy__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): ERC721DropProxyInterface { + return new utils.Interface(_abi) as ERC721DropProxyInterface + } + static connect(address: string, signerOrProvider: Signer | Provider): ERC721DropProxy { + return new Contract(address, _abi, signerOrProvider) as ERC721DropProxy + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/ERC721DropStorageV1__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/ERC721DropStorageV1__factory.ts new file mode 100644 index 0000000..c0062e2 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/ERC721DropStorageV1__factory.ts @@ -0,0 +1,152 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { + ERC721DropStorageV1, + ERC721DropStorageV1Interface, +} from '../ERC721DropStorageV1' + +const _abi = [ + { + inputs: [], + name: 'config', + outputs: [ + { + internalType: 'contract IMetadataRenderer', + name: 'metadataRenderer', + type: 'address', + }, + { + internalType: 'uint64', + name: 'editionSize', + type: 'uint64', + }, + { + internalType: 'uint16', + name: 'royaltyBPS', + type: 'uint16', + }, + { + internalType: 'address payable', + name: 'fundsRecipient', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'presaleMintsByAddress', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'salesConfig', + outputs: [ + { + internalType: 'uint104', + name: 'publicSalePrice', + type: 'uint104', + }, + { + internalType: 'uint32', + name: 'maxSalePurchasePerAddress', + type: 'uint32', + }, + { + internalType: 'uint64', + name: 'publicSaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'publicSaleEnd', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleEnd', + type: 'uint64', + }, + { + internalType: 'bytes32', + name: 'presaleMerkleRoot', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, +] + +const _bytecode = + '0x608060405234801561001057600080fd5b50610287806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80631d2c0b381461004657806361fea7681461012a57806379502c5514610158575b600080fd5b6002546003546004546100cc926cffffffffffffffffffffffffff8116926d0100000000000000000000000000820463ffffffff16927101000000000000000000000000000000000090920467ffffffffffffffff9081169281831692680100000000000000008104831692700100000000000000000000000000000000909104169087565b604080516cffffffffffffffffffffffffff909816885263ffffffff909616602088015267ffffffffffffffff948516958701959095529183166060860152821660808501521660a083015260c082015260e0015b60405180910390f35b61014a610138366004610214565b60056020526000908152604090205481565b604051908152602001610121565b6000546001546101c79173ffffffffffffffffffffffffffffffffffffffff8082169274010000000000000000000000000000000000000000830467ffffffffffffffff16927c0100000000000000000000000000000000000000000000000000000000900461ffff16911684565b6040805173ffffffffffffffffffffffffffffffffffffffff958616815267ffffffffffffffff909416602085015261ffff90921691830191909152919091166060820152608001610121565b60006020828403121561022657600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461024a57600080fd5b939250505056fea264697066735822122065d8c8a953a9901260c72d6ebad02a3387b3301c08a070fac0ab2ba9dd4a142d64736f6c634300080a0033' + +type ERC721DropStorageV1ConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: ERC721DropStorageV1ConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class ERC721DropStorageV1__factory extends ContractFactory { + constructor(...args: ERC721DropStorageV1ConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise + } + override getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}) + } + override attach(address: string): ERC721DropStorageV1 { + return super.attach(address) as ERC721DropStorageV1 + } + override connect(signer: Signer): ERC721DropStorageV1__factory { + return super.connect(signer) as ERC721DropStorageV1__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): ERC721DropStorageV1Interface { + return new utils.Interface(_abi) as ERC721DropStorageV1Interface + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ERC721DropStorageV1 { + return new Contract(address, _abi, signerOrProvider) as ERC721DropStorageV1 + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/ERC721Drop__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/ERC721Drop__factory.ts new file mode 100644 index 0000000..29d3f0c --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/ERC721Drop__factory.ts @@ -0,0 +1,1671 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { ERC721Drop, ERC721DropInterface } from '../ERC721Drop' + +const _abi = [ + { + inputs: [ + { + internalType: 'contract IZoraFeeManager', + name: '_zoraFeeManager', + type: 'address', + }, + { + internalType: 'address', + name: '_zoraERC721TransferHelper', + type: 'address', + }, + { + internalType: 'contract FactoryUpgradeGate', + name: '_factoryUpgradeGate', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + ], + name: 'Access_MissingRoleOrAdmin', + type: 'error', + }, + { + inputs: [], + name: 'Access_OnlyAdmin', + type: 'error', + }, + { + inputs: [], + name: 'Access_WithdrawNotAllowed', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'proposedAddress', + type: 'address', + }, + ], + name: 'Admin_InvalidUpgradeAddress', + type: 'error', + }, + { + inputs: [], + name: 'Admin_UnableToFinalizeNotOpenEdition', + type: 'error', + }, + { + inputs: [], + name: 'ApprovalCallerNotOwnerNorApproved', + type: 'error', + }, + { + inputs: [], + name: 'ApprovalQueryForNonexistentToken', + type: 'error', + }, + { + inputs: [], + name: 'ApprovalToCurrentOwner', + type: 'error', + }, + { + inputs: [], + name: 'ApproveToCaller', + type: 'error', + }, + { + inputs: [], + name: 'BalanceQueryForZeroAddress', + type: 'error', + }, + { + inputs: [], + name: 'MintToZeroAddress', + type: 'error', + }, + { + inputs: [], + name: 'MintZeroQuantity', + type: 'error', + }, + { + inputs: [], + name: 'Mint_SoldOut', + type: 'error', + }, + { + inputs: [], + name: 'OwnerQueryForNonexistentToken', + type: 'error', + }, + { + inputs: [], + name: 'Presale_Inactive', + type: 'error', + }, + { + inputs: [], + name: 'Presale_MerkleNotApproved', + type: 'error', + }, + { + inputs: [], + name: 'Presale_TooManyForAddress', + type: 'error', + }, + { + inputs: [], + name: 'Purchase_TooManyForAddress', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'correctPrice', + type: 'uint256', + }, + ], + name: 'Purchase_WrongPrice', + type: 'error', + }, + { + inputs: [], + name: 'Sale_Inactive', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'maxRoyaltyBPS', + type: 'uint16', + }, + ], + name: 'Setup_RoyaltyPercentageTooHigh', + type: 'error', + }, + { + inputs: [], + name: 'TransferCallerNotOwnerNorApproved', + type: 'error', + }, + { + inputs: [], + name: 'TransferFromIncorrectOwner', + type: 'error', + }, + { + inputs: [], + name: 'TransferToNonERC721ReceiverImplementer', + type: 'error', + }, + { + inputs: [], + name: 'TransferToZeroAddress', + type: 'error', + }, + { + inputs: [], + name: 'URIQueryForNonexistentToken', + type: 'error', + }, + { + inputs: [], + name: 'Withdraw_FundsSendFailure', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'previousAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + ], + name: 'AdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'approved', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'Approval', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + indexed: false, + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'ApprovalForAll', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'beacon', + type: 'address', + }, + ], + name: 'BeaconUpgraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'source', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'FundsReceived', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'newAddress', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'changedBy', + type: 'address', + }, + ], + name: 'FundsRecipientChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'numberOfMints', + type: 'uint256', + }, + ], + name: 'OpenMintFinalized', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'OwnershipTransferred', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'bytes32', + name: 'previousAdminRole', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'bytes32', + name: 'newAdminRole', + type: 'bytes32', + }, + ], + name: 'RoleAdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'RoleGranted', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'RoleRevoked', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'quantity', + type: 'uint256', + }, + { + indexed: true, + internalType: 'uint256', + name: 'pricePerToken', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'firstPurchasedTokenId', + type: 'uint256', + }, + ], + name: 'Sale', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'changedBy', + type: 'address', + }, + ], + name: 'SalesConfigChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'Transfer', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + indexed: false, + internalType: 'contract IMetadataRenderer', + name: 'renderer', + type: 'address', + }, + ], + name: 'UpdatedMetadataRenderer', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'implementation', + type: 'address', + }, + ], + name: 'Upgraded', + type: 'event', + }, + { + inputs: [], + name: 'DEFAULT_ADMIN_ROLE', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'MINTER_ROLE', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'SALES_MANAGER_ROLE', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'recipient', + type: 'address', + }, + { + internalType: 'uint256', + name: 'quantity', + type: 'uint256', + }, + ], + name: 'adminMint', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address[]', + name: 'recipients', + type: 'address[]', + }, + ], + name: 'adminMintAirdrop', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'approve', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'burn', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'config', + outputs: [ + { + internalType: 'contract IMetadataRenderer', + name: 'metadataRenderer', + type: 'address', + }, + { + internalType: 'uint64', + name: 'editionSize', + type: 'uint64', + }, + { + internalType: 'uint16', + name: 'royaltyBPS', + type: 'uint16', + }, + { + internalType: 'address payable', + name: 'fundsRecipient', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'contractURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'contractVersion', + outputs: [ + { + internalType: 'uint32', + name: '', + type: 'uint32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'finalizeOpenEdition', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'getApproved', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + ], + name: 'getRoleAdmin', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'grantRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'hasRole', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: '_contractName', + type: 'string', + }, + { + internalType: 'string', + name: '_contractSymbol', + type: 'string', + }, + { + internalType: 'address', + name: '_initialOwner', + type: 'address', + }, + { + internalType: 'address payable', + name: '_fundsRecipient', + type: 'address', + }, + { + internalType: 'uint64', + name: '_editionSize', + type: 'uint64', + }, + { + internalType: 'uint16', + name: '_royaltyBPS', + type: 'uint16', + }, + { + components: [ + { + internalType: 'uint104', + name: 'publicSalePrice', + type: 'uint104', + }, + { + internalType: 'uint32', + name: 'maxSalePurchasePerAddress', + type: 'uint32', + }, + { + internalType: 'uint64', + name: 'publicSaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'publicSaleEnd', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleEnd', + type: 'uint64', + }, + { + internalType: 'bytes32', + name: 'presaleMerkleRoot', + type: 'bytes32', + }, + ], + internalType: 'struct IERC721Drop.SalesConfiguration', + name: '_salesConfig', + type: 'tuple', + }, + { + internalType: 'contract IMetadataRenderer', + name: '_metadataRenderer', + type: 'address', + }, + { + internalType: 'bytes', + name: '_metadataRendererInit', + type: 'bytes', + }, + ], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'user', + type: 'address', + }, + ], + name: 'isAdmin', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'nftOwner', + type: 'address', + }, + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + ], + name: 'isApprovedForAll', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'metadataRenderer', + outputs: [ + { + internalType: 'contract IMetadataRenderer', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'minter', + type: 'address', + }, + ], + name: 'mintedPerAddress', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'totalMints', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'presaleMints', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'publicMints', + type: 'uint256', + }, + ], + internalType: 'struct IERC721Drop.AddressMintDetails', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'name', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'ownerOf', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'presaleMintsByAddress', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'proxiableUUID', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'quantity', + type: 'uint256', + }, + ], + name: 'purchase', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'quantity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maxQuantity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'pricePerToken', + type: 'uint256', + }, + { + internalType: 'bytes32[]', + name: 'merkleProof', + type: 'bytes32[]', + }, + ], + name: 'purchasePresale', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'renounceRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'revokeRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '_salePrice', + type: 'uint256', + }, + ], + name: 'royaltyInfo', + outputs: [ + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + { + internalType: 'uint256', + name: 'royaltyAmount', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'safeTransferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + { + internalType: 'bytes', + name: '_data', + type: 'bytes', + }, + ], + name: 'safeTransferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'saleDetails', + outputs: [ + { + components: [ + { + internalType: 'bool', + name: 'publicSaleActive', + type: 'bool', + }, + { + internalType: 'bool', + name: 'presaleActive', + type: 'bool', + }, + { + internalType: 'uint256', + name: 'publicSalePrice', + type: 'uint256', + }, + { + internalType: 'uint64', + name: 'publicSaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'publicSaleEnd', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleEnd', + type: 'uint64', + }, + { + internalType: 'bytes32', + name: 'presaleMerkleRoot', + type: 'bytes32', + }, + { + internalType: 'uint256', + name: 'maxSalePurchasePerAddress', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalMinted', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maxSupply', + type: 'uint256', + }, + ], + internalType: 'struct IERC721Drop.SaleDetails', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'salesConfig', + outputs: [ + { + internalType: 'uint104', + name: 'publicSalePrice', + type: 'uint104', + }, + { + internalType: 'uint32', + name: 'maxSalePurchasePerAddress', + type: 'uint32', + }, + { + internalType: 'uint64', + name: 'publicSaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'publicSaleEnd', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleEnd', + type: 'uint64', + }, + { + internalType: 'bytes32', + name: 'presaleMerkleRoot', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'setApprovalForAll', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address payable', + name: 'newRecipientAddress', + type: 'address', + }, + ], + name: 'setFundsRecipient', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'contract IMetadataRenderer', + name: 'newRenderer', + type: 'address', + }, + { + internalType: 'bytes', + name: 'setupRenderer', + type: 'bytes', + }, + ], + name: 'setMetadataRenderer', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'setOwner', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint104', + name: 'publicSalePrice', + type: 'uint104', + }, + { + internalType: 'uint32', + name: 'maxSalePurchasePerAddress', + type: 'uint32', + }, + { + internalType: 'uint64', + name: 'publicSaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'publicSaleEnd', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleEnd', + type: 'uint64', + }, + { + internalType: 'bytes32', + name: 'presaleMerkleRoot', + type: 'bytes32', + }, + ], + name: 'setSaleConfiguration', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes4', + name: 'interfaceId', + type: 'bytes4', + }, + ], + name: 'supportsInterface', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'symbol', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'tokenURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'totalSupply', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'transferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + ], + name: 'upgradeTo', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'upgradeToAndCall', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [], + name: 'withdraw', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'zoraFeeForAmount', + outputs: [ + { + internalType: 'address payable', + name: '', + type: 'address', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'zoraFeeManager', + outputs: [ + { + internalType: 'contract IZoraFeeManager', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + stateMutability: 'payable', + type: 'receive', + }, +] + +const _bytecode = + '0x610160604052306080527ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc960c0527f5ebbf78043a2215b522b1366a193ec74dd1f54e441e841a87b9653246a9c49a660e0523480156200005e57600080fd5b5060405162005724380380620057248339810160408190526200008191620001b7565b600860a052600054610100900460ff16620000a35760005460ff1615620000ad565b620000ad62000171565b620001155760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000138576000805461ffff19166101011790555b6001600160a01b038085166101405283811661010052821661012052801562000167576000805461ff00191690555b505050506200020b565b600062000189306200018f60201b62002f2d1760201c565b15905090565b6001600160a01b03163b151590565b6001600160a01b0381168114620001b457600080fd5b50565b600080600060608486031215620001cd57600080fd5b8351620001da816200019e565b6020850151909350620001ed816200019e565b604085015190925062000200816200019e565b809150509250925092565b60805160a05160c05160e051610100516101205161014051615478620002ac60003960008181610979015261268e015260006135cb015260006125de015260008181610aa301528181610e62015281816119080152611b38015260008181610a4f01528181612116015261244801526000610908015260008181611568015281816115fe01528181611ce401528181611d7a0152611e7101526154786000f3fe60806040526004361061032d5760003560e01c80636352211e116101a5578063b8ae5a2c116100ec578063e58306f911610095578063ee37be391161006f578063ee37be3914610b1a578063efef39a114610b3a578063faff3c7014610b4d578063ffdb716314610b6d57600080fd5b8063e58306f914610ac5578063e8a3d48514610ae5578063e985e9c514610afa57600080fd5b8063d5391393116100c6578063d539139314610a3d578063d547741f14610a71578063e26bd34314610a9157600080fd5b8063b8ae5a2c146109bb578063c87b56dd146109db578063d445b978146109fb57600080fd5b806395d89b411161014e578063a22cb46511610128578063a22cb46514610947578063b6eb9c8614610967578063b88d4fde1461099b57600080fd5b806395d89b41146108dc578063a0a8e460146108f1578063a217fddf1461093257600080fd5b806379502c551161017f57806379502c55146107f95780638da5cb5b1461088057806391d148541461089557600080fd5b80636352211e1461079a57806370319970146107ba57806370a08231146107d957600080fd5b80632a55205a116102745780633ccfd60b1161021d57806342966c68116101f757806342966c68146107245780634f1ef2861461074457806352d1902d1461075757806361fea7681461076c57600080fd5b80633ccfd60b146106da57806341e96eb1146106ef57806342842e0e1461070457600080fd5b806336568abe1161024e57806336568abe1461067a5780633659cfe61461069a5780633bcdcc87146106ba57600080fd5b80632a55205a146105f95780632f2ff15d146106385780633474a4a61461065857600080fd5b806318160ddd116102d6578063248a9ca3116102b0578063248a9ca31461059557806324d7806c146105c657806325024a2b146105e657600080fd5b806318160ddd1461045f5780631d2c0b381461048657806323b872dd1461057557600080fd5b8063095ea7b311610307578063095ea7b3146103fd57806310a7eb5d1461041f57806313af40351461043f57600080fd5b806301ffc9a71461036e57806306fdde03146103a3578063081812fc146103c557600080fd5b366103695760405134815233907f8e47b87b0ef542cdfa1659c551d88bad38aa7f452d2bbb349ab7530dfec8be8f9060200160405180910390a2005b600080fd5b34801561037a57600080fd5b5061038e610389366004614918565b610b8d565b60405190151581526020015b60405180910390f35b3480156103af57600080fd5b506103b8610c82565b60405161039a919061498d565b3480156103d157600080fd5b506103e56103e03660046149a0565b610d14565b6040516001600160a01b03909116815260200161039a565b34801561040957600080fd5b5061041d6104183660046149de565b610d71565b005b34801561042b57600080fd5b5061041d61043a366004614a0a565b610e31565b34801561044b57600080fd5b5061041d61045a366004614a0a565b610f53565b34801561046b57600080fd5b5060665460655403600019015b60405190815260200161039a565b34801561049257600080fd5b5061016254610163546101645461051c926cffffffffffffffffffffffffff8116926d0100000000000000000000000000820463ffffffff16927101000000000000000000000000000000000090920467ffffffffffffffff9081169281831692680100000000000000008104831692700100000000000000000000000000000000909104169087565b604080516cffffffffffffffffffffffffff909816885263ffffffff909616602088015267ffffffffffffffff948516958701959095529183166060860152821660808501521660a083015260c082015260e00161039a565b34801561058157600080fd5b5061041d610590366004614a27565b610fc7565b3480156105a157600080fd5b506104786105b03660046149a0565b600090815261012d602052604090206001015490565b3480156105d257600080fd5b5061038e6105e1366004614a0a565b610fd2565b6104786105f4366004614aad565b611012565b34801561060557600080fd5b50610619610614366004614b0e565b6112ec565b604080516001600160a01b03909316835260208301919091520161039a565b34801561064457600080fd5b5061041d610653366004614b30565b61135b565b34801561066457600080fd5b5061066d611381565b60405161039a9190614b60565b34801561068657600080fd5b5061041d610695366004614b30565b6114d1565b3480156106a657600080fd5b5061041d6106b5366004614a0a565b61155d565b3480156106c657600080fd5b5061041d6106d5366004614d09565b6116f8565b3480156106e657600080fd5b5061041d611858565b3480156106fb57600080fd5b5061041d611b07565b34801561071057600080fd5b5061041d61071f366004614a27565b611cb3565b34801561073057600080fd5b5061041d61073f3660046149a0565b611cce565b61041d610752366004614d09565b611cd9565b34801561076357600080fd5b50610478611e64565b34801561077857600080fd5b50610478610787366004614a0a565b6101656020526000908152604090205481565b3480156107a657600080fd5b506103e56107b53660046149a0565b611f29565b3480156107c657600080fd5b50610160546001600160a01b03166103e5565b3480156107e557600080fd5b506104786107f4366004614a0a565b611f3b565b34801561080557600080fd5b506101605461016154610840916001600160a01b0380821692600160a01b830467ffffffffffffffff1692600160e01b900461ffff16911684565b604080516001600160a01b03958616815267ffffffffffffffff909416602085015261ffff9092169183019190915291909116606082015260800161039a565b34801561088c57600080fd5b506103e5611fa3565b3480156108a157600080fd5b5061038e6108b0366004614b30565b600091825261012d602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156108e857600080fd5b506103b8611fbd565b3480156108fd57600080fd5b5060405163ffffffff7f000000000000000000000000000000000000000000000000000000000000000016815260200161039a565b34801561093e57600080fd5b50610478600081565b34801561095357600080fd5b5061041d610962366004614d67565b611fcc565b34801561097357600080fd5b506103e57f000000000000000000000000000000000000000000000000000000000000000081565b3480156109a757600080fd5b5061041d6109b6366004614d95565b61207b565b3480156109c757600080fd5b506104786109d6366004614e01565b6120e5565b3480156109e757600080fd5b506103b86109f63660046149a0565b612263565b348015610a0757600080fd5b50610a1b610a16366004614a0a565b61232f565b604080518251815260208084015190820152918101519082015260600161039a565b348015610a4957600080fd5b506104787f000000000000000000000000000000000000000000000000000000000000000081565b348015610a7d57600080fd5b5061041d610a8c366004614b30565b6123f1565b348015610a9d57600080fd5b506104787f000000000000000000000000000000000000000000000000000000000000000081565b348015610ad157600080fd5b50610478610ae03660046149de565b612417565b348015610af157600080fd5b506103b861254e565b348015610b0657600080fd5b5061038e610b15366004614e43565b6125da565b348015610b2657600080fd5b50610619610b353660046149a0565b61264f565b610478610b483660046149a0565b612722565b348015610b5957600080fd5b5061041d610b68366004614f78565b612983565b348015610b7957600080fd5b5061041d610b88366004615067565b612d65565b6000610b9882612f3c565b80610be457507f8da5cb5b000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b80610c3057507f2a55205a000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b80610c7c57507fe54eb531000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b606060678054610c91906150e6565b80601f0160208091040260200160405190810160405280929190818152602001828054610cbd906150e6565b8015610d0a5780601f10610cdf57610100808354040283529160200191610d0a565b820191906000526020600020905b815481529060010190602001808311610ced57829003601f168201915b5050505050905090565b6000610d1f82612f92565b610d55576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152606b60205260409020546001600160a01b031690565b6000610d7c82611f29565b9050806001600160a01b0316836001600160a01b03161415610dca576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614801590610dea5750610de881336125da565b155b15610e21576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e2c838383612fcb565b505050565b3360009081527fa581b17bfc4d6578e300cafbf34fd2dc1fef0270d8c73f88a99dcde2859a663960205260409020547f00000000000000000000000000000000000000000000000000000000000000009060ff16158015610ead5750600081815261012d6020908152604080832033845290915290205460ff16155b15610eec576040517fcee8157c000000000000000000000000000000000000000000000000000000008152600481018290526024015b60405180910390fd5b61016180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091556040513391907f70a7ea5c664ab9c21baf3da59bb2f1e1ca33557b08a0031fab4f17076744995190600090a35050565b3360009081527fa581b17bfc4d6578e300cafbf34fd2dc1fef0270d8c73f88a99dcde2859a6639602052604090205460ff16610fbb576040517f02bd6bd100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610fc48161303f565b50565b610e2c8383836130b5565b6001600160a01b03811660009081527fa581b17bfc4d6578e300cafbf34fd2dc1fef0270d8c73f88a99dcde2859a6639602052604081205460ff16610c7c565b6000600260fb5414156110675760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ee3565b600260fb55610160548690600160a01b900467ffffffffffffffff166110906065546000190190565b61109a9083615169565b11156110d2576040517f717c513000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110da613337565b611110576040517f95ed3c1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111828484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505061016454604080513360208201529081018c9052606081018b9052909250608001905060405160208183030381529060405280519060200120613388565b6111b8576040517f85b70e5200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111c28786615181565b3414611207576111d28786615181565b6040517f6a1c179e000000000000000000000000000000000000000000000000000000008152600401610ee391815260200190565b336000908152610165602052604081208054899290611227908490615169565b90915550503360009081526101656020526040902054861015611276576040517fa7b32bb100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611280338861339e565b60008761128b6133d6565b61129591906151a0565b90508588336001600160a01b03167f4e26b0356a15833a75d497ecc40ebbb716b99466ed0dba9454f1fff451e25a90846040516112d491815260200190565b60405180910390a4600160fb55979650505050505050565b6101615460009081906001600160a01b0316611318575050610161546001600160a01b03166000611354565b61016154610160546001600160a01b03909116906127109061134590600160e01b900461ffff1686615181565b61134f91906151b7565b915091505b9250929050565b600082815261012d6020526040902060010154611377816133e7565b610e2c83836133f1565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091526040518061016001604052806113ee613495565b151581526020016113fd613337565b15158152610162546cffffffffffffffffffffffffff8116602083015267ffffffffffffffff710100000000000000000000000000000000008204811660408401526101635480821660608501526801000000000000000081048216608085015270010000000000000000000000000000000090041660a08301526101645460c083015263ffffffff6d01000000000000000000000000009091041660e0820152610100016114af6065546000190190565b815261016054600160a01b900467ffffffffffffffff16602090910152919050565b6001600160a01b038116331461154f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610ee3565b61155982826134dc565b5050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156115fc5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c00000000000000000000000000000000000000006064820152608401610ee3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166116577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146116d35760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f787900000000000000000000000000000000000000006064820152608401610ee3565b6116dc81613561565b60408051600080825260208201909252610fc4918391906136f2565b3360009081527fa581b17bfc4d6578e300cafbf34fd2dc1fef0270d8c73f88a99dcde2859a6639602052604090205460ff16611760576040517f02bd6bd100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61016080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038416179055805115611813576040517f856a7ffa0000000000000000000000000000000000000000000000000000000081526001600160a01b0383169063856a7ffa906117e090849060040161498d565b600060405180830381600087803b1580156117fa57600080fd5b505af115801561180e573d6000803e3d6000fd5b505050505b604080513381526001600160a01b03841660208201527f046c5d913c35948c3e0e44c3599eb14bf33b73f141fa8bb282b300414998b868910160405180910390a15050565b600260fb5414156118ab5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ee3565b600260fb5533476000806118be8361264f565b6001600160a01b03861660009081527fa581b17bfc4d6578e300cafbf34fd2dc1fef0270d8c73f88a99dcde2859a66396020526040902054919350915060ff1615801561195057507f0000000000000000000000000000000000000000000000000000000000000000600090815261012d602090815260408083206001600160a01b038816845290915290205460ff16155b801561196e5750816001600160a01b0316846001600160a01b031614155b80156119895750610161546001600160a01b03858116911614155b156119c0576040517f1dab829b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015611a67576000826001600160a01b0316826203345090604051600060405180830381858888f193505050503d8060008114611a19576040519150601f19603f3d011682016040523d82523d6000602084013e611a1e565b606091505b5050905080611a59576040517f39debd5b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611a6382856151a0565b9350505b610161546040516000916001600160a01b0316906203345090869084818181858888f193505050503d8060008114611abb576040519150601f19603f3d011682016040523d82523d6000602084013e611ac0565b606091505b5050905080611afb576040517f39debd5b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050600160fb55505050565b3360009081527fa581b17bfc4d6578e300cafbf34fd2dc1fef0270d8c73f88a99dcde2859a663960205260409020547f00000000000000000000000000000000000000000000000000000000000000009060ff16158015611b835750600081815261012d6020908152604080832033845290915290205460ff16155b15611bbd576040517fcee8157c00000000000000000000000000000000000000000000000000000000815260048101829052602401610ee3565b61016054600160a01b900467ffffffffffffffff90811614611c0b576040517fe742c08400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60655460001901610160805467ffffffffffffffff92909216600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055611c5b3390565b61016054604051600160a01b90910467ffffffffffffffff1681526001600160a01b0391909116907fb6cc1e876b8d7479c8afe025a58658b0f3c3ec5bd0f28cb4261326b162069bf89060200160405180910390a250565b610e2c8383836040518060200160405280600081525061207b565b610fc4816001613892565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415611d785760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c00000000000000000000000000000000000000006064820152608401610ee3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611dd37f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614611e4f5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f787900000000000000000000000000000000000000006064820152608401610ee3565b611e5882613561565b611559828260016136f2565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611f045760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610ee3565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b6000611f3482613ae9565b5192915050565b60006001600160a01b038216611f7d576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b03166000908152606a602052604090205467ffffffffffffffff1690565b6000611fb861015f546001600160a01b031690565b905090565b606060688054610c91906150e6565b6001600160a01b03821633141561200f576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000818152606c602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6120868484846130b5565b6001600160a01b0383163b151580156120a857506120a684848484613c2b565b155b156120df576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b3360009081527fa581b17bfc4d6578e300cafbf34fd2dc1fef0270d8c73f88a99dcde2859a663960205260408120547f00000000000000000000000000000000000000000000000000000000000000009060ff161580156121615750600081815261012d6020908152604080832033845290915290205460ff16155b1561219b576040517fcee8157c00000000000000000000000000000000000000000000000000000000815260048101829052602401610ee3565b610160548390600160a01b900467ffffffffffffffff166121bf6065546000190190565b6121c99083615169565b1115612201576040517f717c513000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606554808581015b8083101561224f576122448888848603818110612228576122286151f2565b905060200201602081019061223d9190614a0a565b600161339e565b600190920191612209565b506122586133d6565b979650505050505050565b606061226e82612f92565b6122a4576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610160546040517fc87b56dd000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b039091169063c87b56dd90602401600060405180830381865afa158015612307573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c7c9190810190615221565b61235360405180606001604052806000815260200160008152602001600081525090565b6040518060600160405280612394846001600160a01b03166000908152606a602052604090205467ffffffffffffffff680100000000000000009091041690565b81526001600160a01b03841660008181526101656020908152604080832054828601819052938352606a909152908190205492019168010000000000000000900467ffffffffffffffff166123e991906151a0565b905292915050565b600082815261012d602052604090206001015461240d816133e7565b610e2c83836134dc565b3360009081527fa581b17bfc4d6578e300cafbf34fd2dc1fef0270d8c73f88a99dcde2859a663960205260408120547f00000000000000000000000000000000000000000000000000000000000000009060ff161580156124935750600081815261012d6020908152604080832033845290915290205460ff16155b156124cd576040517fcee8157c00000000000000000000000000000000000000000000000000000000815260048101829052602401610ee3565b610160548390600160a01b900467ffffffffffffffff166124f16065546000190190565b6124fb9083615169565b1115612533576040517f717c513000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61253d858561339e565b6125456133d6565b95945050505050565b61016054604080517fe8a3d48500000000000000000000000000000000000000000000000000000000815290516060926001600160a01b03169163e8a3d4859160048083019260009291908290030181865afa1580156125b2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611fb89190810190615221565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561261e57506001610c7c565b6001600160a01b038084166000908152606c602090815260408083209386168352929052205460ff165b9392505050565b6040517f2e0c16490000000000000000000000000000000000000000000000000000000081523060048201526000908190819081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632e0c16499060240160408051808303816000875af11580156126d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126fa919061528f565b90925090508161271061270d8388615181565b61271791906151b7565b935093505050915091565b6000600260fb5414156127775760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ee3565b600260fb55610160548290600160a01b900467ffffffffffffffff166127a06065546000190190565b6127aa9083615169565b11156127e2576040517f717c513000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6127ea613495565b612820576040517ff12dcc7f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610162546cffffffffffffffffffffffffff1661283d8482615181565b341461284d576111d28482615181565b610162546d0100000000000000000000000000900463ffffffff16158015906128d95750610162543360009081526101656020908152604080832054606a909252909120546d010000000000000000000000000090920463ffffffff1691869068010000000000000000900467ffffffffffffffff166128cd9190615169565b6128d791906151a0565b115b15612910576040517f220ae94c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61291a338561339e565b6000846129256133d6565b61292f91906151a0565b90508185336001600160a01b03167f4e26b0356a15833a75d497ecc40ebbb716b99466ed0dba9454f1fff451e25a908460405161296e91815260200190565b60405180910390a4600160fb55949350505050565b600054610100900460ff1661299e5760005460ff16156129a2565b303b155b612a145760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610ee3565b600054610100900460ff16158015612a5357600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b612a5d8a8a613d76565b612a65613dfd565b612a6d613e7c565b612a78600089613f01565b612a818861303f565b61016054611388600160e01b90910461ffff161115612ad0576040517f6680e9820000000000000000000000000000000000000000000000000000000081526113886004820152602401610ee3565b8351610162805460208701516040808901516cffffffffffffffffffffffffff9095167fffffffffffffffffffffffffffffff0000000000000000000000000000000000909316929092176d010000000000000000000000000063ffffffff90921691909102177fffffffffffffff0000000000000000ffffffffffffffffffffffffffffffffff167101000000000000000000000000000000000067ffffffffffffffff948516021790915560608601516101638054608089015160a08a01519386167fffffffffffffffffffffffffffffffff00000000000000000000000000000000909216919091176801000000000000000091861691909102177fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000009285169290920291909117905560c08601516101645561016080546001600160a01b038781167fffff000000000000000000000000000000000000000000000000000000000000909216600160a01b958c16959095027fffff0000ffffffffffffffff000000000000000000000000000000000000000016949094178117600160e01b61ffff8b16021790915561016180547fffffffffffffffffffffffff000000000000000000000000000000000000000016938b1693909317909255517f856a7ffa00000000000000000000000000000000000000000000000000000000815263856a7ffa90612cf890859060040161498d565b600060405180830381600087803b158015612d1257600080fd5b505af1158015612d26573d6000803e3d6000fd5b505050508015612d5957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50505050505050505050565b3360009081527fa581b17bfc4d6578e300cafbf34fd2dc1fef0270d8c73f88a99dcde2859a6639602052604090205460ff16612dcd576040517f02bd6bd100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61016280546cffffffffffffffffffffffffff89167fffffffffffffffffffffffffffffff0000000000000000000000000000000000909116176d010000000000000000000000000063ffffffff891602177fffffffffffffff0000000000000000ffffffffffffffffffffffffffffffffff167101000000000000000000000000000000000067ffffffffffffffff888116919091029190911790915561016380548683167fffffffffffffffffffffffffffffffff00000000000000000000000000000000909116176801000000000000000086841602177fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000092851692909202919091179055610164819055336001600160a01b03167fc1ff5e4744ac8dd2b8027a10e3723b165975297501c71c4e7dcb8796d96375db60405160405180910390a250505050505050565b6001600160a01b03163b151590565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610c7c5750610c7c82613f0b565b600081600111158015612fa6575060655482105b8015610c7c575050600090815260696020526040902054600160e01b900460ff161590565b6000828152606b602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b61015f546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a361015f80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60006130c082613ae9565b9050836001600160a01b031681600001516001600160a01b031614613111576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000336001600160a01b038616148061312f575061312f85336125da565b8061314a57503361313f84610d14565b6001600160a01b0316145b905080613183576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384166131c3576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131cf60008487612fcb565b6001600160a01b038581166000908152606a6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000080821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652606990945282852080547fffffffff0000000000000000000000000000000000000000000000000000000016909417600160a01b429092169190910217835587018084529220805491939091166132ec5760655482146132ec578054602086015167ffffffffffffffff16600160a01b027fffffffff000000000000000000000000000000000000000000000000000000009091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050565b61016354600090426801000000000000000090910467ffffffffffffffff1611801590611fb8575050610163544270010000000000000000000000000000000090910467ffffffffffffffff161190565b6000826133958584613fee565b14949350505050565b6000600882116133ae57816133b1565b60085b90506133bd8382614062565b6133c781836151a0565b9150506000811161339e575050565b60006001606554611fb891906151a0565b610fc48133614204565b600082815261012d602090815260408083206001600160a01b038516845290915290205460ff1661155957600082815261012d602090815260408083206001600160a01b03851684529091529020805460ff191660011790556134513390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61016254600090427101000000000000000000000000000000000090910467ffffffffffffffff1611801590611fb8575050610163544267ffffffffffffffff9091161190565b600082815261012d602090815260408083206001600160a01b038516845290915290205460ff161561155957600082815261012d602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b3360009081527fa581b17bfc4d6578e300cafbf34fd2dc1fef0270d8c73f88a99dcde2859a6639602052604090205460ff166135c9576040517f02bd6bd100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663739958338261362a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381865afa15801561368d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136b191906152bd565b610fc4576040517fef2bf7d40000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152602401610ee3565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161561372557610e2c83614285565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561377f575060408051601f3d908101601f1916820190925261377c918101906152da565b60015b6137f15760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608401610ee3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146138865760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c655555494400000000000000000000000000000000000000000000006064820152608401610ee3565b50610e2c83838361435b565b600061389d83613ae9565b8051909150821561391c576000336001600160a01b03831614806138c657506138c682336125da565b806138e15750336138d686610d14565b6001600160a01b0316145b90508061391a576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b61392860008583612fcb565b6001600160a01b038082166000818152606a60209081526040808320805470010000000000000000000000000000000060001967ffffffffffffffff8084169190910181167fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000841681178390048216600190810183169093027fffffffffffffffff0000000000000000ffffffffffffffff0000000000000000909416179290921783558b8652606990945282852080547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff42909316600160a01b027fffffffff000000000000000000000000000000000000000000000000000000009091169097179690961716600160e01b178555918901808452922080549194909116613a9e576065548214613a9e578054602087015167ffffffffffffffff16600160a01b027fffffffff000000000000000000000000000000000000000000000000000000009091166001600160a01b038716171781555b5050604051869250600091506001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a450506066805460010190555050565b60408051606081018252600080825260208201819052918101919091528180600111158015613b19575060655481105b15613bf957600081815260696020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16151591810182905290613bf75780516001600160a01b031615613b8d579392505050565b5060001901600081815260696020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff1615159281019290925215613bf2579392505050565b613b8d565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a0290613c799033908990889088906004016152f3565b6020604051808303816000875af1925050508015613cb4575060408051601f3d908101601f19168201909252613cb19181019061532f565b60015b613d28573d808015613ce2576040519150601f19603f3d011682016040523d82523d6000602084013e613ce7565b606091505b508051613d20576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050949350505050565b600054610100900460ff16613df35760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610ee3565b6115598282614380565b600054610100900460ff16613e7a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610ee3565b565b600054610100900460ff16613ef95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610ee3565b613e7a61442e565b61155982826133f1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480613f9e57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610c7c57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610c7c565b600081815b845181101561405a576000858281518110614010576140106151f2565b602002602001015190508083116140365760008381526020829052604090209250614047565b600081815260208490526040902092505b50806140528161534c565b915050613ff3565b509392505050565b6065546001600160a01b0383166140a5576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816140dc576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383166000818152606a6020908152604080832080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000811667ffffffffffffffff8083168a018116918217680100000000000000007fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090941690921783900481168a01811690920217909155858452606990925290912080547fffffffff0000000000000000000000000000000000000000000000000000000016909217600160a01b4290921691909102179055808083015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808214156141b75750606555505050565b600082815261012d602090815260408083206001600160a01b038516845290915290205460ff1661155957614243816001600160a01b031660146144b2565b61424e8360206144b2565b60405160200161425f929190615367565b60408051601f198184030181529082905262461bcd60e51b8252610ee39160040161498d565b6001600160a01b0381163b6143025760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610ee3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b614364836146db565b6000825111806143715750805b15610e2c576120df838361471b565b600054610100900460ff166143fd5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610ee3565b8151614410906067906020850190614851565b508051614424906068906020840190614851565b5060016065555050565b600054610100900460ff166144ab5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610ee3565b600160fb55565b606060006144c1836002615181565b6144cc906002615169565b67ffffffffffffffff8111156144e4576144e4614c2b565b6040519080825280601f01601f19166020018201604052801561450e576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110614545576145456151f2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106145a8576145a86151f2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006145e4846002615181565b6145ef906001615169565b90505b600181111561468c577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110614630576146306151f2565b1a60f81b828281518110614646576146466151f2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93614685816153e8565b90506145f2565b5083156126485760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ee3565b6146e481614285565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b61479a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610ee3565b600080846001600160a01b0316846040516147b591906153ff565b600060405180830381855af49150503d80600081146147f0576040519150601f19603f3d011682016040523d82523d6000602084013e6147f5565b606091505b5091509150612545828260405180606001604052806027815260200161541c6027913960608315614827575081612648565b8251156148375782518084602001fd5b8160405162461bcd60e51b8152600401610ee3919061498d565b82805461485d906150e6565b90600052602060002090601f01602090048101928261487f57600085556148c5565b82601f1061489857805160ff19168380011785556148c5565b828001600101855582156148c5579182015b828111156148c55782518255916020019190600101906148aa565b506148d19291506148d5565b5090565b5b808211156148d157600081556001016148d6565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610fc457600080fd5b60006020828403121561492a57600080fd5b8135612648816148ea565b60005b83811015614950578181015183820152602001614938565b838111156120df5750506000910152565b60008151808452614979816020860160208601614935565b601f01601f19169290920160200192915050565b6020815260006126486020830184614961565b6000602082840312156149b257600080fd5b5035919050565b6001600160a01b0381168114610fc457600080fd5b80356149d9816149b9565b919050565b600080604083850312156149f157600080fd5b82356149fc816149b9565b946020939093013593505050565b600060208284031215614a1c57600080fd5b8135612648816149b9565b600080600060608486031215614a3c57600080fd5b8335614a47816149b9565b92506020840135614a57816149b9565b929592945050506040919091013590565b60008083601f840112614a7a57600080fd5b50813567ffffffffffffffff811115614a9257600080fd5b6020830191508360208260051b850101111561135457600080fd5b600080600080600060808688031215614ac557600080fd5b853594506020860135935060408601359250606086013567ffffffffffffffff811115614af157600080fd5b614afd88828901614a68565b969995985093965092949392505050565b60008060408385031215614b2157600080fd5b50508035926020909101359150565b60008060408385031215614b4357600080fd5b823591506020830135614b55816149b9565b809150509250929050565b81511515815261016081016020830151614b7e602084018215159052565b50604083015160408301526060830151614ba4606084018267ffffffffffffffff169052565b506080830151614bc0608084018267ffffffffffffffff169052565b5060a0830151614bdc60a084018267ffffffffffffffff169052565b5060c0830151614bf860c084018267ffffffffffffffff169052565b5060e083810151908301526101008084015190830152610120808401519083015261014092830151929091019190915290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715614c8357614c83614c2b565b604052919050565b600067ffffffffffffffff821115614ca557614ca5614c2b565b50601f01601f191660200190565b600082601f830112614cc457600080fd5b8135614cd7614cd282614c8b565b614c5a565b818152846020838601011115614cec57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215614d1c57600080fd5b8235614d27816149b9565b9150602083013567ffffffffffffffff811115614d4357600080fd5b614d4f85828601614cb3565b9150509250929050565b8015158114610fc457600080fd5b60008060408385031215614d7a57600080fd5b8235614d85816149b9565b91506020830135614b5581614d59565b60008060008060808587031215614dab57600080fd5b8435614db6816149b9565b93506020850135614dc6816149b9565b925060408501359150606085013567ffffffffffffffff811115614de957600080fd5b614df587828801614cb3565b91505092959194509250565b60008060208385031215614e1457600080fd5b823567ffffffffffffffff811115614e2b57600080fd5b614e3785828601614a68565b90969095509350505050565b60008060408385031215614e5657600080fd5b8235614e61816149b9565b91506020830135614b55816149b9565b803567ffffffffffffffff811681146149d957600080fd5b803561ffff811681146149d957600080fd5b80356cffffffffffffffffffffffffff811681146149d957600080fd5b803563ffffffff811681146149d957600080fd5b600060e08284031215614ede57600080fd5b60405160e0810181811067ffffffffffffffff82111715614f0157614f01614c2b565b604052905080614f1083614e9b565b8152614f1e60208401614eb8565b6020820152614f2f60408401614e71565b6040820152614f4060608401614e71565b6060820152614f5160808401614e71565b6080820152614f6260a08401614e71565b60a082015260c083013560c08201525092915050565b60008060008060008060008060006101e08a8c031215614f9757600080fd5b893567ffffffffffffffff80821115614faf57600080fd5b614fbb8d838e01614cb3565b9a5060208c0135915080821115614fd157600080fd5b614fdd8d838e01614cb3565b9950614feb60408d016149ce565b9850614ff960608d016149ce565b975061500760808d01614e71565b965061501560a08d01614e89565b95506150248d60c08e01614ecc565b94506150336101a08d016149ce565b93506101c08c013591508082111561504a57600080fd5b506150578c828d01614cb3565b9150509295985092959850929598565b600080600080600080600060e0888a03121561508257600080fd5b61508b88614e9b565b965061509960208901614eb8565b95506150a760408901614e71565b94506150b560608901614e71565b93506150c360808901614e71565b92506150d160a08901614e71565b915060c0880135905092959891949750929550565b600181811c908216806150fa57607f821691505b60208210811415615134577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561517c5761517c61513a565b500190565b600081600019048311821515161561519b5761519b61513a565b500290565b6000828210156151b2576151b261513a565b500390565b6000826151ed577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561523357600080fd5b815167ffffffffffffffff81111561524a57600080fd5b8201601f8101841361525b57600080fd5b8051615269614cd282614c8b565b81815285602083850101111561527e57600080fd5b612545826020830160208601614935565b600080604083850312156152a257600080fd5b82516152ad816149b9565b6020939093015192949293505050565b6000602082840312156152cf57600080fd5b815161264881614d59565b6000602082840312156152ec57600080fd5b5051919050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526153256080830184614961565b9695505050505050565b60006020828403121561534157600080fd5b8151612648816148ea565b60006000198214156153605761536061513a565b5060010190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161539f816017850160208801614935565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516153dc816028840160208801614935565b01602801949350505050565b6000816153f7576153f761513a565b506000190190565b60008251615411818460208701614935565b919091019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a5188be7debe6ea7f387231d95068a3b01fac435940799c4e4cf697ddd1fbd1264736f6c634300080a0033' + +type ERC721DropConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: ERC721DropConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class ERC721Drop__factory extends ContractFactory { + constructor(...args: ERC721DropConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + _zoraFeeManager: string, + _zoraERC721TransferHelper: string, + _factoryUpgradeGate: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + _zoraFeeManager, + _zoraERC721TransferHelper, + _factoryUpgradeGate, + overrides || {} + ) as Promise + } + override getDeployTransaction( + _zoraFeeManager: string, + _zoraERC721TransferHelper: string, + _factoryUpgradeGate: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + _zoraFeeManager, + _zoraERC721TransferHelper, + _factoryUpgradeGate, + overrides || {} + ) + } + override attach(address: string): ERC721Drop { + return super.attach(address) as ERC721Drop + } + override connect(signer: Signer): ERC721Drop__factory { + return super.connect(signer) as ERC721Drop__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): ERC721DropInterface { + return new utils.Interface(_abi) as ERC721DropInterface + } + static connect(address: string, signerOrProvider: Signer | Provider): ERC721Drop { + return new Contract(address, _abi, signerOrProvider) as ERC721Drop + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/EditionMetadataRenderer.t.sol/IERC721OnChainDataMock__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/EditionMetadataRenderer.t.sol/IERC721OnChainDataMock__factory.ts new file mode 100644 index 0000000..012ebb5 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/EditionMetadataRenderer.t.sol/IERC721OnChainDataMock__factory.ts @@ -0,0 +1,169 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, BigNumberish, Overrides } from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { + IERC721OnChainDataMock, + IERC721OnChainDataMockInterface, +} from '../../EditionMetadataRenderer.t.sol/IERC721OnChainDataMock' + +const _abi = [ + { + inputs: [ + { + internalType: 'uint256', + name: 'totalMinted', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maxSupply', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + inputs: [], + name: 'name', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'saleDetails', + outputs: [ + { + components: [ + { + internalType: 'bool', + name: 'publicSaleActive', + type: 'bool', + }, + { + internalType: 'bool', + name: 'presaleActive', + type: 'bool', + }, + { + internalType: 'uint256', + name: 'publicSalePrice', + type: 'uint256', + }, + { + internalType: 'uint64', + name: 'publicSaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'publicSaleEnd', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleEnd', + type: 'uint64', + }, + { + internalType: 'bytes32', + name: 'presaleMerkleRoot', + type: 'bytes32', + }, + { + internalType: 'uint256', + name: 'maxSalePurchasePerAddress', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalMinted', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maxSupply', + type: 'uint256', + }, + ], + internalType: 'struct IERC721Drop.SaleDetails', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, +] + +const _bytecode = + '0x608060405234801561001057600080fd5b506040516103ff3803806103ff83398101604081905261002f916100af565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810184905261014001829052805461ffff191681556001819055600281905560038190556004556005919091556006556100d3565b600080604083850312156100c257600080fd5b505080516020909101519092909150565b61031d806100e26000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806306fdde031461003b5780633474a4a614610083575b600080fd5b604080518082018252600981527f4d4f434b204e414d4500000000000000000000000000000000000000000000006020820152905161007a91906101a9565b60405180910390f35b61019c6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905261014081019190915250604080516101608101825260005460ff808216151583526101009182900416151560208301526001549282019290925260025467ffffffffffffffff8082166060840152680100000000000000008204811660808401527001000000000000000000000000000000008204811660a084015278010000000000000000000000000000000000000000000000009091041660c082015260035460e08201526004549181019190915260055461012082015260065461014082015290565b60405161007a919061021c565b600060208083528351808285015260005b818110156101d6578581018301518582016040015282016101ba565b818111156101e8576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b8151151581526101608101602083015161023a602084018215159052565b50604083015160408301526060830151610260606084018267ffffffffffffffff169052565b50608083015161027c608084018267ffffffffffffffff169052565b5060a083015161029860a084018267ffffffffffffffff169052565b5060c08301516102b460c084018267ffffffffffffffff169052565b5060e08381015190830152610100808401519083015261012080840151908301526101409283015192909101919091529056fea264697066735822122057db3d9411c1f4f7cd6a2951d87edd7cc08555b3d2e1c59d1d341a85767ef1e564736f6c634300080a0033' + +type IERC721OnChainDataMockConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: IERC721OnChainDataMockConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class IERC721OnChainDataMock__factory extends ContractFactory { + constructor(...args: IERC721OnChainDataMockConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + totalMinted: BigNumberish, + maxSupply: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + totalMinted, + maxSupply, + overrides || {} + ) as Promise + } + override getDeployTransaction( + totalMinted: BigNumberish, + maxSupply: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(totalMinted, maxSupply, overrides || {}) + } + override attach(address: string): IERC721OnChainDataMock { + return super.attach(address) as IERC721OnChainDataMock + } + override connect(signer: Signer): IERC721OnChainDataMock__factory { + return super.connect(signer) as IERC721OnChainDataMock__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): IERC721OnChainDataMockInterface { + return new utils.Interface(_abi) as IERC721OnChainDataMockInterface + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC721OnChainDataMock { + return new Contract(address, _abi, signerOrProvider) as IERC721OnChainDataMock + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/EditionMetadataRenderer.t.sol/index.ts b/packages/zora-drops-utils/src/constants/typechain/factories/EditionMetadataRenderer.t.sol/index.ts new file mode 100644 index 0000000..ddbc290 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/EditionMetadataRenderer.t.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IERC721OnChainDataMock__factory } from './IERC721OnChainDataMock__factory' diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/EditionMetadataRenderer__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/EditionMetadataRenderer__factory.ts new file mode 100644 index 0000000..18cd130 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/EditionMetadataRenderer__factory.ts @@ -0,0 +1,285 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { + EditionMetadataRenderer, + EditionMetadataRendererInterface, +} from '../EditionMetadataRenderer' + +const _abi = [ + { + inputs: [ + { + internalType: 'contract SharedNFTLogic', + name: '_sharedNFTLogic', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + inputs: [], + name: 'Access_OnlyAdmin', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'target', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + indexed: false, + internalType: 'string', + name: 'newDescription', + type: 'string', + }, + ], + name: 'DescriptionUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'target', + type: 'address', + }, + { + indexed: false, + internalType: 'string', + name: 'description', + type: 'string', + }, + { + indexed: false, + internalType: 'string', + name: 'imageURI', + type: 'string', + }, + { + indexed: false, + internalType: 'string', + name: 'animationURI', + type: 'string', + }, + ], + name: 'EditionInitialized', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'target', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + indexed: false, + internalType: 'string', + name: 'imageURI', + type: 'string', + }, + { + indexed: false, + internalType: 'string', + name: 'animationURI', + type: 'string', + }, + ], + name: 'MediaURIsUpdated', + type: 'event', + }, + { + inputs: [], + name: 'contractURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'initializeWithData', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'tokenInfos', + outputs: [ + { + internalType: 'string', + name: 'description', + type: 'string', + }, + { + internalType: 'string', + name: 'imageURI', + type: 'string', + }, + { + internalType: 'string', + name: 'animationURI', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'tokenURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'target', + type: 'address', + }, + { + internalType: 'string', + name: 'newDescription', + type: 'string', + }, + ], + name: 'updateDescription', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'target', + type: 'address', + }, + { + internalType: 'string', + name: 'imageURI', + type: 'string', + }, + { + internalType: 'string', + name: 'animationURI', + type: 'string', + }, + ], + name: 'updateMediaURIs', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, +] + +const _bytecode = + '0x60a060405234801561001057600080fd5b5060405161159238038061159283398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b608051611500610092600039600081816109240152610ad601526115006000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063ba46ae7211610050578063ba46ae72146100b2578063c87b56dd146100dd578063e8a3d485146100fd57600080fd5b80632f17b8f014610077578063856a7ffa1461008c5780638bbb2cf21461009f575b600080fd5b61008a610085366004610e0a565b610105565b005b61008a61009a366004610e7e565b6102bc565b61008a6100ad366004610ecf565b61038b565b6100c56100c0366004610f1d565b6104fe565b6040516100d493929190610f94565b60405180910390f35b6100f06100eb366004610fcd565b6106b8565b6040516100d49190610fe6565b6100f0610a52565b8273ffffffffffffffffffffffffffffffffffffffff811633148015906101b757506040517f24d7806c00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8216906324d7806c90602401602060405180830381865afa158015610191573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101b59190611009565b155b156101ee576040517f02bd6bd100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260208181526040909120845161022892600190920191860190610c31565b5073ffffffffffffffffffffffffffffffffffffffff8416600090815260208181526040909120835161026392600290920191850190610c31565b508373ffffffffffffffffffffffffffffffffffffffff167fc4c1b9223fcebe5f35b9030d3df655018c40e88d70b8a3c63ed851c5d972210f3385856040516102ae93929190611024565b60405180910390a250505050565b6000806000838060200190518101906102d591906110aa565b604080516060810182528481526020808201859052818301849052336000908152808252929092208151805196995094975092955093919261031d9284929190910190610c31565b5060208281015180516103369260018501920190610c31565b5060408201518051610352916002840191602090910190610c31565b50506040513391507ff889a5cdc62274389379cbfade0f225b1d30b7395177fd6aeaab61662b1c6edf906102ae90869086908690610f94565b8173ffffffffffffffffffffffffffffffffffffffff8116331480159061043d57506040517f24d7806c00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8216906324d7806c90602401602060405180830381865afa158015610417573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043b9190611009565b155b15610474576040517f02bd6bd100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526020818152604090912083516104a892850190610c31565b508273ffffffffffffffffffffffffffffffffffffffff167f36195b44a3184513e02477929207751ea9d67026b917ed74d374a7f9e8c5e4d133846040516104f1929190611128565b60405180910390a2505050565b60006020819052908152604090208054819061051990611157565b80601f016020809104026020016040519081016040528092919081815260200182805461054590611157565b80156105925780601f1061056757610100808354040283529160200191610592565b820191906000526020600020905b81548152906001019060200180831161057557829003601f168201915b5050505050908060010180546105a790611157565b80601f01602080910402602001604051908101604052809291908181526020018280546105d390611157565b80156106205780601f106105f557610100808354040283529160200191610620565b820191906000526020600020905b81548152906001019060200180831161060357829003601f168201915b50505050509080600201805461063590611157565b80601f016020809104026020016040519081016040528092919081815260200182805461066190611157565b80156106ae5780601f10610683576101008083540402835291602001916106ae565b820191906000526020600020905b81548152906001019060200180831161069157829003601f168201915b5050505050905083565b3360008181526020819052604080822081516060818101909352815492949392909190829082906106e890611157565b80601f016020809104026020016040519081016040528092919081815260200182805461071490611157565b80156107615780601f1061073657610100808354040283529160200191610761565b820191906000526020600020905b81548152906001019060200180831161074457829003601f168201915b5050505050815260200160018201805461077a90611157565b80601f01602080910402602001604051908101604052809291908181526020018280546107a690611157565b80156107f35780601f106107c8576101008083540402835291602001916107f3565b820191906000526020600020905b8154815290600101906020018083116107d657829003601f168201915b5050505050815260200160028201805461080c90611157565b80601f016020809104026020016040519081016040528092919081815260200182805461083890611157565b80156108855780601f1061085a57610100808354040283529160200191610885565b820191906000526020600020905b81548152906001019060200180831161086857829003601f168201915b5050505050815250509050600082905060008173ffffffffffffffffffffffffffffffffffffffff16633474a4a66040518163ffffffff1660e01b815260040161016060405180830381865afa1580156108e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090791906111c3565b6101400151905067ffffffffffffffff811415610922575060005b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663df30dba08573ffffffffffffffffffffffffffffffffffffffff166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa1580156109a9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109d1919081019061127c565b8560000151866020015187604001518b876040518763ffffffff1660e01b8152600401610a03969594939291906112b1565b600060405180830381865afa158015610a20573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a48919081019061127c565b9695505050505050565b60408051602080820183526000808352338082529181905292832060010180546060949293929190610a8390611157565b90501115610ad45773ffffffffffffffffffffffffffffffffffffffff8216600090815260208181526040918290209151610ac29260010191016113e5565b60405160208183030381529060405290505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d01fde8c8373ffffffffffffffffffffffffffffffffffffffff166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa158015610b5b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b83919081019061127c565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260208181526040918290209151610bba939291879101611417565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610be59190610fe6565b600060405180830381865afa158015610c02573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c2a919081019061127c565b9250505090565b828054610c3d90611157565b90600052602060002090601f016020900481019282610c5f5760008555610ca5565b82601f10610c7857805160ff1916838001178555610ca5565b82800160010185558215610ca5579182015b82811115610ca5578251825591602001919060010190610c8a565b50610cb1929150610cb5565b5090565b5b80821115610cb15760008155600101610cb6565b803573ffffffffffffffffffffffffffffffffffffffff81168114610cee57600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610160810167ffffffffffffffff81118282101715610d4657610d46610cf3565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610d7557610d75610cf3565b604052919050565b600067ffffffffffffffff821115610d9757610d97610cf3565b50601f01601f191660200190565b6000610db8610db384610d7d565b610d4c565b9050828152838383011115610dcc57600080fd5b828260208301376000602084830101529392505050565b600082601f830112610df457600080fd5b610e0383833560208501610da5565b9392505050565b600080600060608486031215610e1f57600080fd5b610e2884610cca565b9250602084013567ffffffffffffffff80821115610e4557600080fd5b610e5187838801610de3565b93506040860135915080821115610e6757600080fd5b50610e7486828701610de3565b9150509250925092565b600060208284031215610e9057600080fd5b813567ffffffffffffffff811115610ea757600080fd5b8201601f81018413610eb857600080fd5b610ec784823560208401610da5565b949350505050565b60008060408385031215610ee257600080fd5b610eeb83610cca565b9150602083013567ffffffffffffffff811115610f0757600080fd5b610f1385828601610de3565b9150509250929050565b600060208284031215610f2f57600080fd5b610e0382610cca565b60005b83811015610f53578181015183820152602001610f3b565b83811115610f62576000848401525b50505050565b60008151808452610f80816020860160208601610f38565b601f01601f19169290920160200192915050565b606081526000610fa76060830186610f68565b8281036020840152610fb98186610f68565b90508281036040840152610a488185610f68565b600060208284031215610fdf57600080fd5b5035919050565b602081526000610e036020830184610f68565b80518015158114610cee57600080fd5b60006020828403121561101b57600080fd5b610e0382610ff9565b73ffffffffffffffffffffffffffffffffffffffff841681526060602082015260006110536060830185610f68565b8281036040840152610a488185610f68565b600082601f83011261107657600080fd5b8151611084610db382610d7d565b81815284602083860101111561109957600080fd5b610ec7826020830160208701610f38565b6000806000606084860312156110bf57600080fd5b835167ffffffffffffffff808211156110d757600080fd5b6110e387838801611065565b945060208601519150808211156110f957600080fd5b61110587838801611065565b9350604086015191508082111561111b57600080fd5b50610e7486828701611065565b73ffffffffffffffffffffffffffffffffffffffff83168152604060208201526000610ec76040830184610f68565b600181811c9082168061116b57607f821691505b602082108114156111a5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b805167ffffffffffffffff81168114610cee57600080fd5b600061016082840312156111d657600080fd5b6111de610d22565b6111e783610ff9565b81526111f560208401610ff9565b602082015260408301516040820152611210606084016111ab565b6060820152611221608084016111ab565b608082015261123260a084016111ab565b60a082015261124360c084016111ab565b60c082015260e0838101519082015261010080840151908201526101208084015190820152610140928301519281019290925250919050565b60006020828403121561128e57600080fd5b815167ffffffffffffffff8111156112a557600080fd5b610ec784828501611065565b60c0815260006112c460c0830189610f68565b82810360208401526112d68189610f68565b905082810360408401526112ea8188610f68565b905082810360608401526112fe8187610f68565b6080840195909552505060a00152949350505050565b8054600090600181811c908083168061132e57607f831692505b6020808410821415611369577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b81801561137d57600181146113ac576113d9565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008616895284890196506113d9565b60008881526020902060005b868110156113d15781548b8201529085019083016113b8565b505084890196505b50505050505092915050565b7f222c2022696d616765223a20220000000000000000000000000000000000000081526000610e03600d830184611314565b7f7b226e616d65223a20220000000000000000000000000000000000000000000081526000845161144f81600a850160208901610f38565b7f222c20226465736372697074696f6e223a202200000000000000000000000000600a91840191820152611486601d820186611314565b90508351611498818360208801610f38565b7f227d00000000000000000000000000000000000000000000000000000000000091019081526002019594505050505056fea264697066735822122057e9fbe22fed5066680fde4e71823e38b9569e930949c08cce0ff74ae44a8db064736f6c634300080a0033' + +type EditionMetadataRendererConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: EditionMetadataRendererConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class EditionMetadataRenderer__factory extends ContractFactory { + constructor(...args: EditionMetadataRendererConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + _sharedNFTLogic: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + _sharedNFTLogic, + overrides || {} + ) as Promise + } + override getDeployTransaction( + _sharedNFTLogic: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(_sharedNFTLogic, overrides || {}) + } + override attach(address: string): EditionMetadataRenderer { + return super.attach(address) as EditionMetadataRenderer + } + override connect(signer: Signer): EditionMetadataRenderer__factory { + return super.connect(signer) as EditionMetadataRenderer__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): EditionMetadataRendererInterface { + return new utils.Interface(_abi) as EditionMetadataRendererInterface + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): EditionMetadataRenderer { + return new Contract(address, _abi, signerOrProvider) as EditionMetadataRenderer + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/FundsReceiver__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/FundsReceiver__factory.ts new file mode 100644 index 0000000..9ad6de3 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/FundsReceiver__factory.ts @@ -0,0 +1,79 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { FundsReceiver, FundsReceiverInterface } from '../FundsReceiver' + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'source', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'FundsReceived', + type: 'event', + }, + { + stateMutability: 'payable', + type: 'receive', + }, +] + +const _bytecode = + '0x6080604052348015600f57600080fd5b50607a8061001e6000396000f3fe608060405236603f5760405134815233907f8e47b87b0ef542cdfa1659c551d88bad38aa7f452d2bbb349ab7530dfec8be8f9060200160405180910390a2005b600080fdfea26469706673582212202579a15e03779f446e9072cbc6413de27858958ee43e7ed9e58df7d7974a625b64736f6c634300080a0033' + +type FundsReceiverConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: FundsReceiverConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class FundsReceiver__factory extends ContractFactory { + constructor(...args: FundsReceiverConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise + } + override getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}) + } + override attach(address: string): FundsReceiver { + return super.attach(address) as FundsReceiver + } + override connect(signer: Signer): FundsReceiver__factory { + return super.connect(signer) as FundsReceiver__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): FundsReceiverInterface { + return new utils.Interface(_abi) as FundsReceiverInterface + } + static connect(address: string, signerOrProvider: Signer | Provider): FundsReceiver { + return new Contract(address, _abi, signerOrProvider) as FundsReceiver + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/IBeacon__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/IBeacon__factory.ts new file mode 100644 index 0000000..58186c3 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/IBeacon__factory.ts @@ -0,0 +1,33 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers' +import type { Provider } from '@ethersproject/providers' +import type { IBeacon, IBeaconInterface } from '../IBeacon' + +const _abi = [ + { + inputs: [], + name: 'implementation', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, +] + +export class IBeacon__factory { + static readonly abi = _abi + static createInterface(): IBeaconInterface { + return new utils.Interface(_abi) as IBeaconInterface + } + static connect(address: string, signerOrProvider: Signer | Provider): IBeacon { + return new Contract(address, _abi, signerOrProvider) as IBeacon + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/IERC721Drop__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/IERC721Drop__factory.ts new file mode 100644 index 0000000..95b2086 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/IERC721Drop__factory.ts @@ -0,0 +1,467 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers' +import type { Provider } from '@ethersproject/providers' +import type { IERC721Drop, IERC721DropInterface } from '../IERC721Drop' + +const _abi = [ + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + ], + name: 'Access_MissingRoleOrAdmin', + type: 'error', + }, + { + inputs: [], + name: 'Access_OnlyAdmin', + type: 'error', + }, + { + inputs: [], + name: 'Access_WithdrawNotAllowed', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'proposedAddress', + type: 'address', + }, + ], + name: 'Admin_InvalidUpgradeAddress', + type: 'error', + }, + { + inputs: [], + name: 'Admin_UnableToFinalizeNotOpenEdition', + type: 'error', + }, + { + inputs: [], + name: 'Mint_SoldOut', + type: 'error', + }, + { + inputs: [], + name: 'Presale_Inactive', + type: 'error', + }, + { + inputs: [], + name: 'Presale_MerkleNotApproved', + type: 'error', + }, + { + inputs: [], + name: 'Presale_TooManyForAddress', + type: 'error', + }, + { + inputs: [], + name: 'Purchase_TooManyForAddress', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'correctPrice', + type: 'uint256', + }, + ], + name: 'Purchase_WrongPrice', + type: 'error', + }, + { + inputs: [], + name: 'Sale_Inactive', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint16', + name: 'maxRoyaltyBPS', + type: 'uint16', + }, + ], + name: 'Setup_RoyaltyPercentageTooHigh', + type: 'error', + }, + { + inputs: [], + name: 'Withdraw_FundsSendFailure', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'newAddress', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'changedBy', + type: 'address', + }, + ], + name: 'FundsRecipientChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'numberOfMints', + type: 'uint256', + }, + ], + name: 'OpenMintFinalized', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'quantity', + type: 'uint256', + }, + { + indexed: true, + internalType: 'uint256', + name: 'pricePerToken', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'firstPurchasedTokenId', + type: 'uint256', + }, + ], + name: 'Sale', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'changedBy', + type: 'address', + }, + ], + name: 'SalesConfigChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + indexed: false, + internalType: 'contract IMetadataRenderer', + name: 'renderer', + type: 'address', + }, + ], + name: 'UpdatedMetadataRenderer', + type: 'event', + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'quantity', + type: 'uint256', + }, + ], + name: 'adminMint', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address[]', + name: 'to', + type: 'address[]', + }, + ], + name: 'adminMintAirdrop', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'user', + type: 'address', + }, + ], + name: 'isAdmin', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'minter', + type: 'address', + }, + ], + name: 'mintedPerAddress', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'totalMints', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'presaleMints', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'publicMints', + type: 'uint256', + }, + ], + internalType: 'struct IERC721Drop.AddressMintDetails', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'quantity', + type: 'uint256', + }, + ], + name: 'purchase', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'quantity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maxQuantity', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'pricePerToken', + type: 'uint256', + }, + { + internalType: 'bytes32[]', + name: 'merkleProof', + type: 'bytes32[]', + }, + ], + name: 'purchasePresale', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [], + name: 'saleDetails', + outputs: [ + { + components: [ + { + internalType: 'bool', + name: 'publicSaleActive', + type: 'bool', + }, + { + internalType: 'bool', + name: 'presaleActive', + type: 'bool', + }, + { + internalType: 'uint256', + name: 'publicSalePrice', + type: 'uint256', + }, + { + internalType: 'uint64', + name: 'publicSaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'publicSaleEnd', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleEnd', + type: 'uint64', + }, + { + internalType: 'bytes32', + name: 'presaleMerkleRoot', + type: 'bytes32', + }, + { + internalType: 'uint256', + name: 'maxSalePurchasePerAddress', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'totalMinted', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'maxSupply', + type: 'uint256', + }, + ], + internalType: 'struct IERC721Drop.SaleDetails', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'contract IMetadataRenderer', + name: 'newRenderer', + type: 'address', + }, + { + internalType: 'bytes', + name: 'setupRenderer', + type: 'bytes', + }, + ], + name: 'setMetadataRenderer', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, +] + +export class IERC721Drop__factory { + static readonly abi = _abi + static createInterface(): IERC721DropInterface { + return new utils.Interface(_abi) as IERC721DropInterface + } + static connect(address: string, signerOrProvider: Signer | Provider): IERC721Drop { + return new Contract(address, _abi, signerOrProvider) as IERC721Drop + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/IMetadataRenderer__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/IMetadataRenderer__factory.ts new file mode 100644 index 0000000..e1cd12a --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/IMetadataRenderer__factory.ts @@ -0,0 +1,68 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers' +import type { Provider } from '@ethersproject/providers' +import type { IMetadataRenderer, IMetadataRendererInterface } from '../IMetadataRenderer' + +const _abi = [ + { + inputs: [], + name: 'contractURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: 'initData', + type: 'bytes', + }, + ], + name: 'initializeWithData', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + name: 'tokenURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, +] + +export class IMetadataRenderer__factory { + static readonly abi = _abi + static createInterface(): IMetadataRendererInterface { + return new utils.Interface(_abi) as IMetadataRendererInterface + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IMetadataRenderer { + return new Contract(address, _abi, signerOrProvider) as IMetadataRenderer + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/IZoraFeeManager__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/IZoraFeeManager__factory.ts new file mode 100644 index 0000000..9a7d327 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/IZoraFeeManager__factory.ts @@ -0,0 +1,44 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers' +import type { Provider } from '@ethersproject/providers' +import type { IZoraFeeManager, IZoraFeeManagerInterface } from '../IZoraFeeManager' + +const _abi = [ + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'getZORAWithdrawFeesBPS', + outputs: [ + { + internalType: 'address payable', + name: '', + type: 'address', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, +] + +export class IZoraFeeManager__factory { + static readonly abi = _abi + static createInterface(): IZoraFeeManagerInterface { + return new utils.Interface(_abi) as IZoraFeeManagerInterface + } + static connect(address: string, signerOrProvider: Signer | Provider): IZoraFeeManager { + return new Contract(address, _abi, signerOrProvider) as IZoraFeeManager + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/MetadataRenderAdminCheck.t.sol/TestAdmin__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/MetadataRenderAdminCheck.t.sol/TestAdmin__factory.ts new file mode 100644 index 0000000..b59d424 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/MetadataRenderAdminCheck.t.sol/TestAdmin__factory.ts @@ -0,0 +1,83 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { + TestAdmin, + TestAdminInterface, +} from '../../MetadataRenderAdminCheck.t.sol/TestAdmin' + +const _abi = [ + { + inputs: [], + name: 'Access_OnlyAdmin', + type: 'error', + }, + { + anonymous: false, + inputs: [], + name: 'Ok', + type: 'event', + }, + { + inputs: [ + { + internalType: 'address', + name: 'target', + type: 'address', + }, + ], + name: 'updateSomething', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, +] + +const _bytecode = + '0x608060405234801561001057600080fd5b506101f0806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80634ad2de1514610030575b600080fd5b61004361003e36600461015b565b610045565b005b8073ffffffffffffffffffffffffffffffffffffffff811633148015906100f757506040517f24d7806c00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8216906324d7806c90602401602060405180830381865afa1580156100d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100f59190610198565b155b1561012e576040517f02bd6bd100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fe0c639021f79ad31e1aacf49a83e0271d8e62700ff8aefd948df19d1053fbd6590600090a15050565b60006020828403121561016d57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461019157600080fd5b9392505050565b6000602082840312156101aa57600080fd5b8151801515811461019157600080fdfea264697066735822122080145bde5471c356ce7ca9e1dae60fbb59427a6d660f3627417c7e1f5124378364736f6c634300080a0033' + +type TestAdminConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: TestAdminConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class TestAdmin__factory extends ContractFactory { + constructor(...args: TestAdminConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise + } + override getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}) + } + override attach(address: string): TestAdmin { + return super.attach(address) as TestAdmin + } + override connect(signer: Signer): TestAdmin__factory { + return super.connect(signer) as TestAdmin__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): TestAdminInterface { + return new utils.Interface(_abi) as TestAdminInterface + } + static connect(address: string, signerOrProvider: Signer | Provider): TestAdmin { + return new Contract(address, _abi, signerOrProvider) as TestAdmin + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/MetadataRenderAdminCheck.t.sol/index.ts b/packages/zora-drops-utils/src/constants/typechain/factories/MetadataRenderAdminCheck.t.sol/index.ts new file mode 100644 index 0000000..dfad90b --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/MetadataRenderAdminCheck.t.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { TestAdmin__factory } from './TestAdmin__factory' diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/MetadataRenderAdminCheck__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/MetadataRenderAdminCheck__factory.ts new file mode 100644 index 0000000..5c857bd --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/MetadataRenderAdminCheck__factory.ts @@ -0,0 +1,67 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { + MetadataRenderAdminCheck, + MetadataRenderAdminCheckInterface, +} from '../MetadataRenderAdminCheck' + +const _abi = [ + { + inputs: [], + name: 'Access_OnlyAdmin', + type: 'error', + }, +] + +const _bytecode = + '0x6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea264697066735822122025f4fde1b6fe877911988e6aa7ef03a3db27a9296f5d88fc2240a24ceef1fe6164736f6c634300080a0033' + +type MetadataRenderAdminCheckConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: MetadataRenderAdminCheckConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class MetadataRenderAdminCheck__factory extends ContractFactory { + constructor(...args: MetadataRenderAdminCheckConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise + } + override getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}) + } + override attach(address: string): MetadataRenderAdminCheck { + return super.attach(address) as MetadataRenderAdminCheck + } + override connect(signer: Signer): MetadataRenderAdminCheck__factory { + return super.connect(signer) as MetadataRenderAdminCheck__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): MetadataRenderAdminCheckInterface { + return new utils.Interface(_abi) as MetadataRenderAdminCheckInterface + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): MetadataRenderAdminCheck { + return new Contract(address, _abi, signerOrProvider) as MetadataRenderAdminCheck + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/MockMetadataRenderer__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/MockMetadataRenderer__factory.ts new file mode 100644 index 0000000..46d42f0 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/MockMetadataRenderer__factory.ts @@ -0,0 +1,107 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { + MockMetadataRenderer, + MockMetadataRendererInterface, +} from '../MockMetadataRenderer' + +const _abi = [ + { + inputs: [], + name: 'contractURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: 'initData', + type: 'bytes', + }, + ], + name: 'initializeWithData', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + name: 'tokenURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, +] + +const _bytecode = + '0x608060405234801561001057600080fd5b50610320806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063856a7ffa14610046578063c87b56dd1461005b578063e8a3d485146100b7575b600080fd5b61005961005436600461018f565b6100f0565b005b6100a161006936600461025e565b5060408051808201909152600481527f44454d4f00000000000000000000000000000000000000000000000000000000602082015290565b6040516100ae9190610277565b60405180910390f35b60408051808201909152600481527f44454d4f0000000000000000000000000000000000000000000000000000000060208201526100a1565b80511561015d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f6e6f74207a65726f000000000000000000000000000000000000000000000000604482015260640160405180910390fd5b50565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156101a157600080fd5b813567ffffffffffffffff808211156101b957600080fd5b818401915084601f8301126101cd57600080fd5b8135818111156101df576101df610160565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561022557610225610160565b8160405282815287602084870101111561023e57600080fd5b826020860160208301376000928101602001929092525095945050505050565b60006020828403121561027057600080fd5b5035919050565b600060208083528351808285015260005b818110156102a457858101830151858201604001528201610288565b818111156102b6576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01692909201604001939250505056fea264697066735822122027fa65f00ca6155ba402ed60efb4fa7116cf9b3ecff27a4b50305ea55a86e25b64736f6c634300080a0033' + +type MockMetadataRendererConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: MockMetadataRendererConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class MockMetadataRenderer__factory extends ContractFactory { + constructor(...args: MockMetadataRendererConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise + } + override getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}) + } + override attach(address: string): MockMetadataRenderer { + return super.attach(address) as MockMetadataRenderer + } + override connect(signer: Signer): MockMetadataRenderer__factory { + return super.connect(signer) as MockMetadataRenderer__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): MockMetadataRendererInterface { + return new utils.Interface(_abi) as MockMetadataRendererInterface + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): MockMetadataRenderer { + return new Contract(address, _abi, signerOrProvider) as MockMetadataRenderer + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/OwnableSkeleton__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/OwnableSkeleton__factory.ts new file mode 100644 index 0000000..d30de97 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/OwnableSkeleton__factory.ts @@ -0,0 +1,88 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { OwnableSkeleton, OwnableSkeletonInterface } from '../OwnableSkeleton' + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'OwnershipTransferred', + type: 'event', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, +] + +const _bytecode = + '0x6080604052348015600f57600080fd5b50608f8061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80638da5cb5b14602d575b600080fd5b6000546040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f3fea264697066735822122073c3912717ff9c03d7808a394cb3b77448427c61c81d541a023efa27a1598bce64736f6c634300080a0033' + +type OwnableSkeletonConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: OwnableSkeletonConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class OwnableSkeleton__factory extends ContractFactory { + constructor(...args: OwnableSkeletonConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise + } + override getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}) + } + override attach(address: string): OwnableSkeleton { + return super.attach(address) as OwnableSkeleton + } + override connect(signer: Signer): OwnableSkeleton__factory { + return super.connect(signer) as OwnableSkeleton__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): OwnableSkeletonInterface { + return new utils.Interface(_abi) as OwnableSkeletonInterface + } + static connect(address: string, signerOrProvider: Signer | Provider): OwnableSkeleton { + return new Contract(address, _abi, signerOrProvider) as OwnableSkeleton + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/Proxy__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/Proxy__factory.ts new file mode 100644 index 0000000..e079348 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/Proxy__factory.ts @@ -0,0 +1,28 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers' +import type { Provider } from '@ethersproject/providers' +import type { Proxy, ProxyInterface } from '../Proxy' + +const _abi = [ + { + stateMutability: 'payable', + type: 'fallback', + }, + { + stateMutability: 'payable', + type: 'receive', + }, +] + +export class Proxy__factory { + static readonly abi = _abi + static createInterface(): ProxyInterface { + return new utils.Interface(_abi) as ProxyInterface + } + static connect(address: string, signerOrProvider: Signer | Provider): Proxy { + return new Contract(address, _abi, signerOrProvider) as Proxy + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/SharedNFTLogic__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/SharedNFTLogic__factory.ts new file mode 100644 index 0000000..52662ed --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/SharedNFTLogic__factory.ts @@ -0,0 +1,225 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { SharedNFTLogic, SharedNFTLogicInterface } from '../SharedNFTLogic' + +const _abi = [ + { + inputs: [ + { + internalType: 'bytes', + name: 'unencoded', + type: 'bytes', + }, + ], + name: 'base64Encode', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: 'name', + type: 'string', + }, + { + internalType: 'string', + name: 'description', + type: 'string', + }, + { + internalType: 'string', + name: 'imageUrl', + type: 'string', + }, + { + internalType: 'string', + name: 'animationUrl', + type: 'string', + }, + { + internalType: 'uint256', + name: 'tokenOfEdition', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'editionSize', + type: 'uint256', + }, + ], + name: 'createMetadataEdition', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: 'name', + type: 'string', + }, + { + internalType: 'string', + name: 'description', + type: 'string', + }, + { + internalType: 'string', + name: 'mediaData', + type: 'string', + }, + { + internalType: 'uint256', + name: 'tokenOfEdition', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'editionSize', + type: 'uint256', + }, + ], + name: 'createMetadataJSON', + outputs: [ + { + internalType: 'bytes', + name: '', + type: 'bytes', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: 'json', + type: 'bytes', + }, + ], + name: 'encodeMetadataJSON', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'numberToString', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: 'imageUrl', + type: 'string', + }, + { + internalType: 'string', + name: 'animationUrl', + type: 'string', + }, + { + internalType: 'uint256', + name: 'tokenOfEdition', + type: 'uint256', + }, + ], + name: 'tokenMediaData', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'pure', + type: 'function', + }, +] + +const _bytecode = + '0x608060405234801561001057600080fd5b50610f5d806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063d5fb1b1911610050578063d5fb1b19146100c6578063df30dba0146100d9578063eb111ab6146100ec57600080fd5b8063170dc6601461007757806358464f30146100a0578063d01fde8c146100b3575b600080fd5b61008a610085366004610547565b6100ff565b60405161009791906105da565b60405180910390f35b61008a6100ae3660046106d0565b610110565b61008a6100c136600461076a565b61018c565b61008a6100d436600461076a565b6101bd565b61008a6100e73660046107b3565b6101c8565b61008a6100fa366004610872565b610200565b606061010a826102b9565b92915050565b606080821561014457610122836100ff565b60405160200161013291906108fb565b60405160208183030381529060405290505b8661014e856100ff565b82888861015a896100ff565b8c6040516020016101719796959493929190610940565b60405160208183030381529060405291505095945050505050565b6060610197826101bd565b6040516020016101a79190610aea565b6040516020818303038152906040529050919050565b606061010a826103f3565b606060006101d7868686610200565b905060006101e88989848888610110565b90506101f38161018c565b9998505050505050505050565b825182516060911580159115159082906102175750805b1561025b5785610226856100ff565b86610230876100ff565b6040516020016102439493929190610b2f565b604051602081830303815290604052925050506102b2565b811561027c578561026b856100ff565b604051602001610243929190610c37565b801561029d578461028c856100ff565b604051602001610243929190610ce2565b60405180602001604052806000815250925050505b9392505050565b6060816102f957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610323578061030d81610dbc565b915061031c9050600a83610e24565b91506102fd565b60008167ffffffffffffffff81111561033e5761033e6105ed565b6040519080825280601f01601f191660200182016040528015610368576020820181803683370190505b5090505b84156103eb5761037d600183610e38565b915061038a600a86610e4f565b610395906030610e63565b60f81b8183815181106103aa576103aa610e7b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506103e4600a86610e24565b945061036c565b949350505050565b606081516000141561041357505060408051602081019091526000815290565b6000604051806060016040528060408152602001610ee860409139905060006003845160026104429190610e63565b61044c9190610e24565b610457906004610eaa565b67ffffffffffffffff81111561046f5761046f6105ed565b6040519080825280601f01601f191660200182016040528015610499576020820181803683370190505b509050600182016020820185865187015b80821015610505576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f81168501518453506001830192506104aa565b505060038651066001811461052157600281146105345761053c565b603d6001830353603d600283035361053c565b603d60018303535b509195945050505050565b60006020828403121561055957600080fd5b5035919050565b60005b8381101561057b578181015183820152602001610563565b8381111561058a576000848401525b50505050565b600081518084526105a8816020860160208601610560565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006102b26020830184610590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff80841115610637576106376105ed565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561067d5761067d6105ed565b8160405280935085815286868601111561069657600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126106c157600080fd5b6102b28383356020850161061c565b600080600080600060a086880312156106e857600080fd5b853567ffffffffffffffff8082111561070057600080fd5b61070c89838a016106b0565b9650602088013591508082111561072257600080fd5b61072e89838a016106b0565b9550604088013591508082111561074457600080fd5b50610751888289016106b0565b9598949750949560608101359550608001359392505050565b60006020828403121561077c57600080fd5b813567ffffffffffffffff81111561079357600080fd5b8201601f810184136107a457600080fd5b6103eb8482356020840161061c565b60008060008060008060c087890312156107cc57600080fd5b863567ffffffffffffffff808211156107e457600080fd5b6107f08a838b016106b0565b9750602089013591508082111561080657600080fd5b6108128a838b016106b0565b9650604089013591508082111561082857600080fd5b6108348a838b016106b0565b9550606089013591508082111561084a57600080fd5b5061085789828a016106b0565b9350506080870135915060a087013590509295509295509295565b60008060006060848603121561088757600080fd5b833567ffffffffffffffff8082111561089f57600080fd5b6108ab878388016106b0565b945060208601359150808211156108c157600080fd5b506108ce868287016106b0565b925050604084013590509250925092565b600081516108f1818560208601610560565b9290920192915050565b7f2f00000000000000000000000000000000000000000000000000000000000000815260008251610933816001850160208701610560565b9190910160010192915050565b7f7b226e616d65223a20220000000000000000000000000000000000000000000081526000885161097881600a850160208d01610560565b7f2000000000000000000000000000000000000000000000000000000000000000600a9184019182015288516109b581600b840160208d01610560565b88519101906109cb81600b840160208c01610560565b8082019150507f222c20220000000000000000000000000000000000000000000000000000000080600b8301527f6465736372697074696f6e223a20220000000000000000000000000000000000600f8301528751610a3181601e850160208c01610560565b601e920191820152610adc610ab3610aad610a84610a7e610a55602287018c6108df565b7f70726f70657274696573223a207b226e756d626572223a200000000000000000815260180190565b896108df565b7f2c20226e616d65223a20220000000000000000000000000000000000000000008152600b0190565b866108df565b7f227d7d0000000000000000000000000000000000000000000000000000000000815260030190565b9a9950505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251610b2281601d850160208701610560565b91909101601d0192915050565b7f696d616765223a20220000000000000000000000000000000000000000000000815260008551610b67816009850160208a01610560565b80830190507f3f69643d000000000000000000000000000000000000000000000000000000008060098301528651610ba681600d850160208b01610560565b7f222c2022616e696d6174696f6e5f75726c223a20220000000000000000000000600d93909101928301528551610be4816022850160208a01610560565b60229201918201528351610bff816026840160208801610560565b7f222c20220000000000000000000000000000000000000000000000000000000060269290910191820152602a019695505050505050565b7f696d616765223a20220000000000000000000000000000000000000000000000815260008351610c6f816009850160208801610560565b7f3f69643d000000000000000000000000000000000000000000000000000000006009918401918201528351610cac81600d840160208801610560565b7f222c202200000000000000000000000000000000000000000000000000000000600d9290910191820152601101949350505050565b7f616e696d6174696f6e5f75726c223a2022000000000000000000000000000000815260008351610d1a816011850160208801610560565b7f3f69643d000000000000000000000000000000000000000000000000000000006011918401918201528351610d57816015840160208801610560565b7f222c20220000000000000000000000000000000000000000000000000000000060159290910191820152601901949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610dee57610dee610d8d565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082610e3357610e33610df5565b500490565b600082821015610e4a57610e4a610d8d565b500390565b600082610e5e57610e5e610df5565b500690565b60008219821115610e7657610e76610d8d565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610ee257610ee2610d8d565b50029056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220708994fd9166a9e0f11a5613cff6c7ba2c3b612fea17bbd3924d0e1013e674d464736f6c634300080a0033' + +type SharedNFTLogicConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: SharedNFTLogicConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class SharedNFTLogic__factory extends ContractFactory { + constructor(...args: SharedNFTLogicConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise + } + override getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}) + } + override attach(address: string): SharedNFTLogic { + return super.attach(address) as SharedNFTLogic + } + override connect(signer: Signer): SharedNFTLogic__factory { + return super.connect(signer) as SharedNFTLogic__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): SharedNFTLogicInterface { + return new utils.Interface(_abi) as SharedNFTLogicInterface + } + static connect(address: string, signerOrProvider: Signer | Provider): SharedNFTLogic { + return new Contract(address, _abi, signerOrProvider) as SharedNFTLogic + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/Version__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/Version__factory.ts new file mode 100644 index 0000000..634db7f --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/Version__factory.ts @@ -0,0 +1,82 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, BigNumberish, Overrides } from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { Version, VersionInterface } from '../Version' + +const _abi = [ + { + inputs: [ + { + internalType: 'uint32', + name: 'version', + type: 'uint32', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + inputs: [], + name: 'contractVersion', + outputs: [ + { + internalType: 'uint32', + name: '', + type: 'uint32', + }, + ], + stateMutability: 'view', + type: 'function', + }, +] + +const _bytecode = + '0x60a060405234801561001057600080fd5b5060405161011f38038061011f83398101604081905261002f9161003d565b63ffffffff1660805261006a565b60006020828403121561004f57600080fd5b815163ffffffff8116811461006357600080fd5b9392505050565b608051609d6100826000396000602f0152609d6000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a0a8e46014602d575b600080fd5b7f000000000000000000000000000000000000000000000000000000000000000060405163ffffffff909116815260200160405180910390f3fea26469706673582212202c713eea13482f9540f7cef9bc2ccca59874d86f66fe622e47b7a0802e6d55a964736f6c634300080a0033' + +type VersionConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: VersionConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class Version__factory extends ContractFactory { + constructor(...args: VersionConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + version: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(version, overrides || {}) as Promise + } + override getDeployTransaction( + version: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(version, overrides || {}) + } + override attach(address: string): Version { + return super.attach(address) as Version + } + override connect(signer: Signer): Version__factory { + return super.connect(signer) as Version__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): VersionInterface { + return new utils.Interface(_abi) as VersionInterface + } + static connect(address: string, signerOrProvider: Signer | Provider): Version { + return new Contract(address, _abi, signerOrProvider) as Version + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/ZoraFeeManager__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/ZoraFeeManager__factory.ts new file mode 100644 index 0000000..e3df93e --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/ZoraFeeManager__factory.ts @@ -0,0 +1,193 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, BigNumberish, Overrides } from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { ZoraFeeManager, ZoraFeeManagerInterface } from '../ZoraFeeManager' + +const _abi = [ + { + inputs: [ + { + internalType: 'uint256', + name: '_defaultFeeBPS', + type: 'uint256', + }, + { + internalType: 'address', + name: 'feeManagerAdmin', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: '', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + name: 'FeeOverrideSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'OwnershipTransferred', + type: 'event', + }, + { + inputs: [ + { + internalType: 'address', + name: 'mediaContract', + type: 'address', + }, + ], + name: 'getZORAWithdrawFeesBPS', + outputs: [ + { + internalType: 'address payable', + name: '', + type: 'address', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'mediaContract', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amountBPS', + type: 'uint256', + }, + ], + name: 'setFeeOverride', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, +] + +const _bytecode = + '0x60a060405234801561001057600080fd5b506040516106e33803806106e383398101604081905261002f9161009d565b6100383361004d565b60808290526100468161004d565b50506100da565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156100b057600080fd5b825160208401519092506001600160a01b03811681146100cf57600080fd5b809150509250929050565b6080516105ee6100f560003960006102ee01526105ee6000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c8063715018a611610050578063715018a6146100c55780638da5cb5b146100cd578063f2fde38b146100f557600080fd5b80632b933f811461006c5780632e0c164914610081575b600080fd5b61007f61007a36600461056c565b610108565b005b61009461008f366004610596565b610273565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152015b60405180910390f35b61007f610311565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bc565b61007f610103366004610596565b61039e565b60005473ffffffffffffffffffffffffffffffffffffffff16331461018e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6107d1811061021f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f46656520746f6f206869676820286e6f742067726561746572207468616e203260448201527f30252900000000000000000000000000000000000000000000000000000000006064820152608401610185565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260016020526040808220849055518392917fcadc101c03be6a205eb345867605c4824dd58c1660c7c1b6ce4a92ad024c0a8b91a35050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600160205260408120548190156102d05750506000805473ffffffffffffffffffffffffffffffffffffffff92831682526001602052604090912054911691565b505060005473ffffffffffffffffffffffffffffffffffffffff16917f00000000000000000000000000000000000000000000000000000000000000009150565b60005473ffffffffffffffffffffffffffffffffffffffff163314610392576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610185565b61039c60006104ce565b565b60005473ffffffffffffffffffffffffffffffffffffffff16331461041f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610185565b73ffffffffffffffffffffffffffffffffffffffff81166104c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610185565b6104cb816104ce565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461056757600080fd5b919050565b6000806040838503121561057f57600080fd5b61058883610543565b946020939093013593505050565b6000602082840312156105a857600080fd5b6105b182610543565b939250505056fea264697066735822122021cc0fe58e241a8095ec34c2a9e4ef7a4059fcb017ea1e7209aa1fa6b06b426364736f6c634300080a0033' + +type ZoraFeeManagerConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: ZoraFeeManagerConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class ZoraFeeManager__factory extends ContractFactory { + constructor(...args: ZoraFeeManagerConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + _defaultFeeBPS: BigNumberish, + feeManagerAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + _defaultFeeBPS, + feeManagerAdmin, + overrides || {} + ) as Promise + } + override getDeployTransaction( + _defaultFeeBPS: BigNumberish, + feeManagerAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(_defaultFeeBPS, feeManagerAdmin, overrides || {}) + } + override attach(address: string): ZoraFeeManager { + return super.attach(address) as ZoraFeeManager + } + override connect(signer: Signer): ZoraFeeManager__factory { + return super.connect(signer) as ZoraFeeManager__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): ZoraFeeManagerInterface { + return new utils.Interface(_abi) as ZoraFeeManagerInterface + } + static connect(address: string, signerOrProvider: Signer | Provider): ZoraFeeManager { + return new Contract(address, _abi, signerOrProvider) as ZoraFeeManager + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/ZoraNFTCreatorProxy__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/ZoraNFTCreatorProxy__factory.ts new file mode 100644 index 0000000..77f1b04 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/ZoraNFTCreatorProxy__factory.ts @@ -0,0 +1,142 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Signer, + utils, + Contract, + ContractFactory, + PayableOverrides, + BytesLike, +} from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { + ZoraNFTCreatorProxy, + ZoraNFTCreatorProxyInterface, +} from '../ZoraNFTCreatorProxy' + +const _abi = [ + { + inputs: [ + { + internalType: 'address', + name: '_logic', + type: 'address', + }, + { + internalType: 'bytes', + name: '_data', + type: 'bytes', + }, + ], + stateMutability: 'payable', + type: 'constructor', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'previousAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + ], + name: 'AdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'beacon', + type: 'address', + }, + ], + name: 'BeaconUpgraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'implementation', + type: 'address', + }, + ], + name: 'Upgraded', + type: 'event', + }, + { + stateMutability: 'payable', + type: 'fallback', + }, + { + stateMutability: 'payable', + type: 'receive', + }, +] + +const _bytecode = + '0x60806040526040516108523803806108528339810160408190526100229161034d565b818161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd61041b565b60008051602061080b8339815191521461006b5761006b610440565b61007782826000610080565b505050506104a5565b610089836100b6565b6000825111806100965750805b156100b1576100af83836100f660201b6100291760201c565b505b505050565b6100bf81610122565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061011b838360405180606001604052806027815260200161082b602791396101e2565b9392505050565b610135816102c060201b6100551760201c565b61019c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101c160008051602061080b83398151915260001b6102cf60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b61024a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610193565b600080856001600160a01b0316856040516102659190610456565b600060405180830381855af49150503d80600081146102a0576040519150601f19603f3d011682016040523d82523d6000602084013e6102a5565b606091505b5090925090506102b68282866102d2565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102e157508161011b565b8251156102f15782518084602001fd5b8160405162461bcd60e51b81526004016101939190610472565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561033c578181015183820152602001610324565b838111156100af5750506000910152565b6000806040838503121561036057600080fd5b82516001600160a01b038116811461037757600080fd5b60208401519092506001600160401b038082111561039457600080fd5b818501915085601f8301126103a857600080fd5b8151818111156103ba576103ba61030b565b604051601f8201601f19908116603f011681019083821181831017156103e2576103e261030b565b816040528281528860208487010111156103fb57600080fd5b61040c836020830160208801610321565b80955050505050509250929050565b60008282101561043b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b60008251610468818460208701610321565b9190910192915050565b6020815260008251806020840152610491816040850160208701610321565b601f01601f19169190910160400192915050565b610357806104b46000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212208ccecd99caaa5d4b77c37364204014a1284adffc802627f4ceb8d320523fe37164736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564' + +type ZoraNFTCreatorProxyConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: ZoraNFTCreatorProxyConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class ZoraNFTCreatorProxy__factory extends ContractFactory { + constructor(...args: ZoraNFTCreatorProxyConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise { + return super.deploy(_logic, _data, overrides || {}) as Promise + } + override getDeployTransaction( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(_logic, _data, overrides || {}) + } + override attach(address: string): ZoraNFTCreatorProxy { + return super.attach(address) as ZoraNFTCreatorProxy + } + override connect(signer: Signer): ZoraNFTCreatorProxy__factory { + return super.connect(signer) as ZoraNFTCreatorProxy__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): ZoraNFTCreatorProxyInterface { + return new utils.Interface(_abi) as ZoraNFTCreatorProxyInterface + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZoraNFTCreatorProxy { + return new Contract(address, _abi, signerOrProvider) as ZoraNFTCreatorProxy + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/ZoraNFTCreatorV1__factory.ts b/packages/zora-drops-utils/src/constants/typechain/factories/ZoraNFTCreatorV1__factory.ts new file mode 100644 index 0000000..d08a006 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/ZoraNFTCreatorV1__factory.ts @@ -0,0 +1,611 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from 'ethers' +import type { Provider, TransactionRequest } from '@ethersproject/providers' +import type { ZoraNFTCreatorV1, ZoraNFTCreatorV1Interface } from '../ZoraNFTCreatorV1' + +const _abi = [ + { + inputs: [ + { + internalType: 'address', + name: '_implementation', + type: 'address', + }, + { + internalType: 'contract EditionMetadataRenderer', + name: '_editionMetadataRenderer', + type: 'address', + }, + { + internalType: 'contract DropMetadataRenderer', + name: '_dropMetadataRenderer', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'previousAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + ], + name: 'AdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'beacon', + type: 'address', + }, + ], + name: 'BeaconUpgraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'creator', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'editionContractAddress', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'editionSize', + type: 'uint256', + }, + ], + name: 'CreatedDrop', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'OwnershipTransferred', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'implementation', + type: 'address', + }, + ], + name: 'Upgraded', + type: 'event', + }, + { + inputs: [], + name: 'contractVersion', + outputs: [ + { + internalType: 'uint32', + name: '', + type: 'uint32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: 'name', + type: 'string', + }, + { + internalType: 'string', + name: 'symbol', + type: 'string', + }, + { + internalType: 'address', + name: 'defaultAdmin', + type: 'address', + }, + { + internalType: 'uint64', + name: 'editionSize', + type: 'uint64', + }, + { + internalType: 'uint16', + name: 'royaltyBPS', + type: 'uint16', + }, + { + internalType: 'address payable', + name: 'fundsRecipient', + type: 'address', + }, + { + components: [ + { + internalType: 'uint104', + name: 'publicSalePrice', + type: 'uint104', + }, + { + internalType: 'uint32', + name: 'maxSalePurchasePerAddress', + type: 'uint32', + }, + { + internalType: 'uint64', + name: 'publicSaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'publicSaleEnd', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleEnd', + type: 'uint64', + }, + { + internalType: 'bytes32', + name: 'presaleMerkleRoot', + type: 'bytes32', + }, + ], + internalType: 'struct IERC721Drop.SalesConfiguration', + name: 'saleConfig', + type: 'tuple', + }, + { + internalType: 'string', + name: 'metadataURIBase', + type: 'string', + }, + { + internalType: 'string', + name: 'metadataContractURI', + type: 'string', + }, + ], + name: 'createDrop', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: 'name', + type: 'string', + }, + { + internalType: 'string', + name: 'symbol', + type: 'string', + }, + { + internalType: 'uint64', + name: 'editionSize', + type: 'uint64', + }, + { + internalType: 'uint16', + name: 'royaltyBPS', + type: 'uint16', + }, + { + internalType: 'address payable', + name: 'fundsRecipient', + type: 'address', + }, + { + internalType: 'address', + name: 'defaultAdmin', + type: 'address', + }, + { + components: [ + { + internalType: 'uint104', + name: 'publicSalePrice', + type: 'uint104', + }, + { + internalType: 'uint32', + name: 'maxSalePurchasePerAddress', + type: 'uint32', + }, + { + internalType: 'uint64', + name: 'publicSaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'publicSaleEnd', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleEnd', + type: 'uint64', + }, + { + internalType: 'bytes32', + name: 'presaleMerkleRoot', + type: 'bytes32', + }, + ], + internalType: 'struct IERC721Drop.SalesConfiguration', + name: 'saleConfig', + type: 'tuple', + }, + { + internalType: 'string', + name: 'description', + type: 'string', + }, + { + internalType: 'string', + name: 'animationURI', + type: 'string', + }, + { + internalType: 'string', + name: 'imageURI', + type: 'string', + }, + ], + name: 'createEdition', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'dropMetadataRenderer', + outputs: [ + { + internalType: 'contract DropMetadataRenderer', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'editionMetadataRenderer', + outputs: [ + { + internalType: 'contract EditionMetadataRenderer', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'implementation', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'proxiableUUID', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: 'name', + type: 'string', + }, + { + internalType: 'string', + name: 'symbol', + type: 'string', + }, + { + internalType: 'address', + name: 'defaultAdmin', + type: 'address', + }, + { + internalType: 'uint64', + name: 'editionSize', + type: 'uint64', + }, + { + internalType: 'uint16', + name: 'royaltyBPS', + type: 'uint16', + }, + { + internalType: 'address payable', + name: 'fundsRecipient', + type: 'address', + }, + { + components: [ + { + internalType: 'uint104', + name: 'publicSalePrice', + type: 'uint104', + }, + { + internalType: 'uint32', + name: 'maxSalePurchasePerAddress', + type: 'uint32', + }, + { + internalType: 'uint64', + name: 'publicSaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'publicSaleEnd', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleStart', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'presaleEnd', + type: 'uint64', + }, + { + internalType: 'bytes32', + name: 'presaleMerkleRoot', + type: 'bytes32', + }, + ], + internalType: 'struct IERC721Drop.SalesConfiguration', + name: 'saleConfig', + type: 'tuple', + }, + { + internalType: 'contract IMetadataRenderer', + name: 'metadataRenderer', + type: 'address', + }, + { + internalType: 'bytes', + name: 'metadataInitializer', + type: 'bytes', + }, + ], + name: 'setupDropsContract', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + ], + name: 'upgradeTo', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'upgradeToAndCall', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, +] + +const _bytecode = + '0x610120604052306080523480156200001657600080fd5b506040516200258f3803806200258f83398101604081905262000039916200017e565b600260a05260408051808201909152601381527243616e6e6f742062652030206164647265737360681b60208201526001600160a01b0384166200009b5760405162461bcd60e51b8152600401620000929190620001d2565b60405180910390fd5b5060408051808201909152601381527243616e6e6f742062652030206164647265737360681b60208201526001600160a01b038316620000f05760405162461bcd60e51b8152600401620000929190620001d2565b5060408051808201909152601381527243616e6e6f742062652030206164647265737360681b60208201526001600160a01b038216620001455760405162461bcd60e51b8152600401620000929190620001d2565b506001600160a01b0392831660c05290821660e05216610100526200022a565b6001600160a01b03811681146200017b57600080fd5b50565b6000806000606084860312156200019457600080fd5b8351620001a18162000165565b6020850151909350620001b48162000165565b6040850151909250620001c78162000165565b809150509250925092565b600060208083528351808285015260005b818110156200020157858101830151858201604001528201620001e3565b8181111562000214576000604083870101525b50601f01601f1916929092016040019392505050565b60805160a05160c05160e051610100516122ef620002a0600039600081816101960152610998015260008181610240015261066301526000818161020a0152610344015260006102ef01526000818161048b01528181610527015281816106a40152818161073c015261083e01526122ef6000f3fe608060405260043610620000ef5760003560e01c8063686ce43511620000895780638129fc1c11620000605780638129fc1c146200029f5780638da5cb5b14620002b7578063a0a8e46014620002d7578063f2fde38b146200031a57600080fd5b8063686ce435146200022c578063715018a6146200026257806371525d8c146200027a57600080fd5b80634abde72911620000ca5780634abde72914620001825780634f1ef28614620001b857806352d1902d14620001cf5780635c60da1b14620001f657600080fd5b80630d743c7614620000f45780633659cfe614620001365780633857fb13146200015d575b600080fd5b3480156200010157600080fd5b5062000119620001133660046200148f565b6200033f565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156200014357600080fd5b506200015b6200015536600462001594565b62000480565b005b3480156200016a57600080fd5b50620001196200017c366004620015b4565b6200062b565b3480156200018f57600080fd5b50620001197f000000000000000000000000000000000000000000000000000000000000000081565b6200015b620001c9366004620016f7565b62000699565b348015620001dc57600080fd5b50620001e762000831565b6040519081526020016200012d565b3480156200020357600080fd5b50620001197f000000000000000000000000000000000000000000000000000000000000000081565b3480156200023957600080fd5b50620001197f000000000000000000000000000000000000000000000000000000000000000081565b3480156200026f57600080fd5b506200015b620008f8565b3480156200028757600080fd5b5062000119620002993660046200174d565b62000962565b348015620002ac57600080fd5b506200015b620009cd565b348015620002c457600080fd5b506033546001600160a01b031662000119565b348015620002e457600080fd5b5060405163ffffffff7f00000000000000000000000000000000000000000000000000000000000000001681526020016200012d565b3480156200032757600080fd5b506200015b6200033936600462001594565b62000ae8565b6000807f000000000000000000000000000000000000000000000000000000000000000060405162000371906200127a565b6001600160a01b039091168152604060208201819052600090820152606001604051809103906000f080158015620003ad573d6000803e3d6000fd5b5090506000819050806001600160a01b031663faff3c708d8d8d8b8e8e8d8d8d6040518a63ffffffff1660e01b8152600401620003f3999897969594939291906200188d565b600060405180830381600087803b1580156200040e57600080fd5b505af115801562000423573d6000803e3d6000fd5b505060405167ffffffffffffffff8c1681526001600160a01b03841692503391507fad59ebba8bfb06ba01a615a611467ca3bef86a275bd5e9704d3b295112550ba59060200160405180910390a39b9a5050505050505050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620005255760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c000000000000000000000000000000000000000060648201526084015b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316620005817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614620005ff5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f7879000000000000000000000000000000000000000060648201526084016200051c565b6200060a8162000bcd565b60408051600080825260208201909252620006289183919062000c29565b50565b600080848385604051602001620006459392919062001981565b6040516020818303038152906040529050620006898c8c898d8d8d8c7f0000000000000000000000000000000000000000000000000000000000000000896200033f565b9c9b505050505050505050505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156200073a5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c000000000000000000000000000000000000000060648201526084016200051c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316620007967f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614620008145760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f7879000000000000000000000000000000000000000060648201526084016200051c565b6200081f8262000bcd565b6200082d8282600162000c29565b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614620008d35760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016200051c565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b6033546001600160a01b03163314620009545760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200051c565b62000960600062000dda565b565b60008083836040516020016200097a929190620019ca565b6040516020818303038152906040529050620009be8b8b8b8b8b8b8b7f0000000000000000000000000000000000000000000000000000000000000000896200033f565b9b9a5050505050505050505050565b600054610100900460ff16620009ea5760005460ff1615620009ee565b303b155b62000a625760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016200051c565b600054610100900460ff1615801562000aa257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b62000aac62000e44565b62000ab662000ecd565b80156200062857600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b6033546001600160a01b0316331462000b445760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200051c565b6001600160a01b03811662000bc25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016200051c565b620006288162000dda565b6033546001600160a01b03163314620006285760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200051c565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161562000c645762000c5f8362000f4c565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801562000cc1575060408051601f3d908101601f1916820190925262000cbe91810190620019f3565b60015b62000d355760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f74205555505300000000000000000000000000000000000060648201526084016200051c565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc811462000dcc5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c6555554944000000000000000000000000000000000000000000000060648201526084016200051c565b5062000c5f83838362001024565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1662000ec35760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016200051c565b6200096062001055565b600054610100900460ff16620009605760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016200051c565b6001600160a01b0381163b62000fcb5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016200051c565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6200102f83620010df565b6000825111806200103d5750805b1562000c5f576200104f838362001121565b50505050565b600054610100900460ff16620010d45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016200051c565b620009603362000dda565b620010ea8162000f4c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b620011a25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016200051c565b600080846001600160a01b031684604051620011bf919062001a0d565b600060405180830381855af49150503d8060008114620011fc576040519150601f19603f3d011682016040523d82523d6000602084013e62001201565b606091505b50915091506200122c8282604051806060016040528060278152602001620022936027913962001235565b95945050505050565b606083156200124657508162001273565b825115620012575782518084602001fd5b8160405162461bcd60e51b81526004016200051c919062001a2b565b9392505050565b6108528062001a4183390190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715620012dd57620012dd62001288565b60405290565b600082601f830112620012f557600080fd5b813567ffffffffffffffff8082111562001313576200131362001288565b604051601f8301601f19908116603f011681019082821181831017156200133e576200133e62001288565b816040528381528660208588010111156200135857600080fd5b836020870160208301376000602085830101528094505050505092915050565b6001600160a01b03811681146200062857600080fd5b80356200139b8162001378565b919050565b803567ffffffffffffffff811681146200139b57600080fd5b803561ffff811681146200139b57600080fd5b803563ffffffff811681146200139b57600080fd5b600060e08284031215620013f457600080fd5b620013fe620012b7565b905081356cffffffffffffffffffffffffff811681146200141e57600080fd5b81526200142e60208301620013cc565b60208201526200144160408301620013a0565b60408201526200145460608301620013a0565b60608201526200146760808301620013a0565b60808201526200147a60a08301620013a0565b60a082015260c082013560c082015292915050565b60008060008060008060008060006101e08a8c031215620014af57600080fd5b893567ffffffffffffffff80821115620014c857600080fd5b620014d68d838e01620012e3565b9a5060208c0135915080821115620014ed57600080fd5b620014fb8d838e01620012e3565b99506200150b60408d016200138e565b98506200151b60608d01620013a0565b97506200152b60808d01620013b9565b96506200153b60a08d016200138e565b95506200154c8d60c08e01620013e1565b94506200155d6101a08d016200138e565b93506101c08c01359150808211156200157557600080fd5b50620015848c828d01620012e3565b9150509295985092959850929598565b600060208284031215620015a757600080fd5b8135620012738162001378565b6000806000806000806000806000806102008b8d031215620015d557600080fd5b8a3567ffffffffffffffff80821115620015ee57600080fd5b620015fc8e838f01620012e3565b9b5060208d01359150808211156200161357600080fd5b620016218e838f01620012e3565b9a506200163160408e01620013a0565b99506200164160608e01620013b9565b98506200165160808e016200138e565b97506200166160a08e016200138e565b9650620016728e60c08f01620013e1565b95506101a08d01359150808211156200168a57600080fd5b620016988e838f01620012e3565b94506101c08d0135915080821115620016b057600080fd5b620016be8e838f01620012e3565b93506101e08d0135915080821115620016d657600080fd5b50620016e58d828e01620012e3565b9150509295989b9194979a5092959850565b600080604083850312156200170b57600080fd5b8235620017188162001378565b9150602083013567ffffffffffffffff8111156200173557600080fd5b6200174385828601620012e3565b9150509250929050565b60008060008060008060008060006101e08a8c0312156200176d57600080fd5b893567ffffffffffffffff808211156200178657600080fd5b620017948d838e01620012e3565b9a5060208c0135915080821115620017ab57600080fd5b620017b98d838e01620012e3565b9950620017c960408d016200138e565b9850620017d960608d01620013a0565b9750620017e960808d01620013b9565b9650620017f960a08d016200138e565b95506200180a8d60c08e01620013e1565b94506101a08c01359150808211156200182257600080fd5b6200155d8d838e01620012e3565b60005b838110156200184d57818101518382015260200162001833565b838111156200104f5750506000910152565b600081518084526200187981602086016020860162001830565b601f01601f19169290920160200192915050565b60006101e0808352620018a38184018d6200185f565b90508281036020840152620018b9818c6200185f565b90506001600160a01b03808b166040850152808a1660608501525067ffffffffffffffff808916608085015261ffff881660a08501526cffffffffffffffffffffffffff87511660c085015263ffffffff60208801511660e08501528060408801511661010085015280606088015116610120850152806080880151166101408501528060a0880151166101608501525060c08601516101808401526200196c6101a08401866001600160a01b03169052565b8281036101c08401526200068981856200185f565b6060815260006200199660608301866200185f565b8281036020840152620019aa81866200185f565b90508281036040840152620019c081856200185f565b9695505050505050565b604081526000620019df60408301856200185f565b82810360208401526200122c81856200185f565b60006020828403121562001a0657600080fd5b5051919050565b6000825162001a2181846020870162001830565b9190910192915050565b6020815260006200127360208301846200185f56fe60806040526040516108523803806108528339810160408190526100229161034d565b818161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd61041b565b60008051602061080b8339815191521461006b5761006b610440565b61007782826000610080565b505050506104a5565b610089836100b6565b6000825111806100965750805b156100b1576100af83836100f660201b6100291760201c565b505b505050565b6100bf81610122565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061011b838360405180606001604052806027815260200161082b602791396101e2565b9392505050565b610135816102c060201b6100551760201c565b61019c5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101c160008051602061080b83398151915260001b6102cf60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b61024a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610193565b600080856001600160a01b0316856040516102659190610456565b600060405180830381855af49150503d80600081146102a0576040519150601f19603f3d011682016040523d82523d6000602084013e6102a5565b606091505b5090925090506102b68282866102d2565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102e157508161011b565b8251156102f15782518084602001fd5b8160405162461bcd60e51b81526004016101939190610472565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561033c578181015183820152602001610324565b838111156100af5750506000910152565b6000806040838503121561036057600080fd5b82516001600160a01b038116811461037757600080fd5b60208401519092506001600160401b038082111561039457600080fd5b818501915085601f8301126103a857600080fd5b8151818111156103ba576103ba61030b565b604051601f8201601f19908116603f011681019083821181831017156103e2576103e261030b565b816040528281528860208487010111156103fb57600080fd5b61040c836020830160208801610321565b80955050505050509250929050565b60008282101561043b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b60008251610468818460208701610321565b9190910192915050565b6020815260008251806020840152610491816040850160208701610321565b601f01601f19169190910160400192915050565b610357806104b46000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207b739cd7387f455c17ca8ed057865df6f924ca4fbc539854a8aae913cc20656664736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212204d63e7b0701bee9aa9d62b38c7797605aaac7d70d7ee9a9eec58caf5746d774f64736f6c634300080a0033' + +type ZoraNFTCreatorV1ConstructorParams = + | [signer?: Signer] + | ConstructorParameters + +const isSuperArgs = ( + xs: ZoraNFTCreatorV1ConstructorParams +): xs is ConstructorParameters => xs.length > 1 + +export class ZoraNFTCreatorV1__factory extends ContractFactory { + constructor(...args: ZoraNFTCreatorV1ConstructorParams) { + if (isSuperArgs(args)) { + super(...args) + } else { + super(_abi, _bytecode, args[0]) + } + } + + override deploy( + _implementation: string, + _editionMetadataRenderer: string, + _dropMetadataRenderer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + _implementation, + _editionMetadataRenderer, + _dropMetadataRenderer, + overrides || {} + ) as Promise + } + override getDeployTransaction( + _implementation: string, + _editionMetadataRenderer: string, + _dropMetadataRenderer: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + _implementation, + _editionMetadataRenderer, + _dropMetadataRenderer, + overrides || {} + ) + } + override attach(address: string): ZoraNFTCreatorV1 { + return super.attach(address) as ZoraNFTCreatorV1 + } + override connect(signer: Signer): ZoraNFTCreatorV1__factory { + return super.connect(signer) as ZoraNFTCreatorV1__factory + } + + static readonly bytecode = _bytecode + static readonly abi = _abi + static createInterface(): ZoraNFTCreatorV1Interface { + return new utils.Interface(_abi) as ZoraNFTCreatorV1Interface + } + static connect(address: string, signerOrProvider: Signer | Provider): ZoraNFTCreatorV1 { + return new Contract(address, _abi, signerOrProvider) as ZoraNFTCreatorV1 + } +} diff --git a/packages/zora-drops-utils/src/constants/typechain/factories/index.ts b/packages/zora-drops-utils/src/constants/typechain/factories/index.ts new file mode 100644 index 0000000..ea5d768 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/factories/index.ts @@ -0,0 +1,26 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as editionMetadataRendererTSol from './EditionMetadataRenderer.t.sol' +export * as metadataRenderAdminCheckTSol from './MetadataRenderAdminCheck.t.sol' +export { DropMetadataRenderer__factory } from './DropMetadataRenderer__factory' +export { DummyMetadataRenderer__factory } from './DummyMetadataRenderer__factory' +export { ERC1967Proxy__factory } from './ERC1967Proxy__factory' +export { ERC721Drop__factory } from './ERC721Drop__factory' +export { ERC721DropProxy__factory } from './ERC721DropProxy__factory' +export { ERC721DropStorageV1__factory } from './ERC721DropStorageV1__factory' +export { EditionMetadataRenderer__factory } from './EditionMetadataRenderer__factory' +export { FundsReceiver__factory } from './FundsReceiver__factory' +export { IBeacon__factory } from './IBeacon__factory' +export { IERC721Drop__factory } from './IERC721Drop__factory' +export { IMetadataRenderer__factory } from './IMetadataRenderer__factory' +export { IZoraFeeManager__factory } from './IZoraFeeManager__factory' +export { MetadataRenderAdminCheck__factory } from './MetadataRenderAdminCheck__factory' +export { MockMetadataRenderer__factory } from './MockMetadataRenderer__factory' +export { OwnableSkeleton__factory } from './OwnableSkeleton__factory' +export { Proxy__factory } from './Proxy__factory' +export { SharedNFTLogic__factory } from './SharedNFTLogic__factory' +export { Version__factory } from './Version__factory' +export { ZoraFeeManager__factory } from './ZoraFeeManager__factory' +export { ZoraNFTCreatorProxy__factory } from './ZoraNFTCreatorProxy__factory' +export { ZoraNFTCreatorV1__factory } from './ZoraNFTCreatorV1__factory' diff --git a/packages/zora-drops-utils/src/constants/typechain/index.ts b/packages/zora-drops-utils/src/constants/typechain/index.ts new file mode 100644 index 0000000..963aa46 --- /dev/null +++ b/packages/zora-drops-utils/src/constants/typechain/index.ts @@ -0,0 +1,54 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as editionMetadataRendererTSol from './EditionMetadataRenderer.t.sol' +export type { editionMetadataRendererTSol } +import type * as metadataRenderAdminCheckTSol from './MetadataRenderAdminCheck.t.sol' +export type { metadataRenderAdminCheckTSol } +export type { DropMetadataRenderer } from './DropMetadataRenderer' +export type { DummyMetadataRenderer } from './DummyMetadataRenderer' +export type { ERC1967Proxy } from './ERC1967Proxy' +export type { ERC721Drop } from './ERC721Drop' +export type { ERC721DropProxy } from './ERC721DropProxy' +export type { ERC721DropStorageV1 } from './ERC721DropStorageV1' +export type { EditionMetadataRenderer } from './EditionMetadataRenderer' +export type { FundsReceiver } from './FundsReceiver' +export type { IBeacon } from './IBeacon' +export type { IERC721Drop } from './IERC721Drop' +export type { IMetadataRenderer } from './IMetadataRenderer' +export type { IZoraFeeManager } from './IZoraFeeManager' +export type { MetadataRenderAdminCheck } from './MetadataRenderAdminCheck' +export type { MockMetadataRenderer } from './MockMetadataRenderer' +export type { OwnableSkeleton } from './OwnableSkeleton' +export type { Proxy } from './Proxy' +export type { SharedNFTLogic } from './SharedNFTLogic' +export type { Version } from './Version' +export type { ZoraFeeManager } from './ZoraFeeManager' +export type { ZoraNFTCreatorProxy } from './ZoraNFTCreatorProxy' +export type { ZoraNFTCreatorV1 } from './ZoraNFTCreatorV1' +export * as factories from './factories' +export { DropMetadataRenderer__factory } from './factories/DropMetadataRenderer__factory' +export { DummyMetadataRenderer__factory } from './factories/DummyMetadataRenderer__factory' +export { EditionMetadataRenderer__factory } from './factories/EditionMetadataRenderer__factory' +export type { IERC721OnChainDataMock } from './EditionMetadataRenderer.t.sol/IERC721OnChainDataMock' +export { IERC721OnChainDataMock__factory } from './factories/EditionMetadataRenderer.t.sol/IERC721OnChainDataMock__factory' +export { ERC1967Proxy__factory } from './factories/ERC1967Proxy__factory' +export { ERC721Drop__factory } from './factories/ERC721Drop__factory' +export { ERC721DropProxy__factory } from './factories/ERC721DropProxy__factory' +export { ERC721DropStorageV1__factory } from './factories/ERC721DropStorageV1__factory' +export { FundsReceiver__factory } from './factories/FundsReceiver__factory' +export { IBeacon__factory } from './factories/IBeacon__factory' +export { IERC721Drop__factory } from './factories/IERC721Drop__factory' +export { IMetadataRenderer__factory } from './factories/IMetadataRenderer__factory' +export { IZoraFeeManager__factory } from './factories/IZoraFeeManager__factory' +export { MetadataRenderAdminCheck__factory } from './factories/MetadataRenderAdminCheck__factory' +export type { TestAdmin } from './MetadataRenderAdminCheck.t.sol/TestAdmin' +export { TestAdmin__factory } from './factories/MetadataRenderAdminCheck.t.sol/TestAdmin__factory' +export { MockMetadataRenderer__factory } from './factories/MockMetadataRenderer__factory' +export { OwnableSkeleton__factory } from './factories/OwnableSkeleton__factory' +export { Proxy__factory } from './factories/Proxy__factory' +export { SharedNFTLogic__factory } from './factories/SharedNFTLogic__factory' +export { Version__factory } from './factories/Version__factory' +export { ZoraFeeManager__factory } from './factories/ZoraFeeManager__factory' +export { ZoraNFTCreatorProxy__factory } from './factories/ZoraNFTCreatorProxy__factory' +export { ZoraNFTCreatorV1__factory } from './factories/ZoraNFTCreatorV1__factory' diff --git a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx index 21d5ed9..60c6689 100644 --- a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx +++ b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx @@ -1,105 +1,39 @@ import React from 'react' -import { - useContractWrite, - usePrepareContractWrite, - useContractRead, - useAccount, -} from 'wagmi' +import { BigNumber } from 'ethers' +import { useContractRead, useAccount, useSigner } from 'wagmi' import zoraDropsABI from '@zoralabs/nft-drop-contracts/dist/artifacts/ERC721Drop.sol/ERC721Drop.json' +import { ERC721Drop__factory } from '../constants/typechain' import { ethers } from 'ethers' import { useSWRDrop } from '../hooks' import { dateFormat } from '../constants' -import { DropsContractReturnTypes, DropsContractProps } from './../typings' +import { + DropsContractReturnTypes, + DropsContractProps, + AllowListEntry, +} from './../typings' import { useSaleStatus } from '../hooks/useSaleStatus' -import { useAllowlistEntry } from '../hooks/useAllowlistEntry' const DEFAULT_MINT_QUANTITY = { name: '1', queryValue: 1, } -const DropsContractContext = React.createContext({ - purchase: () => {}, - purchasePresale: () => {}, - onMintCallback: () => {}, - setMintQuantity: () => {}, - mintQuantity: DEFAULT_MINT_QUANTITY, - transaction: { - purchaseData: undefined, - purchaseLoading: false, - purchaseSuccess: false, - txHash: undefined, - }, - errors: { - unpredictableGasLimit: false, - insufficientFunds: false, - }, - networkId: '1', - collectionAddress: undefined, - collectionData: undefined, - totalPrice: undefined, - /* Sales Data */ - purchaseLimit: { - maxAmount: undefined, - pastAmount: undefined, - prettyMaxAmount: undefined, - }, - inventory: { - totalSupply: undefined, - totalSold: undefined, - prettyInventory: undefined, - }, - balance: { - walletLimit: false, - walletBalance: undefined, - }, - saleStatus: undefined, - mintStatus: { - text: undefined, - isEnded: undefined, - isActive: undefined, - startDate: { - iso: undefined, - unixtime: undefined, - pretty: undefined, - }, - endDate: { - iso: undefined, - unixtime: undefined, - pretty: undefined, - }, - preSale: { - presaleStart: { - iso: undefined, - unixtime: undefined, - pretty: undefined, - }, - presaleEnd: { - iso: undefined, - unixtime: undefined, - pretty: undefined, - }, - presaleMerkleRoot: undefined, - }, - }, -} as DropsContractReturnTypes) - -export function useDropsContractProvider() { - return React.useContext(DropsContractContext) -} +const DropsContractContext = React.createContext( + {} as DropsContractReturnTypes +) export function DropsContractProvider({ children, collectionAddress, networkId = '1', - onSuccessCallback = () => {}, + // onSuccessCallback = () => {}, onMintCallback = () => {}, }: DropsContractProps) { const { data: collectionData } = useSWRDrop({ contractAddress: collectionAddress, networkId: networkId, }) - + const [error, setError] = React.useState(undefined) const [mintQuantity, setMintQuantity] = React.useState(DEFAULT_MINT_QUANTITY) const handleUpdateMintQuantity = React.useCallback( @@ -134,68 +68,58 @@ export function DropsContractProvider({ watch: true, }) - /* PublicSale Purchase */ - const { config, error } = usePrepareContractWrite({ - addressOrName: collectionAddress, - contractInterface: zoraDropsABI.abi, - functionName: 'purchase', - args: [mintQuantity.queryValue], - overrides: { - value: totalPurchasePrice, - }, - }) + /* initialize contract */ + const { data: signer } = useSigner() - const { - write: purchase, - data: purchaseData, - isLoading: purchaseLoading, - isSuccess: purchaseSuccess, - } = useContractWrite({ - ...config, - onSuccess() { - onSuccessCallback() - }, - }) - - /* PreSale Purchase */ - const { allowlistEntry } = useAllowlistEntry({ - merkleRoot: saleStatus?.presaleMerkleRoot, - address: address, - }) + const drop = React.useMemo( + () => (signer ? new ERC721Drop__factory(signer).attach(collectionAddress) : null), + [signer, collectionAddress] + ) - const { - config: presalePurchaseConfig, - // error: presalePurchaseError - } = usePrepareContractWrite({ - addressOrName: collectionAddress, - contractInterface: zoraDropsABI.abi, - functionName: 'purchasePresale', - args: [ - mintQuantity.queryValue, - allowlistEntry?.maxCanMint, - allowlistEntry?.price, - allowlistEntry?.proof[0], - ], - overrides: { - value: totalPurchasePrice, + const checkHasContract = React.useCallback( + async (address: string) => { + const code = await signer?.provider?.getCode(address) + if ((code?.length || 0) <= 2) { + console.error('Request is on the wrong network') + } }, - }) + [signer] + ) + + /* PublicSale Purchase */ + const purchase = React.useCallback(async () => { + if (!drop || !collectionData?.salesConfig) return + await checkHasContract(drop.address) + const tx = await drop.purchase(mintQuantity.queryValue, { + value: (collectionData?.salesConfig.publicSalePrice as BigNumber).mul( + BigNumber.from(mintQuantity.queryValue) + ), + }) + return tx + }, [drop, collectionData?.salesConfig]) - const { - write: purchasePresale, - /* - data: presalePurchaseData, - isLoading: presalePurchaseLoading, - isSuccess: presalePurchaseSuccess, - */ - } = useContractWrite({ - ...presalePurchaseConfig, - onSuccess() { - onSuccessCallback() + /* PreSale Purchase */ + const purchasePresale = React.useCallback( + async (quantity: number, allowlistEntry?: AllowListEntry) => { + console.log(quantity, allowlistEntry) + if (!drop || !allowlistEntry) return + await checkHasContract(drop.address) + const tx = await drop.purchasePresale( + quantity, + allowlistEntry.maxCanMint, + BigNumber.from(allowlistEntry.price), + allowlistEntry.proof.map((e: any) => `0x${e}`), + { + value: BigNumber.from(allowlistEntry.price).mul(BigNumber.from(quantity)), + } + ) + return tx }, - }) + [drop] + ) /* Checks */ + const insufficientFunds = React.useMemo(() => { if (error) { /* @ts-ignore */ @@ -291,44 +215,48 @@ export function DropsContractProvider({ return ( + value={{ + collectionData, + onMintCallback: onMintCallback, + purchase, + purchasePresale, + /* + transaction: { + purchaseData, + purchaseLoading, + purchaseSuccess, + txHash: purchaseData && purchaseData?.hash, + }, + */ + mintQuantity, + setMintQuantity: handleUpdateMintQuantity, + totalPrice: { + raw: totalPurchasePrice, + pretty: prettyPurchasePrice, + }, + collectionAddress: collectionAddress, + networkId: networkId, + errors: { + insufficientFunds: insufficientFunds, + unpredictableGasLimit: unpredictableGasLimit, + }, + purchaseLimit, + inventory, + balance, + mintStatus: { + text: undefined, + isEnded: isEnded, + isActive: isActive, + startDate: startDate, + endDate: endDate, + }, + saleStatus: saleStatus, + }}> {children} ) } + +export function useDropsContractProvider() { + return React.useContext(DropsContractContext) +} diff --git a/packages/zora-drops-utils/src/typings/dropsContractTypes.ts b/packages/zora-drops-utils/src/typings/dropsContractTypes.ts index 9b7e996..4aa6624 100644 --- a/packages/zora-drops-utils/src/typings/dropsContractTypes.ts +++ b/packages/zora-drops-utils/src/typings/dropsContractTypes.ts @@ -1,3 +1,5 @@ +import type { ContractTransaction } from 'ethers' + export type DropsContractProps = { children?: React.ReactNode collectionAddress?: string @@ -12,9 +14,13 @@ export type SaleDate = { pretty?: string } -export type DropsContractReturnTypes = { +export interface DropsContractReturnTypes { purchase?: () => void - purchasePresale?: () => void + // purchase: (quantity: number) => Promise + purchasePresale: ( + quantity: number, + allowlistEntry?: AllowListEntry + ) => Promise onMintCallback: () => void setMintQuantity?: React.ChangeEventHandler collectionData?: any @@ -82,3 +88,10 @@ export type DropsContractReturnTypes = { presaleMerkleRoot?: string } } + +export interface AllowListEntry { + maxCanMint: string + user: string + price: string + proof: string[] +} diff --git a/packages/zora-drops-utils/src/typings/index.ts b/packages/zora-drops-utils/src/typings/index.ts index 07dee67..fc5071d 100644 --- a/packages/zora-drops-utils/src/typings/index.ts +++ b/packages/zora-drops-utils/src/typings/index.ts @@ -6,4 +6,5 @@ export type { DropsContractReturnTypes, SaleDate, DropsContractProps, + AllowListEntry, } from './dropsContractTypes' diff --git a/tsconfig.json b/tsconfig.json index a844005..79db1fb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,6 +20,11 @@ "strictNullChecks": false, "target": "es2021" }, - "exclude": ["node_modules", "**/dist/**", "**/node_modules/**"], - "include": ["packages/**/*"] + "include": ["packages/**/*.ts"], + "exclude": [ + "node_modules", + "**/dist/**", + "**/node_modules/**", + "**/packages/zora-drops-utils/src/constants/typechain/**, packages/zora-drops-utils/src/constants/typechain/**/*.ts, packages/zora-drops-utils/src/constants/typechain/**/*.t.sol" + ] } From 6927b8f49d67091483e10150f4eb0475bccf10ee Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Tue, 1 Nov 2022 15:35:29 -0700 Subject: [PATCH 13/32] cherry picked chain config from Max's work --- examples/nextjs-dapp/src/components/AppWrapper.tsx | 11 ++++++++++- examples/reactjs-dapp/src/App.tsx | 12 +++++++++++- .../src/context/DropsContractProvider.tsx | 2 +- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/examples/nextjs-dapp/src/components/AppWrapper.tsx b/examples/nextjs-dapp/src/components/AppWrapper.tsx index 0ed768a..b97a9b6 100644 --- a/examples/nextjs-dapp/src/components/AppWrapper.tsx +++ b/examples/nextjs-dapp/src/components/AppWrapper.tsx @@ -5,10 +5,19 @@ import { publicProvider } from 'wagmi/providers/public' import { SWRConfig } from 'swr' import { NFTFetchConfiguration } from '@zoralabs/nft-hooks' import { ZDKFetchStrategy } from '@zoralabs/nft-hooks/dist/strategies' +import { jsonRpcProvider } from 'wagmi/providers/jsonRpc' const { chains, provider } = configureChains( [chain.mainnet, chain.goerli], - [publicProvider()] + [ + jsonRpcProvider({ + priority: 0, + rpc: (chain) => (chain.id === 1 ? + {http: "https://rpc.ankr.com/eth"} : + {http: "https://rpc.ankr.com/eth_goerli"} + )}), + publicProvider() + ] ) const { connectors } = getDefaultWallets({ appName: 'ExampleNextjsDapp', diff --git a/examples/reactjs-dapp/src/App.tsx b/examples/reactjs-dapp/src/App.tsx index f77188d..0e2b59c 100644 --- a/examples/reactjs-dapp/src/App.tsx +++ b/examples/reactjs-dapp/src/App.tsx @@ -6,11 +6,21 @@ import { SWRConfig } from 'swr' import { NFTFetchConfiguration } from '@zoralabs/nft-hooks' import { ZDKFetchStrategy } from '@zoralabs/nft-hooks/dist/strategies' import { Header } from './components/Header' +import { jsonRpcProvider } from 'wagmi/providers/jsonRpc' const { chains, provider } = configureChains( [chain.mainnet, chain.goerli], - [publicProvider()] + [ + jsonRpcProvider({ + priority: 0, + rpc: (chain) => (chain.id === 1 ? + {http: "https://rpc.ankr.com/eth"} : + {http: "https://rpc.ankr.com/eth_goerli"} + )}), + publicProvider() + ] ) + const { connectors } = getDefaultWallets({ appName: 'ExampleReactjsDapp', chains, diff --git a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx index 60c6689..25da671 100644 --- a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx +++ b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx @@ -113,13 +113,13 @@ export function DropsContractProvider({ value: BigNumber.from(allowlistEntry.price).mul(BigNumber.from(quantity)), } ) + console.log(tx) return tx }, [drop] ) /* Checks */ - const insufficientFunds = React.useMemo(() => { if (error) { /* @ts-ignore */ From 02e4129e231fb2e863d4a62557b980d1fabfffbb Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Tue, 1 Nov 2022 16:01:35 -0700 Subject: [PATCH 14/32] wired up presalePurchase and purchase tx states --- .../src/components/DropsData.tsx | 2 + .../src/context/DropsContractProvider.tsx | 66 +++++++++++++------ 2 files changed, 47 insertions(+), 21 deletions(-) diff --git a/packages/zora-drops-utils/src/components/DropsData.tsx b/packages/zora-drops-utils/src/components/DropsData.tsx index 1a66804..9ca6c77 100644 --- a/packages/zora-drops-utils/src/components/DropsData.tsx +++ b/packages/zora-drops-utils/src/components/DropsData.tsx @@ -13,6 +13,7 @@ export function DropsData({ data = {} }: { data?: any }) { balance, errors, saleStatus, + transaction, } = useDropsContractProvider() const { address } = useAccount() @@ -27,6 +28,7 @@ export function DropsData({ data = {} }: { data?: any }) { collectionData ? { collectionData, + transaction, mintStatus, saleStatus, purchaseLimit, diff --git a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx index 25da671..c0389bb 100644 --- a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx +++ b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx @@ -34,6 +34,10 @@ export function DropsContractProvider({ networkId: networkId, }) const [error, setError] = React.useState(undefined) + const [purchaseLoading, setPurchaseLoading] = React.useState(false) + const [purchaseSuccess, setPurchaseSuccess] = React.useState(false) + const [purchaseData, setPurchaseData] = React.useState(undefined) + const [mintQuantity, setMintQuantity] = React.useState(DEFAULT_MINT_QUANTITY) const handleUpdateMintQuantity = React.useCallback( @@ -90,12 +94,24 @@ export function DropsContractProvider({ const purchase = React.useCallback(async () => { if (!drop || !collectionData?.salesConfig) return await checkHasContract(drop.address) - const tx = await drop.purchase(mintQuantity.queryValue, { - value: (collectionData?.salesConfig.publicSalePrice as BigNumber).mul( - BigNumber.from(mintQuantity.queryValue) - ), - }) - return tx + + try { + const tx = await drop.purchase(mintQuantity.queryValue, { + value: (collectionData?.salesConfig.publicSalePrice as BigNumber).mul( + BigNumber.from(mintQuantity.queryValue) + ), + }) + setPurchaseLoading(true) + setPurchaseData(tx) + if (tx) { + await tx.wait(2) + setPurchaseLoading(false) + setPurchaseSuccess(true) + } + return tx + } catch (err) { + setError(err) + } }, [drop, collectionData?.salesConfig]) /* PreSale Purchase */ @@ -104,17 +120,27 @@ export function DropsContractProvider({ console.log(quantity, allowlistEntry) if (!drop || !allowlistEntry) return await checkHasContract(drop.address) - const tx = await drop.purchasePresale( - quantity, - allowlistEntry.maxCanMint, - BigNumber.from(allowlistEntry.price), - allowlistEntry.proof.map((e: any) => `0x${e}`), - { - value: BigNumber.from(allowlistEntry.price).mul(BigNumber.from(quantity)), + try { + const tx = await drop.purchasePresale( + quantity, + allowlistEntry.maxCanMint, + BigNumber.from(allowlistEntry.price), + allowlistEntry.proof.map((e: any) => `0x${e}`), + { + value: BigNumber.from(allowlistEntry.price).mul(BigNumber.from(quantity)), + } + ) + setPurchaseLoading(true) + setPurchaseData(tx) + if (tx) { + await tx.wait(2) + setPurchaseLoading(false) + setPurchaseSuccess(true) } - ) - console.log(tx) - return tx + return tx + } catch (err) { + setError(err) + } }, [drop] ) @@ -220,14 +246,12 @@ export function DropsContractProvider({ onMintCallback: onMintCallback, purchase, purchasePresale, - /* transaction: { - purchaseData, - purchaseLoading, - purchaseSuccess, + purchaseData: purchaseData, + purchaseLoading: purchaseLoading, + purchaseSuccess: purchaseSuccess, txHash: purchaseData && purchaseData?.hash, }, - */ mintQuantity, setMintQuantity: handleUpdateMintQuantity, totalPrice: { From a8b89e1cb17f010a28e0557fb3e07387f1e064cf Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Tue, 1 Nov 2022 16:32:08 -0700 Subject: [PATCH 15/32] wiring up purchase func --- .../nextjs-dapp/src/pages/presale-mint.tsx | 9 +++++ .../components/drop-components/MintButton.tsx | 40 ++++++++++++++++++- .../src/context/DropsContractProvider.tsx | 38 +++++++++++++----- 3 files changed, 74 insertions(+), 13 deletions(-) diff --git a/examples/nextjs-dapp/src/pages/presale-mint.tsx b/examples/nextjs-dapp/src/pages/presale-mint.tsx index d4dbb86..8484711 100644 --- a/examples/nextjs-dapp/src/pages/presale-mint.tsx +++ b/examples/nextjs-dapp/src/pages/presale-mint.tsx @@ -8,6 +8,15 @@ function Page() { + + + +
+ + + + +
diff --git a/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx b/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx index 332533d..3fd53c5 100644 --- a/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx +++ b/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx @@ -5,17 +5,23 @@ import { useAccount } from 'wagmi' export function MintButton({ mintCta, + presaleMintCta, insufficientFundsCta = 'Insufficient Funds', mintCapCta = 'You have minted the maximum amount per wallet.', + presaleMintCapCta = 'You have reached the maximum amount of presale mints.', tokenDescriptor = 'NFT', + saleOverCta = 'The sale is now over.', appendQuantity = false, mintButtonCallback = () => {}, ...props }: { mintCta?: string + presaleMintCta?: string insufficientFundsCta?: string mintCapCta?: string + presaleMintCapCta?: string tokenDescriptor?: string + saleOverCta?: string appendQuantity?: boolean mintButtonCallback?: () => void }) { @@ -54,6 +60,11 @@ export function MintButton({ [mintQuantity, mintQuantity?.name, quantity] ) + const presaleMintCtaCopy = React.useMemo( + () => (!mintCta ? `Mint presale ${mintQuantity?.name} ${quantity}` : mintCta), + [mintQuantity, mintQuantity?.name, quantity] + ) + const handleMintCall = React.useCallback(() => { purchase() onMintCallback() @@ -66,15 +77,40 @@ export function MintButton({ mintButtonCallback() }, [purchasePresale, mintQuantity?.queryValue, allowlistEntry]) + if ( + !saleStatus?.saleIsActive && + !saleStatus?.presaleIsActive && + saleStatus?.saleIsFinished + ) { + return ( +
+

The sale is now over.

+
+ ) + } + return (
{!saleStatus?.saleIsActive && saleStatus?.presaleIsActive && (
{accessAllowed ? ( ) : (
Public sale starts: {saleStatus?.startDateFull?.pretty}
diff --git a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx index c0389bb..3c6691e 100644 --- a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx +++ b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx @@ -12,6 +12,7 @@ import { AllowListEntry, } from './../typings' import { useSaleStatus } from '../hooks/useSaleStatus' +import { useAllowlistEntry } from '../hooks/useAllowlistEntry' const DEFAULT_MINT_QUANTITY = { name: '1', @@ -37,9 +38,17 @@ export function DropsContractProvider({ const [purchaseLoading, setPurchaseLoading] = React.useState(false) const [purchaseSuccess, setPurchaseSuccess] = React.useState(false) const [purchaseData, setPurchaseData] = React.useState(undefined) - const [mintQuantity, setMintQuantity] = React.useState(DEFAULT_MINT_QUANTITY) + const { address } = useAccount() + + const saleStatus = useSaleStatus({ collectionData: collectionData }) + + const { allowlistEntry } = useAllowlistEntry({ + merkleRoot: saleStatus?.presaleMerkleRoot, + address: address, + }) + const handleUpdateMintQuantity = React.useCallback( (event: any) => { setMintQuantity({ @@ -60,10 +69,6 @@ export function DropsContractProvider({ } }, [collectionData, collectionData?.salesConfig?.publicSalePrice, mintQuantity]) - const { address } = useAccount() - - const saleStatus = useSaleStatus({ collectionData: collectionData }) - const { data: balanceOf } = useContractRead({ addressOrName: collectionAddress, contractInterface: zoraDropsABI.abi, @@ -93,14 +98,18 @@ export function DropsContractProvider({ /* PublicSale Purchase */ const purchase = React.useCallback(async () => { if (!drop || !collectionData?.salesConfig) return + await checkHasContract(drop.address) try { + // console.log('purchase drop', drop, collectionData?.salesConfig) + const tx = await drop.purchase(mintQuantity.queryValue, { value: (collectionData?.salesConfig.publicSalePrice as BigNumber).mul( BigNumber.from(mintQuantity.queryValue) ), }) + console.log(tx) setPurchaseLoading(true) setPurchaseData(tx) if (tx) { @@ -117,7 +126,6 @@ export function DropsContractProvider({ /* PreSale Purchase */ const purchasePresale = React.useCallback( async (quantity: number, allowlistEntry?: AllowListEntry) => { - console.log(quantity, allowlistEntry) if (!drop || !allowlistEntry) return await checkHasContract(drop.address) try { @@ -160,14 +168,19 @@ export function DropsContractProvider({ } }, [error]) + const maxPerAddress = React.useMemo(() => { + return saleStatus?.presaleIsActive && allowlistEntry + ? allowlistEntry?.maxCanMint + : collectionData?.salesConfig?.maxSalePurchasePerAddress || 1 + }, [collectionData, mintQuantity, saleStatus, allowlistEntry]) + const purchaseLimit = React.useMemo(() => { - const maxPerAddress = collectionData?.salesConfig?.maxSalePurchasePerAddress || 1 return { maxAmount: maxPerAddress, pastAmount: mintQuantity.queryValue > Number(maxPerAddress), prettyMaxAmount: maxPerAddress === '4294967295' ? '∞' : maxPerAddress, } - }, [collectionData, mintQuantity]) + }, [mintQuantity, maxPerAddress]) const inventory = React.useMemo(() => { return { @@ -184,22 +197,25 @@ export function DropsContractProvider({ const balance = React.useMemo(() => { try { return { - walletLimit: balanceOf >= purchaseLimit?.maxAmount, + walletLimit: balanceOf >= maxPerAddress, walletBalance: balanceOf && balanceOf.toString(), } } catch (err) { console.error(err) } - }, [purchaseLimit, balanceOf]) + }, [purchaseLimit, balanceOf, maxPerAddress]) const prettyPurchasePrice = React.useMemo(() => { try { return totalPurchasePrice ? ethers.utils.formatUnits(totalPurchasePrice) : '' } catch (err) { - console.error(err) + // console.error(err) } }, [totalPurchasePrice]) + /** + * TODO: Remove the below + */ const startDate = React.useMemo(() => { if (collectionData?.salesConfig?.publicSaleStart) { const isoDate = new Date( From 5a6bbada583185d0311f60575b88e18261d7ea5e Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Tue, 1 Nov 2022 16:35:33 -0700 Subject: [PATCH 16/32] tx purchase working --- .../src/components/drop-components/TxStatus.tsx | 14 ++++++++------ .../src/context/DropsContractProvider.tsx | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/zora-drops-utils/src/components/drop-components/TxStatus.tsx b/packages/zora-drops-utils/src/components/drop-components/TxStatus.tsx index 3f49601..2fb7ec2 100644 --- a/packages/zora-drops-utils/src/components/drop-components/TxStatus.tsx +++ b/packages/zora-drops-utils/src/components/drop-components/TxStatus.tsx @@ -3,18 +3,20 @@ import React from 'react' import { useDropsContractProvider } from './../../context' export function TxStatus({ ...props }) { - const { - transaction: { purchaseLoading, purchaseSuccess, txHash }, - } = useDropsContractProvider() + const { transaction } = useDropsContractProvider() return (

- {purchaseLoading && ( + {transaction?.purchaseLoading && ( Tx Processing )} - {purchaseSuccess && Minted!} + {transaction?.purchaseSuccess && ( + Minted! + )}
- {txHash && txHash} + {transaction?.txHash && ( + txHash: {transaction?.txHash} + )}

) diff --git a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx index 3c6691e..c141c7e 100644 --- a/packages/zora-drops-utils/src/context/DropsContractProvider.tsx +++ b/packages/zora-drops-utils/src/context/DropsContractProvider.tsx @@ -105,13 +105,13 @@ export function DropsContractProvider({ // console.log('purchase drop', drop, collectionData?.salesConfig) const tx = await drop.purchase(mintQuantity.queryValue, { - value: (collectionData?.salesConfig.publicSalePrice as BigNumber).mul( - BigNumber.from(mintQuantity.queryValue) - ), + value: totalPurchasePrice, }) console.log(tx) + setPurchaseLoading(true) setPurchaseData(tx) + if (tx) { await tx.wait(2) setPurchaseLoading(false) From 412fab4ae1f4cb85f71cc7a71e7640b279af36df Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Tue, 1 Nov 2022 16:41:45 -0700 Subject: [PATCH 17/32] bump package version and publish to npm --- .changeset/curly-readers-work.md | 5 +++++ packages/zora-drops-utils/package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/curly-readers-work.md diff --git a/.changeset/curly-readers-work.md b/.changeset/curly-readers-work.md new file mode 100644 index 0000000..08e28e7 --- /dev/null +++ b/.changeset/curly-readers-work.md @@ -0,0 +1,5 @@ +--- +'@public-assembly/zora-drops-utils': minor +--- + +Added allowlist functionality and updated mint calls to use typechain diff --git a/packages/zora-drops-utils/package.json b/packages/zora-drops-utils/package.json index cae059b..1b1fce1 100644 --- a/packages/zora-drops-utils/package.json +++ b/packages/zora-drops-utils/package.json @@ -1,6 +1,6 @@ { "name": "@public-assembly/zora-drops-utils", - "version": "0.1.51", + "version": "0.1.53", "description": "Example package with some web3 peer dependencies", "main": "dist/public-assembly-zora-drops-utils.cjs.js", "module": "dist/public-assembly-zora-drops-utils.esm.js", From 88a4432939cf6290f54b2f049dd5b7d72529a8eb Mon Sep 17 00:00:00 2001 From: Dain Blodorn Kim Date: Tue, 1 Nov 2022 20:54:48 -0700 Subject: [PATCH 18/32] mintquantity selector fix --- .changeset/gold-suits-learn.md | 5 ++++ .../nextjs-dapp/src/pages/presale-mint.tsx | 10 ++++++-- packages/zora-drops-utils/package.json | 2 +- .../src/components/DropsData.tsx | 15 ++--------- .../components/drop-components/MintButton.tsx | 25 +++++++++++++------ .../drop-components/MintQuantity.tsx | 3 ++- .../src/context/DropsContractProvider.tsx | 25 +++++++++---------- packages/zora-drops-utils/src/hooks/index.ts | 1 + packages/zora-drops-utils/src/index.ts | 9 ++++++- .../src/typings/dropsContractTypes.ts | 23 +++++++++-------- 10 files changed, 69 insertions(+), 49 deletions(-) create mode 100644 .changeset/gold-suits-learn.md diff --git a/.changeset/gold-suits-learn.md b/.changeset/gold-suits-learn.md new file mode 100644 index 0000000..64d5152 --- /dev/null +++ b/.changeset/gold-suits-learn.md @@ -0,0 +1,5 @@ +--- +'@public-assembly/zora-drops-utils': minor +--- + +Added presale cannot mint cta diff --git a/examples/nextjs-dapp/src/pages/presale-mint.tsx b/examples/nextjs-dapp/src/pages/presale-mint.tsx index 8484711..749c5c4 100644 --- a/examples/nextjs-dapp/src/pages/presale-mint.tsx +++ b/examples/nextjs-dapp/src/pages/presale-mint.tsx @@ -7,7 +7,10 @@ function Page() { - +
+ + +
@@ -15,7 +18,10 @@ function Page() { - +
+ + +
diff --git a/packages/zora-drops-utils/package.json b/packages/zora-drops-utils/package.json index 1b1fce1..8cad38d 100644 --- a/packages/zora-drops-utils/package.json +++ b/packages/zora-drops-utils/package.json @@ -1,6 +1,6 @@ { "name": "@public-assembly/zora-drops-utils", - "version": "0.1.53", + "version": "0.1.54", "description": "Example package with some web3 peer dependencies", "main": "dist/public-assembly-zora-drops-utils.cjs.js", "module": "dist/public-assembly-zora-drops-utils.esm.js", diff --git a/packages/zora-drops-utils/src/components/DropsData.tsx b/packages/zora-drops-utils/src/components/DropsData.tsx index 9ca6c77..3337d55 100644 --- a/packages/zora-drops-utils/src/components/DropsData.tsx +++ b/packages/zora-drops-utils/src/components/DropsData.tsx @@ -1,8 +1,6 @@ /* @ts-ignore */ import * as React from 'react' import { useDropsContractProvider } from './../context/DropsContractProvider' -import { useAllowlistEntry } from '../hooks/useAllowlistEntry' -import { useAccount } from 'wagmi' export function DropsData({ data = {} }: { data?: any }) { const { @@ -14,15 +12,9 @@ export function DropsData({ data = {} }: { data?: any }) { errors, saleStatus, transaction, + allowList, } = useDropsContractProvider() - const { address } = useAccount() - - const { allowlistEntry, accessAllowed } = useAllowlistEntry({ - merkleRoot: saleStatus?.presaleMerkleRoot, - address: address, - }) - const dataToRender = React.useMemo( () => collectionData @@ -35,10 +27,7 @@ export function DropsData({ data = {} }: { data?: any }) { inventory, balance, errors, - allowList: { - allowlistEntry, - accessAllowed, - }, + allowList, } : data, [data, collectionData] diff --git a/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx b/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx index 3fd53c5..a6c75f3 100644 --- a/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx +++ b/packages/zora-drops-utils/src/components/drop-components/MintButton.tsx @@ -9,6 +9,7 @@ export function MintButton({ insufficientFundsCta = 'Insufficient Funds', mintCapCta = 'You have minted the maximum amount per wallet.', presaleMintCapCta = 'You have reached the maximum amount of presale mints.', + presaleCannotMintCta, tokenDescriptor = 'NFT', saleOverCta = 'The sale is now over.', appendQuantity = false, @@ -17,6 +18,7 @@ export function MintButton({ }: { mintCta?: string presaleMintCta?: string + presaleCannotMintCta?: string insufficientFundsCta?: string mintCapCta?: string presaleMintCapCta?: string @@ -48,11 +50,8 @@ export function MintButton({ }) const quantity = React.useMemo( - () => - `${tokenDescriptor}${ - mintQuantity?.queryValue > 1 || balance?.walletBalance === 0 ? 's' : '' - }`, - [] + () => `${tokenDescriptor}${mintQuantity?.queryValue > 1 ? 's' : ''}`, + [mintQuantity?.queryValue, balance?.walletBalance] ) const mintCtaCopy = React.useMemo( @@ -65,6 +64,14 @@ export function MintButton({ [mintQuantity, mintQuantity?.name, quantity] ) + const presaleCannotMintCtaCopy = React.useMemo( + () => + !presaleCannotMintCta + ? `Public sale starts: ${saleStatus?.startDateFull?.pretty}` + : presaleCannotMintCta, + [saleStatus, saleStatus?.startDateFull?.pretty] + ) + const handleMintCall = React.useCallback(() => { purchase() onMintCallback() @@ -92,7 +99,7 @@ export function MintButton({ return (
{!saleStatus?.saleIsActive && saleStatus?.presaleIsActive && ( -
+ <> {accessAllowed ? (
+ )} {saleStatus?.saleIsActive && !saleStatus?.presaleIsActive && (