From f4039ddada422d4e8a648e69da8fc96dff79c5f8 Mon Sep 17 00:00:00 2001
From: bigint <69431456+bigint@users.noreply.github.com>
Date: Mon, 29 Jan 2024 10:25:49 +0530
Subject: [PATCH] feat: use new nft spec instead of hardcoding everything
---
.github/workflows/ci.yml | 2 -
apps/api/.env.example | 1 -
apps/api/src/routes/nfts/basepaint/canvas.ts | 84 -
apps/api/src/routes/nfts/sound/release.ts | 71 -
apps/api/src/routes/nfts/unlonely/channel.ts | 57 -
apps/api/src/routes/nfts/unlonely/nfc.ts | 62 -
apps/api/src/routes/nfts/zora/nft.ts | 35 -
apps/api/src/utils/oembed/meta/getNft.ts | 28 +-
apps/api/tests/nfts/basepaint/canvas.spec.ts | 15 -
apps/api/tests/nfts/sound/release.spec.ts | 13 -
apps/api/tests/nfts/unlonely/channel.spec.ts | 14 -
apps/api/tests/nfts/unlonely/nfc.spec.ts | 14 -
apps/api/tests/nfts/zora/nft.spec.ts | 28 -
.../Common/Providers/Web3Provider.tsx | 36 +-
.../src/components/Composer/LinkPreviews.tsx | 17 -
.../Nft/BasePaintCanvas/Mint/Metadata.tsx | 64 -
.../Nft/BasePaintCanvas/Mint/MintAction.tsx | 171 --
.../Nft/BasePaintCanvas/Mint/Price.tsx | 66 -
.../Nft/BasePaintCanvas/Mint/index.tsx | 63 -
.../Nft/BasePaintCanvas/Shimmer.tsx | 26 -
.../Nft/BasePaintCanvas/index.tsx | 168 --
.../Nft/SoundRelease/Shimmer.tsx | 20 -
.../HeyOpenActions/Nft/SoundRelease/index.tsx | 196 --
.../Nft/UnlonelyChannel/Shimmer.tsx | 20 -
.../Nft/UnlonelyChannel/index.tsx | 120 -
.../Nft/UnlonelyNfc/Shimmer.tsx | 20 -
.../HeyOpenActions/Nft/UnlonelyNfc/index.tsx | 100 -
.../Nft/ZoraNft/Mint/Metadata.tsx | 60 -
.../Nft/ZoraNft/Mint/MintAction.tsx | 240 --
.../Nft/ZoraNft/Mint/MintedBy.tsx | 41 -
.../HeyOpenActions/Nft/ZoraNft/Mint/Price.tsx | 111 -
.../HeyOpenActions/Nft/ZoraNft/Mint/index.tsx | 66 -
.../HeyOpenActions/Nft/ZoraNft/Shimmer.tsx | 20 -
.../HeyOpenActions/Nft/ZoraNft/index.tsx | 157 --
.../Publication/HeyOpenActions/Nft/index.tsx | 60 -
.../UnknownModule/Tip/index.tsx | 2 +-
.../Publication/PublicationBody.tsx | 13 +-
.../components/Shared/Oembed/Nft/MintedBy.tsx | 37 +
.../components/Shared/Oembed/Nft/index.tsx | 65 +
.../src/components/Shared/Oembed/index.tsx | 5 +-
.../Shimmer/SmallUserProfileShimmer.tsx | 2 +-
.../components/Shared/SmallUserProfile.tsx | 8 +-
.../components/Shared/SmallWalletProfile.tsx | 57 -
.../src/hooks/basepaint/useBasePaintCanvas.ts | 38 -
apps/web/src/hooks/sound/useSoundRelease.ts | 41 -
.../src/hooks/unlonely/useUnlonelyChannel.ts | 38 -
apps/web/src/hooks/unlonely/useUnlonelyNfc.ts | 38 -
apps/web/src/hooks/usePublicationMetadata.ts | 13 -
apps/web/src/hooks/zora/useZoraNft.ts | 47 -
packages/abis/BasePaint.ts | 459 ----
packages/abis/FollowNft.ts | 394 ---
packages/abis/ZoraCreator1155Impl.ts | 2336 -----------------
packages/abis/ZoraERC721Drop.ts | 2271 ----------------
packages/abis/index.ts | 4 -
packages/data/contracts.ts | 4 -
packages/data/tracking.ts | 31 +-
packages/lib/getNftChainInfo.spec.ts | 78 +
...getZoraChainInfo.ts => getNftChainInfo.ts} | 35 +-
packages/lib/getPublicationData.ts | 6 +-
packages/lib/getZoraChainInfo.spec.ts | 106 -
packages/lib/nft/getBasePaintCanvas.spec.ts | 15 -
packages/lib/nft/getBasePaintCanvas.ts | 22 -
packages/lib/nft/getNft.spec.ts | 46 -
packages/lib/nft/getNft.ts | 58 -
packages/lib/nft/getSoundRelease.ts | 23 -
packages/lib/nft/getUnlonelyChannel.spec.ts | 15 -
packages/lib/nft/getUnlonelyChannel.ts | 22 -
packages/lib/nft/getUnlonelyNfc.spec.ts | 15 -
packages/lib/nft/getUnlonelyNfc.ts | 22 -
packages/lib/nft/getZoraChainIsMainnet.ts | 12 -
packages/lib/nft/getZoraNft.spec.ts | 40 -
packages/lib/nft/getZoraNft.ts | 33 -
packages/lib/removeUrlsByHostnames.spec.ts | 30 -
packages/lib/removeUrlsByHostnames.ts | 19 -
packages/types/misc.d.ts | 10 +-
packages/types/nft.d.ts | 131 -
76 files changed, 235 insertions(+), 8672 deletions(-)
delete mode 100644 apps/api/src/routes/nfts/basepaint/canvas.ts
delete mode 100644 apps/api/src/routes/nfts/sound/release.ts
delete mode 100644 apps/api/src/routes/nfts/unlonely/channel.ts
delete mode 100644 apps/api/src/routes/nfts/unlonely/nfc.ts
delete mode 100644 apps/api/src/routes/nfts/zora/nft.ts
delete mode 100644 apps/api/tests/nfts/basepaint/canvas.spec.ts
delete mode 100644 apps/api/tests/nfts/sound/release.spec.ts
delete mode 100644 apps/api/tests/nfts/unlonely/channel.spec.ts
delete mode 100644 apps/api/tests/nfts/unlonely/nfc.spec.ts
delete mode 100644 apps/api/tests/nfts/zora/nft.spec.ts
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/Metadata.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/MintAction.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/Price.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/index.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Shimmer.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/index.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/SoundRelease/Shimmer.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/SoundRelease/index.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyChannel/Shimmer.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyChannel/index.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyNfc/Shimmer.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyNfc/index.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/Metadata.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/MintAction.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/MintedBy.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/Price.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/index.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Shimmer.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/index.tsx
delete mode 100644 apps/web/src/components/Publication/HeyOpenActions/Nft/index.tsx
create mode 100644 apps/web/src/components/Shared/Oembed/Nft/MintedBy.tsx
create mode 100644 apps/web/src/components/Shared/Oembed/Nft/index.tsx
delete mode 100644 apps/web/src/components/Shared/SmallWalletProfile.tsx
delete mode 100644 apps/web/src/hooks/basepaint/useBasePaintCanvas.ts
delete mode 100644 apps/web/src/hooks/sound/useSoundRelease.ts
delete mode 100644 apps/web/src/hooks/unlonely/useUnlonelyChannel.ts
delete mode 100644 apps/web/src/hooks/unlonely/useUnlonelyNfc.ts
delete mode 100644 apps/web/src/hooks/zora/useZoraNft.ts
delete mode 100644 packages/abis/BasePaint.ts
delete mode 100644 packages/abis/FollowNft.ts
delete mode 100644 packages/abis/ZoraCreator1155Impl.ts
delete mode 100644 packages/abis/ZoraERC721Drop.ts
create mode 100644 packages/lib/getNftChainInfo.spec.ts
rename packages/lib/{getZoraChainInfo.ts => getNftChainInfo.ts} (51%)
delete mode 100644 packages/lib/getZoraChainInfo.spec.ts
delete mode 100644 packages/lib/nft/getBasePaintCanvas.spec.ts
delete mode 100644 packages/lib/nft/getBasePaintCanvas.ts
delete mode 100644 packages/lib/nft/getNft.spec.ts
delete mode 100644 packages/lib/nft/getNft.ts
delete mode 100644 packages/lib/nft/getSoundRelease.ts
delete mode 100644 packages/lib/nft/getUnlonelyChannel.spec.ts
delete mode 100644 packages/lib/nft/getUnlonelyChannel.ts
delete mode 100644 packages/lib/nft/getUnlonelyNfc.spec.ts
delete mode 100644 packages/lib/nft/getUnlonelyNfc.ts
delete mode 100644 packages/lib/nft/getZoraChainIsMainnet.ts
delete mode 100644 packages/lib/nft/getZoraNft.spec.ts
delete mode 100644 packages/lib/nft/getZoraNft.ts
delete mode 100644 packages/lib/removeUrlsByHostnames.spec.ts
delete mode 100644 packages/lib/removeUrlsByHostnames.ts
delete mode 100644 packages/types/nft.d.ts
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 08ef5edfd883..78137e21768e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -95,7 +95,6 @@ jobs:
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
IRYS_PRIVATE_KEY: ${{ secrets.IRYS_PRIVATE_KEY }}
IMAGEKIT_URL: ${{ secrets.IMAGEKIT_URL }}
- SOUND_API_KEY: ${{ secrets.SOUND_API_KEY }}
run: |
cd apps/api
{
@@ -109,7 +108,6 @@ jobs:
echo "GOOGLE_API_KEY=${GOOGLE_API_KEY}"
echo "IRYS_PRIVATE_KEY=${IRYS_PRIVATE_KEY}"
echo "IMAGEKIT_URL=${IMAGEKIT_URL}"
- echo "SOUND_API_KEY=${SOUND_API_KEY}"
} > .env
cd ../..
pnpm test:e2e
diff --git a/apps/api/.env.example b/apps/api/.env.example
index d28f7f8c2868..1bd6b8d80b38 100644
--- a/apps/api/.env.example
+++ b/apps/api/.env.example
@@ -10,4 +10,3 @@ IRYS_PRIVATE_KEY=""
IMAGEKIT_URL=""
ZENDESK_API_KEY=""
RAILWAY_TOKEN=""
-SOUND_API_KEY=""
diff --git a/apps/api/src/routes/nfts/basepaint/canvas.ts b/apps/api/src/routes/nfts/basepaint/canvas.ts
deleted file mode 100644
index 12970106d46c..000000000000
--- a/apps/api/src/routes/nfts/basepaint/canvas.ts
+++ /dev/null
@@ -1,84 +0,0 @@
-import type { Handler } from 'express';
-
-import catchedError from '@utils/catchedError';
-import { SWR_CACHE_AGE_1_MIN_30_DAYS } from '@utils/constants';
-import { noBody } from '@utils/responses';
-
-export const get: Handler = async (req, res) => {
- const { id } = req.query;
-
- if (!id) {
- return noBody(res);
- }
-
- try {
- const allResponses = await Promise.all([
- fetch('https://ponder.basepaint.xyz', {
- body: JSON.stringify({
- operationName: 'Canvas',
- query: `
- query Canvas($id: Int!) {
- canvass(first: 1, orderDirection: "ASC") {
- id
- }
- canvas(id: $id) {
- id
- totalEarned
- totalMints
- pixelsCount
- contributions(first: 1000, orderBy: "pixelsCount", orderDirection: "ASC") {
- id
- }
- }
- }
- `,
- variables: {
- id: parseInt(id as string)
- }
- }),
- headers: {
- 'Content-Type': 'application/json',
- 'User-agent': 'Hey.xyz'
- },
- method: 'POST'
- }),
- fetch(
- `https://basepaint.art/api/trpc/themes.theme?batch=1&input=${encodeURIComponent(
- JSON.stringify({ 0: { json: { day: parseInt(id as string) } } })
- )}`
- )
- ]);
-
- const canvas: {
- data: {
- canvas: any;
- canvass: { id: number }[];
- };
- } = await allResponses[0].json();
- const numberId = parseInt(id as string);
- const currentCanvas = canvas.data.canvass[0].id;
-
- const themes: {
- result: { data: { json: { palette: string[]; theme: string } } };
- }[] = await allResponses[1].json();
-
- const { palette, theme } = themes[0].result.data.json;
-
- return res
- .status(200)
- .setHeader('Cache-Control', SWR_CACHE_AGE_1_MIN_30_DAYS)
- .json({
- canvas:
- {
- canContribute: currentCanvas === numberId,
- canMint: currentCanvas - 1 === numberId,
- palette,
- theme,
- ...canvas.data.canvas
- } || null,
- success: true
- });
- } catch (error) {
- return catchedError(res, error);
- }
-};
diff --git a/apps/api/src/routes/nfts/sound/release.ts b/apps/api/src/routes/nfts/sound/release.ts
deleted file mode 100644
index a5b295e248f8..000000000000
--- a/apps/api/src/routes/nfts/sound/release.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-import type { Handler } from 'express';
-
-import logger from '@hey/lib/logger';
-import catchedError from '@utils/catchedError';
-import { SWR_CACHE_AGE_1_MIN_30_DAYS } from '@utils/constants';
-import { noBody } from '@utils/responses';
-
-export const get: Handler = async (req, res) => {
- const { handle, slug } = req.query;
-
- if (!handle || !slug) {
- return noBody(res);
- }
-
- try {
- const soundResponse = await fetch('https://api.sound.xyz/graphql', {
- body: JSON.stringify({
- operationName: 'MintedRelease',
- query: `
- query MintedRelease($releaseSlug: String!, $soundHandle: String!) {
- mintedRelease(releaseSlug: $releaseSlug, soundHandle: $soundHandle) {
- title
- numSold
- coverImage {
- url
- dominantColor
- }
- track {
- normalizedPeaks
- audio {
- audio256k {
- url
- }
- }
- }
- artist {
- name
- user {
- avatar {
- url
- }
- }
- }
- }
- }
- `,
- variables: { releaseSlug: slug, soundHandle: handle }
- }),
- headers: {
- 'Content-Type': 'application/json',
- 'User-agent': 'Hey.xyz',
- 'X-Sound-Client-Key': process.env.SOUND_API_KEY!
- },
- method: 'POST'
- });
- const release: { data: { mintedRelease: any } } =
- await soundResponse.json();
-
- logger.info('Release fetched from Sound.xyz');
-
- return res
- .status(200)
- .setHeader('Cache-Control', SWR_CACHE_AGE_1_MIN_30_DAYS)
- .json({
- release: release.data.mintedRelease,
- success: true
- });
- } catch (error) {
- return catchedError(res, error);
- }
-};
diff --git a/apps/api/src/routes/nfts/unlonely/channel.ts b/apps/api/src/routes/nfts/unlonely/channel.ts
deleted file mode 100644
index a0c33cd5ffd7..000000000000
--- a/apps/api/src/routes/nfts/unlonely/channel.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-import type { Handler } from 'express';
-
-import logger from '@hey/lib/logger';
-import catchedError from '@utils/catchedError';
-import { SWR_CACHE_AGE_1_MIN_30_DAYS } from '@utils/constants';
-import { noBody } from '@utils/responses';
-
-export const get: Handler = async (req, res) => {
- const { slug } = req.query;
-
- if (!slug) {
- return noBody(res);
- }
-
- try {
- const unlonelyResponse = await fetch(
- 'https://unlonely-vqeii.ondigitalocean.app/graphql',
- {
- body: JSON.stringify({
- operationName: 'GetChannelBySlug',
- query: `
- query GetChannelBySlug($slug: String!) {
- getChannelBySlug(slug: $slug) {
- id
- slug
- name
- description
- playbackUrl
- isLive
- }
- }
- `,
- variables: { slug }
- }),
- headers: {
- 'Content-Type': 'application/json',
- 'User-agent': 'Hey.xyz'
- },
- method: 'POST'
- }
- );
- const channel: {
- data: { getChannelBySlug: any };
- } = await unlonelyResponse.json();
- logger.info('Channel fetched from Unlonely');
-
- return res
- .status(200)
- .setHeader('Cache-Control', SWR_CACHE_AGE_1_MIN_30_DAYS)
- .json({
- channel: channel.data.getChannelBySlug,
- success: true
- });
- } catch (error) {
- return catchedError(res, error);
- }
-};
diff --git a/apps/api/src/routes/nfts/unlonely/nfc.ts b/apps/api/src/routes/nfts/unlonely/nfc.ts
deleted file mode 100644
index f4c83d475747..000000000000
--- a/apps/api/src/routes/nfts/unlonely/nfc.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import type { Handler } from 'express';
-
-import logger from '@hey/lib/logger';
-import catchedError from '@utils/catchedError';
-import { SWR_CACHE_AGE_1_MIN_30_DAYS } from '@utils/constants';
-import { noBody } from '@utils/responses';
-
-export const get: Handler = async (req, res) => {
- const { id } = req.query;
-
- if (!id) {
- return noBody(res);
- }
-
- try {
- const unlonelyResponse = await fetch(
- 'https://unlonely-vqeii.ondigitalocean.app/graphql',
- {
- body: JSON.stringify({
- operationName: 'GetNFC',
- query: `
- query GetNFC($id: ID!) {
- getNFC(id: $id) {
- id
- createdAt
- videoLink
- videoThumbnail
- openseaLink
- title
- owner {
- username
- FCImageUrl
- lensImageUrl
- }
- }
- }
- `,
- variables: { id }
- }),
- headers: {
- 'Content-Type': 'application/json',
- 'User-agent': 'Hey.xyz'
- },
- method: 'POST'
- }
- );
- const nfc: {
- data: { getNFC: any };
- } = await unlonelyResponse.json();
- logger.info('NFC fetched from Unlonely');
-
- return res
- .status(200)
- .setHeader('Cache-Control', SWR_CACHE_AGE_1_MIN_30_DAYS)
- .json({
- nfc: nfc.data.getNFC,
- success: true
- });
- } catch (error) {
- return catchedError(res, error);
- }
-};
diff --git a/apps/api/src/routes/nfts/zora/nft.ts b/apps/api/src/routes/nfts/zora/nft.ts
deleted file mode 100644
index fe86c87d98ae..000000000000
--- a/apps/api/src/routes/nfts/zora/nft.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import type { Handler } from 'express';
-
-import logger from '@hey/lib/logger';
-import getZoraChainIsMainnet from '@hey/lib/nft/getZoraChainIsMainnet';
-import catchedError from '@utils/catchedError';
-import { SWR_CACHE_AGE_10_MINS_30_DAYS } from '@utils/constants';
-import { noBody } from '@utils/responses';
-import urlcat from 'urlcat';
-
-export const get: Handler = async (req, res) => {
- const { address, chain, token } = req.query;
-
- if (!chain || !address) {
- return noBody(res);
- }
-
- try {
- const network = getZoraChainIsMainnet(chain as string) ? '' : 'testnet.';
- const zoraResponse = await fetch(
- urlcat(
- `https://${network}zora.co/api/personalize/collection/:chain::address/:token`,
- { address, chain, token: token || 0 }
- )
- );
- const nft: { collection: any } = await zoraResponse.json();
- logger.info(`Nft fetched from Zora ${chain}/${address}:${token}`);
-
- return res
- .status(200)
- .setHeader('Cache-Control', SWR_CACHE_AGE_10_MINS_30_DAYS)
- .json({ nft: nft.collection || null, success: true });
- } catch (error) {
- return catchedError(res, error);
- }
-};
diff --git a/apps/api/src/utils/oembed/meta/getNft.ts b/apps/api/src/utils/oembed/meta/getNft.ts
index 202a1c7fef8b..27b963e833c8 100644
--- a/apps/api/src/utils/oembed/meta/getNft.ts
+++ b/apps/api/src/utils/oembed/meta/getNft.ts
@@ -18,10 +18,10 @@ const getNft = (document: Document, url: string): Nft | null => {
document.querySelector('meta[name="nft:chain"]') ||
document.querySelector('meta[property="nft:chain"]');
const mediaUrl =
- document.querySelector('meta[name="eth:nft:media_url"]') ||
- document.querySelector('meta[property="eth:nft:media_url"]') ||
document.querySelector('meta[name="og:image"]') ||
- document.querySelector('meta[property="og:image"]');
+ document.querySelector('meta[property="og:image"]') ||
+ document.querySelector('meta[name="eth:nft:media_url"]') ||
+ document.querySelector('meta[property="eth:nft:media_url"]');
const mintCount =
document.querySelector('meta[name="eth:nft:mint_count"]') ||
document.querySelector('meta[property="eth:nft:mint_count"]');
@@ -38,27 +38,31 @@ const getNft = (document: Document, url: string): Nft | null => {
document.querySelector('meta[name="eth:nft:endtime"]') ||
document.querySelector('meta[property="eth:nft:endtime"]');
- const processedCollectionName =
- collectionName?.getAttribute('content') || null;
- const processedContractAddress =
- contractAddress?.getAttribute('content') || null;
- const processedCreatorAddress =
- creatorAddress?.getAttribute('content') || null;
+ const processedCollectionName = collectionName?.getAttribute(
+ 'content'
+ ) as string;
+ const processedContractAddress = contractAddress?.getAttribute(
+ 'content'
+ ) as `0x${string}`;
+ const processedCreatorAddress = creatorAddress?.getAttribute(
+ 'content'
+ ) as `0x${string}`;
const processedChain = chain?.getAttribute('content') || null;
- const processedMediaUrl = mediaUrl?.getAttribute('content') || null;
+ const processedMediaUrl = mediaUrl?.getAttribute('content') as string;
const processedMintCount = mintCount?.getAttribute('content')
? Number(mintCount?.getAttribute('content'))
: null;
const processedMintStatus = mintStatus?.getAttribute('content') || null;
const processedMintUrl = mintUrl?.getAttribute('content') || null;
- const processedSchema = schema?.getAttribute('content') || null;
+ const processedSchema = schema?.getAttribute('content') as string;
const processedEndTime = endTime?.getAttribute('content') || null;
if (
!processedCollectionName &&
!processedContractAddress &&
!processedCreatorAddress &&
- !processedSchema
+ !processedSchema &&
+ !processedMediaUrl
) {
return null;
}
diff --git a/apps/api/tests/nfts/basepaint/canvas.spec.ts b/apps/api/tests/nfts/basepaint/canvas.spec.ts
deleted file mode 100644
index 35fa6ebebb0f..000000000000
--- a/apps/api/tests/nfts/basepaint/canvas.spec.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { TEST_URL } from '@utils/constants';
-import axios from 'axios';
-import { describe, expect, test } from 'vitest';
-
-describe('nfts/basepaint/canvas', async () => {
- test('should return basepaint canvas', async () => {
- const response = await axios.get(`${TEST_URL}/nfts/basepaint/canvas`, {
- params: { id: 44 }
- });
-
- expect(response.data.canvas.canContribute).toBeFalsy();
- expect(response.data.canvas.theme).toEqual('Lens Garden');
- expect(response.data.canvas.contributions).toHaveLength(645);
- });
-});
diff --git a/apps/api/tests/nfts/sound/release.spec.ts b/apps/api/tests/nfts/sound/release.spec.ts
deleted file mode 100644
index 606f72259df0..000000000000
--- a/apps/api/tests/nfts/sound/release.spec.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { TEST_URL } from '@utils/constants';
-import axios from 'axios';
-import { describe, expect, test } from 'vitest';
-
-describe('nfts/sound/release', async () => {
- test('should return sound nft', async () => {
- const response = await axios.get(`${TEST_URL}/nfts/sound/release`, {
- params: { handle: 'annikarose', slug: 'just-like-you' }
- });
-
- expect(response.data.release.title).toEqual('Just Like You');
- });
-});
diff --git a/apps/api/tests/nfts/unlonely/channel.spec.ts b/apps/api/tests/nfts/unlonely/channel.spec.ts
deleted file mode 100644
index f516701fc419..000000000000
--- a/apps/api/tests/nfts/unlonely/channel.spec.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { TEST_URL } from '@utils/constants';
-import axios from 'axios';
-import { describe, expect, test } from 'vitest';
-
-describe('nfts/unlonely/channel', async () => {
- test('should return unlonely channel', async () => {
- const response = await axios.get(`${TEST_URL}/nfts/unlonely/channel`, {
- params: { slug: 'pixelnunc' }
- });
-
- expect(response.data.channel.id).toEqual('145');
- expect(response.data.channel.slug).toEqual('pixelnunc');
- });
-});
diff --git a/apps/api/tests/nfts/unlonely/nfc.spec.ts b/apps/api/tests/nfts/unlonely/nfc.spec.ts
deleted file mode 100644
index a10077738445..000000000000
--- a/apps/api/tests/nfts/unlonely/nfc.spec.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { TEST_URL } from '@utils/constants';
-import axios from 'axios';
-import { describe, expect, test } from 'vitest';
-
-describe('nfts/unlonely/nfc', async () => {
- test('should return unlonely nfc', async () => {
- const response = await axios.get(`${TEST_URL}/nfts/unlonely/nfc`, {
- params: { id: 700 }
- });
-
- expect(response.data.nfc.id).toEqual('700');
- expect(response.data.nfc.title).toEqual('supercast is cool');
- });
-});
diff --git a/apps/api/tests/nfts/zora/nft.spec.ts b/apps/api/tests/nfts/zora/nft.spec.ts
deleted file mode 100644
index b9691e0e9ec6..000000000000
--- a/apps/api/tests/nfts/zora/nft.spec.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { TEST_URL } from '@utils/constants';
-import axios from 'axios';
-import { describe, expect, test } from 'vitest';
-
-describe('nfts/zora/nft', async () => {
- test('should return zora nft without token', async () => {
- const response = await axios.get(`${TEST_URL}/nfts/zora/nft`, {
- params: {
- address: '0x84021385852ac3660d847af215098a1ef1b1b5ed',
- chain: 'zora'
- }
- });
-
- expect(response.data.nft.contract.name).toEqual('Net AIrt');
- });
-
- test('should return zora nft with token', async () => {
- const response = await axios.get(`${TEST_URL}/nfts/zora/nft`, {
- params: {
- address: '0x84021385852ac3660d847af215098a1ef1b1b5ed',
- chain: 'zora',
- token: 1
- }
- });
-
- expect(response.data.nft.name).toEqual('Hyperpop Bytes');
- });
-});
diff --git a/apps/web/src/components/Common/Providers/Web3Provider.tsx b/apps/web/src/components/Common/Providers/Web3Provider.tsx
index 7da19695ab6f..c1dcca636157 100644
--- a/apps/web/src/components/Common/Providers/Web3Provider.tsx
+++ b/apps/web/src/components/Common/Providers/Web3Provider.tsx
@@ -2,18 +2,7 @@ import type { FC, ReactNode } from 'react';
import { APP_NAME, WALLETCONNECT_PROJECT_ID } from '@hey/data/constants';
import { createConfig, http, WagmiProvider } from 'wagmi';
-import {
- base,
- baseGoerli,
- goerli,
- mainnet,
- optimism,
- optimismGoerli,
- polygon,
- polygonMumbai,
- zora,
- zoraTestnet
-} from 'wagmi/chains';
+import { polygon, polygonMumbai } from 'wagmi/chains';
import { coinbaseWallet, injected, walletConnect } from 'wagmi/connectors';
const connectors = [
@@ -23,30 +12,11 @@ const connectors = [
];
const wagmiConfig = createConfig({
- chains: [
- base,
- baseGoerli,
- goerli,
- mainnet,
- optimism,
- optimismGoerli,
- polygon,
- polygonMumbai,
- zora,
- zoraTestnet
- ],
+ chains: [polygon, polygonMumbai],
connectors,
transports: {
- [base.id]: http(),
- [baseGoerli.id]: http(),
- [goerli.id]: http(),
- [mainnet.id]: http(),
- [optimism.id]: http(),
- [optimismGoerli.id]: http(),
[polygon.id]: http(),
- [polygonMumbai.id]: http(),
- [zora.id]: http(),
- [zoraTestnet.id]: http()
+ [polygonMumbai.id]: http()
}
});
diff --git a/apps/web/src/components/Composer/LinkPreviews.tsx b/apps/web/src/components/Composer/LinkPreviews.tsx
index 1130f2e30434..0f9a7ac42825 100644
--- a/apps/web/src/components/Composer/LinkPreviews.tsx
+++ b/apps/web/src/components/Composer/LinkPreviews.tsx
@@ -1,10 +1,7 @@
import type { FC } from 'react';
-import Nft from '@components/Publication/HeyOpenActions/Nft';
import Oembed from '@components/Shared/Oembed';
-import { ZERO_PUBLICATION_ID } from '@hey/data/constants';
import getURLs from '@hey/lib/getURLs';
-import getNft from '@hey/lib/nft/getNft';
import { usePublicationStore } from 'src/store/non-persisted/publication/usePublicationStore';
const LinkPreviews: FC = () => {
@@ -18,20 +15,6 @@ const LinkPreviews: FC = () => {
return null;
}
- const nft = getNft(urls);
-
- if (nft) {
- return (
-
- {nft ? (
-
- ) : (
-
- )}
-
- );
- }
-
return ;
};
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/Metadata.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/Metadata.tsx
deleted file mode 100644
index f519c97e7aea..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/Metadata.tsx
+++ /dev/null
@@ -1,64 +0,0 @@
-import type { BasePaintCanvas } from '@hey/types/nft';
-import type { FC } from 'react';
-
-import {
- CurrencyDollarIcon,
- PaintBrushIcon,
- QrCodeIcon,
- SwatchIcon,
- UsersIcon
-} from '@heroicons/react/24/outline';
-import humanize from '@hey/lib/humanize';
-import { formatEther } from 'viem';
-
-interface MetadataProps {
- canvas: BasePaintCanvas;
-}
-
-const Metadata: FC = ({ canvas }) => {
- const { contributions, pixelsCount, totalEarned, totalMints } = canvas;
-
- return (
-
- {totalMints > 0 ? (
-
-
- {humanize(totalMints)} minted
-
- ) : null}
-
-
-
- {contributions.length > 1000 ? '1000+' : contributions.length} artists
-
-
- {pixelsCount > 0 ? (
-
-
- {humanize(pixelsCount)} pixels used
-
- ) : null}
- {totalEarned ? (
-
-
- {formatEther(BigInt(totalEarned))} ETH earned
-
- ) : null}
-
-
-
Color Palette
-
- {canvas.palette.map((color) => (
-
- ))}
-
-
-
- );
-};
-
-export default Metadata;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/MintAction.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/MintAction.tsx
deleted file mode 100644
index 37a66425a9e1..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/MintAction.tsx
+++ /dev/null
@@ -1,171 +0,0 @@
-import type { BasePaintCanvas } from '@hey/types/nft';
-import type { FC } from 'react';
-
-import WalletSelector from '@components/Shared/Login/WalletSelector';
-import SwitchNetwork from '@components/Shared/SwitchNetwork';
-import {
- CurrencyDollarIcon,
- CursorArrowRaysIcon
-} from '@heroicons/react/24/outline';
-import { CheckCircleIcon } from '@heroicons/react/24/solid';
-import { BasePaint } from '@hey/abis';
-import { Errors } from '@hey/data';
-import { BASEPAINT_CONTRACT } from '@hey/data/contracts';
-import { PUBLICATION } from '@hey/data/tracking';
-import { Button, Spinner } from '@hey/ui';
-import { Leafwatch } from '@lib/leafwatch';
-import Link from 'next/link';
-import toast from 'react-hot-toast';
-import { useUpdateEffect } from 'usehooks-ts';
-import { parseEther } from 'viem';
-import { base } from 'viem/chains';
-import {
- useAccount,
- useChainId,
- useSimulateContract,
- useWaitForTransactionReceipt,
- useWriteContract
-} from 'wagmi';
-
-import { useBasePaintMintStore } from '.';
-
-const NO_BALANCE_ERROR = 'exceeds the balance of the account';
-
-interface MintActionProps {
- canvas: BasePaintCanvas;
- openEditionPrice: number;
- publicationId: string;
-}
-
-const MintAction: FC = ({
- canvas,
- openEditionPrice,
- publicationId
-}) => {
- const quantity = useBasePaintMintStore((state) => state.quantity);
-
- const chain = useChainId();
- const { isDisconnected } = useAccount();
-
- const nftAddress = BASEPAINT_CONTRACT;
- const day = canvas.id;
- const value = parseEther(openEditionPrice.toString()) * BigInt(quantity);
-
- const {
- data: simulateData,
- error: simulateError,
- failureCount: simulateFailureCount
- } = useSimulateContract({
- abi: BasePaint,
- address: nftAddress,
- args: [day, quantity],
- chainId: base.id,
- functionName: 'mint',
- value
- });
-
- const {
- data: writeHash,
- isPending: isContractWriteLoading,
- writeContract
- } = useWriteContract();
-
- const write = () => {
- if (!simulateData) {
- return toast.error(Errors.SomethingWentWrong);
- }
-
- return writeContract(simulateData.request);
- };
-
- const {
- data: txnData,
- isLoading,
- isSuccess
- } = useWaitForTransactionReceipt({
- chainId: base.id,
- hash: writeHash
- });
-
- useUpdateEffect(() => {
- if (txnData?.transactionHash) {
- Leafwatch.track(PUBLICATION.OPEN_ACTIONS.BASEPAINT_NFT.MINT, {
- nft: nftAddress,
- price: openEditionPrice * quantity,
- publication_id: publicationId,
- quantity
- });
- }
- }, [isSuccess]);
-
- const isSimulateError = simulateFailureCount > 0;
- const mintingOrSuccess = isLoading || isSuccess;
-
- // Errors
- const noBalanceError = simulateError?.message?.includes(NO_BALANCE_ERROR);
-
- return !mintingOrSuccess ? (
-
- {isDisconnected ? (
-
-
-
- ) : chain !== base.id ? (
-
- ) : isSimulateError ? (
- noBalanceError ? (
-
-
}
- size="md"
- >
- You don't have balance
-
-
- ) : null
- ) : (
-
- ) : (
-
- )
- }
- onClick={() => write()}
- >
- Mint
-
- )}
-
- ) : (
-
- {isLoading ? (
-
-
-
Minting in progress
-
- ) : null}
- {isSuccess ? (
-
- ) : null}
-
- );
-};
-
-export default MintAction;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/Price.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/Price.tsx
deleted file mode 100644
index 4380948096c7..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/Price.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-import type { FC } from 'react';
-
-import { MinusIcon, PlusIcon } from '@heroicons/react/24/outline';
-import getRedstonePrice from '@hey/lib/getRedstonePrice';
-import { useQuery } from '@tanstack/react-query';
-
-import { useBasePaintMintStore } from '.';
-
-interface PriceProps {
- openEditionPrice: number;
-}
-
-const Price: FC = ({ openEditionPrice }) => {
- const quantity = useBasePaintMintStore((state) => state.quantity);
- const setQuantity = useBasePaintMintStore((state) => state.setQuantity);
-
- const { data: usdPrice, isLoading } = useQuery({
- enabled: Boolean(openEditionPrice),
- queryFn: async () => await getRedstonePrice('ETH'),
- queryKey: ['getRedstonePrice']
- });
-
- if (isLoading) {
- return null;
- }
-
- const priceInEth = quantity * openEditionPrice;
- const priceInUsd = usdPrice * priceInEth;
-
- return (
-
-
-
-
-
-
{priceInEth.toFixed(3)}
-
ETH
-
-
- ≈ ${priceInUsd.toFixed(2)} USD
-
-
-
-
-
{quantity}
-
-
-
-
- );
-};
-
-export default Price;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/index.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/index.tsx
deleted file mode 100644
index 10d4e59cc199..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Mint/index.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import type { BasePaintCanvas } from '@hey/types/nft';
-import type { FC } from 'react';
-
-import { BasePaint } from '@hey/abis';
-import { BASEPAINT_CONTRACT } from '@hey/data/contracts';
-import { formatEther } from 'viem';
-import { base } from 'viem/chains';
-import { useContractRead } from 'wagmi';
-import { create } from 'zustand';
-
-import Metadata from './Metadata';
-import MintAction from './MintAction';
-import Price from './Price';
-
-interface BasePaintMintState {
- quantity: number;
- setQuantity: (quantity: number) => void;
-}
-
-export const useBasePaintMintStore = create((set) => ({
- quantity: 1,
- setQuantity: (quantity) => set({ quantity })
-}));
-
-interface MintProps {
- canvas: BasePaintCanvas;
- publicationId: string;
-}
-
-const Mint: FC = ({ canvas, publicationId }) => {
- const { data, isSuccess } = useContractRead({
- abi: BasePaint,
- address: BASEPAINT_CONTRACT,
- chainId: base.id,
- functionName: 'openEditionPrice'
- });
-
- const openEditionPrice = parseInt(data?.toString() || '0');
- const etherPrice = parseFloat(formatEther(BigInt(openEditionPrice)));
-
- return (
-
-
-
- Day #{canvas.id}: {canvas.theme}
-
-
-
- {isSuccess ? (
- <>
-
-
- >
- ) : null}
-
- );
-};
-
-export default Mint;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Shimmer.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Shimmer.tsx
deleted file mode 100644
index 47122cf3f619..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/Shimmer.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import type { FC } from 'react';
-
-import { Card } from '@hey/ui';
-
-const NftShimmer: FC = () => {
- return (
-
-
-
-
- );
-};
-
-export default NftShimmer;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/index.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/index.tsx
deleted file mode 100644
index 3ea461b389be..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/BasePaintCanvas/index.tsx
+++ /dev/null
@@ -1,168 +0,0 @@
-import type { BasePaintCanvasMetadata } from '@hey/types/nft';
-import type { FC } from 'react';
-
-import { CursorArrowRaysIcon } from '@heroicons/react/24/outline';
-import { STATIC_IMAGES_URL } from '@hey/data/constants';
-import { BASEPAINT_CONTRACT } from '@hey/data/contracts';
-import { PUBLICATION } from '@hey/data/tracking';
-import stopEventPropagation from '@hey/lib/stopEventPropagation';
-import { Button, Card, Modal, Tooltip } from '@hey/ui';
-import { Leafwatch } from '@lib/leafwatch';
-import Link from 'next/link';
-import { useState } from 'react';
-import useBasePaintCanvas from 'src/hooks/basepaint/useBasePaintCanvas';
-import urlcat from 'urlcat';
-
-import Mint, { useBasePaintMintStore } from './Mint';
-import NftShimmer from './Shimmer';
-
-interface BasePaintCanvasProps {
- nftMetadata: BasePaintCanvasMetadata;
- publicationId: string;
-}
-
-const BasePaintCanvas: FC = ({
- nftMetadata,
- publicationId
-}) => {
- const { id } = nftMetadata;
- const [showMintModal, setShowMintModal] = useState(false);
- const setQuantity = useBasePaintMintStore((state) => state.setQuantity);
-
- const {
- data: canvas,
- error,
- loading
- } = useBasePaintCanvas({
- enabled: Boolean(id),
- id
- });
-
- if (loading) {
- return ;
- }
-
- if (!canvas?.bitmap) {
- return null;
- }
-
- if (error) {
- return null;
- }
-
- const { bitmap, canContribute, canMint, theme } = canvas;
-
- return (
- stopEventPropagation(event)}
- >
-
-
-
-
-
-
-
- Day #{canvas.id}: {theme}
-
-
- {canvas.palette.map((color) => (
-
- ))}
-
-
- {publicationId ? (
- canMint ? (
- <>
-
}
- onClick={() => {
- setQuantity(1);
- setShowMintModal(true);
- Leafwatch.track(
- PUBLICATION.OPEN_ACTIONS.BASEPAINT_NFT.OPEN_MINT,
- { publication_id: publicationId }
- );
- }}
- size="md"
- >
- Mint
-
-
}
- onClose={() => setShowMintModal(false)}
- show={showMintModal}
- title="Mint on BasePaint"
- >
-
-
- >
- ) : canContribute ? (
-
-
}
- onClick={() =>
- Leafwatch.track(
- PUBLICATION.OPEN_ACTIONS.BASEPAINT_NFT.OPEN_LINK,
- { from: 'mint_embed', publication_id: publicationId }
- )
- }
- size="md"
- >
- Contribute
-
-
- ) : (
-
-
}
- onClick={() =>
- Leafwatch.track(
- PUBLICATION.OPEN_ACTIONS.BASEPAINT_NFT.OPEN_OPENSEA_LINK,
- { from: 'mint_embed', publication_id: publicationId }
- )
- }
- size="md"
- >
- View on OpenSea
-
-
- )
- ) : (
-
- )}
-
-
- );
-};
-
-export default BasePaintCanvas;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/SoundRelease/Shimmer.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/SoundRelease/Shimmer.tsx
deleted file mode 100644
index 8c75927dcce7..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/SoundRelease/Shimmer.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import type { FC } from 'react';
-
-import { Card } from '@hey/ui';
-
-const NftShimmer: FC = () => {
- return (
-
-
-
-
- );
-};
-
-export default NftShimmer;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/SoundRelease/index.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/SoundRelease/index.tsx
deleted file mode 100644
index 85980f64fa98..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/SoundRelease/index.tsx
+++ /dev/null
@@ -1,196 +0,0 @@
-import type { SoundReleaseMetadata } from '@hey/types/nft';
-import type { APITypes } from 'plyr-react';
-
-import Player from '@components/Shared/Audio/Player';
-import {
- CursorArrowRaysIcon,
- PauseIcon,
- PlayIcon
-} from '@heroicons/react/24/solid';
-import { REWARDS_ADDRESS, STATIC_IMAGES_URL } from '@hey/data/constants';
-import { PUBLICATION } from '@hey/data/tracking';
-import humanize from '@hey/lib/humanize';
-import stopEventPropagation from '@hey/lib/stopEventPropagation';
-import { Button, Card, Image, Tooltip } from '@hey/ui';
-import { Leafwatch } from '@lib/leafwatch';
-import Link from 'next/link';
-import { type FC, useRef, useState } from 'react';
-import useSoundRelease from 'src/hooks/sound/useSoundRelease';
-import urlcat from 'urlcat';
-
-import NftShimmer from './Shimmer';
-
-interface SoundReleaseProps {
- nftMetadata: SoundReleaseMetadata;
- publicationId: string;
-}
-
-const SoundRelease: FC = ({
- nftMetadata,
- publicationId
-}) => {
- const { handle, mintLink, slug } = nftMetadata;
- const [playing, setPlaying] = useState(false);
- const playerRef = useRef(null);
-
- const {
- data: release,
- error,
- loading
- } = useSoundRelease({
- enabled: Boolean(handle && slug),
- handle,
- slug
- });
-
- if (loading) {
- return ;
- }
-
- if (!release) {
- return null;
- }
-
- if (error) {
- return null;
- }
-
- const handlePlayPause = () => {
- if (!playerRef.current) {
- return;
- }
- if (playerRef.current?.plyr.paused && !playing) {
- setPlaying(true);
- Leafwatch.track(PUBLICATION.OPEN_ACTIONS.SOUND_RELEASE.PLAY, {
- publication_id: publicationId
- });
-
- return playerRef.current?.plyr.play();
- }
- setPlaying(false);
- playerRef.current?.plyr.pause();
- Leafwatch.track(PUBLICATION.OPEN_ACTIONS.SOUND_RELEASE.PAUSE, {
- publication_id: publicationId
- });
- };
-
- const { artist, coverImage, numSold, title, track } = release;
- const peaks = track.normalizedPeaks?.reduce(
- (acc: number[], curr: number, index) => {
- if (index % 10 === 0) {
- acc.push(curr / 2);
- }
-
- return acc;
- },
- []
- );
-
- return (
- stopEventPropagation(event)}
- >
-
-
-
-
-
-
-
-
-
-
{title}
-
-
-
{artist.name}
- •
- {humanize(numSold)} Mints
-
-
-
-
-
-
-
-
- {peaks?.map((peak, index) => (
-
- ))}
-
-
-
-
-
-
-
-
-
{title}
-
-
-
}
- onClick={() =>
- Leafwatch.track(
- PUBLICATION.OPEN_ACTIONS.SOUND_RELEASE.OPEN_LINK,
- { from: 'mint_embed', publication_id: publicationId }
- )
- }
- size="md"
- >
- Open
-
-
-
-
- );
-};
-
-export default SoundRelease;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyChannel/Shimmer.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyChannel/Shimmer.tsx
deleted file mode 100644
index 958831949165..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyChannel/Shimmer.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import type { FC } from 'react';
-
-import { Card } from '@hey/ui';
-
-const NftShimmer: FC = () => {
- return (
-
-
-
-
- );
-};
-
-export default NftShimmer;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyChannel/index.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyChannel/index.tsx
deleted file mode 100644
index 676887e06f3d..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyChannel/index.tsx
+++ /dev/null
@@ -1,120 +0,0 @@
-import type { UnlonelyChannelMetadata } from '@hey/types/nft';
-import type { FC } from 'react';
-
-import Video from '@components/Shared/Video';
-import {
- CursorArrowRaysIcon,
- SignalIcon,
- SignalSlashIcon
-} from '@heroicons/react/24/outline';
-import { STATIC_IMAGES_URL } from '@hey/data/constants';
-import { PUBLICATION } from '@hey/data/tracking';
-import stopEventPropagation from '@hey/lib/stopEventPropagation';
-import { Button, Card, Tooltip } from '@hey/ui';
-import cn from '@hey/ui/cn';
-import { Leafwatch } from '@lib/leafwatch';
-import Link from 'next/link';
-import useUnlonelyChannel from 'src/hooks/unlonely/useUnlonelyChannel';
-import urlcat from 'urlcat';
-
-import NftShimmer from './Shimmer';
-
-interface UnlonelyChannelProps {
- nftMetadata: UnlonelyChannelMetadata;
- publicationId: string;
-}
-
-const UnlonelyChannel: FC = ({
- nftMetadata,
- publicationId
-}) => {
- const { slug } = nftMetadata;
-
- const {
- data: channel,
- error,
- loading
- } = useUnlonelyChannel({
- enabled: Boolean(slug),
- slug
- });
-
- if (loading) {
- return ;
- }
-
- if (!channel) {
- return null;
- }
-
- if (error) {
- return null;
- }
-
- const { isLive, name, playbackUrl } = channel;
-
- return (
- stopEventPropagation(event)}
- >
-
-
-
-
-
-
-
{name}
-
- {isLive ? (
-
- ) : (
-
- )}
- {isLive ? 'Live' : 'Offline'}
-
-
- {publicationId ? (
-
-
}
- onClick={() =>
- Leafwatch.track(
- PUBLICATION.OPEN_ACTIONS.UNLONELY_CHANNEL.OPEN_LINK,
- { from: 'mint_embed', publication_id: publicationId }
- )
- }
- size="md"
- >
- Open
-
-
- ) : (
-
- )}
-
-
- );
-};
-
-export default UnlonelyChannel;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyNfc/Shimmer.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyNfc/Shimmer.tsx
deleted file mode 100644
index 958831949165..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyNfc/Shimmer.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import type { FC } from 'react';
-
-import { Card } from '@hey/ui';
-
-const NftShimmer: FC = () => {
- return (
-
-
-
-
- );
-};
-
-export default NftShimmer;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyNfc/index.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyNfc/index.tsx
deleted file mode 100644
index 4084fe0abcea..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/UnlonelyNfc/index.tsx
+++ /dev/null
@@ -1,100 +0,0 @@
-import type { UnlonelyNfcMetadata } from '@hey/types/nft';
-import type { FC } from 'react';
-
-import Video from '@components/Shared/Video';
-import { CursorArrowRaysIcon } from '@heroicons/react/24/outline';
-import { STATIC_IMAGES_URL } from '@hey/data/constants';
-import { PUBLICATION } from '@hey/data/tracking';
-import stopEventPropagation from '@hey/lib/stopEventPropagation';
-import { Button, Card, Tooltip } from '@hey/ui';
-import { Leafwatch } from '@lib/leafwatch';
-import Link from 'next/link';
-import useUnlonelyNfc from 'src/hooks/unlonely/useUnlonelyNfc';
-import urlcat from 'urlcat';
-
-import NftShimmer from './Shimmer';
-
-interface UnlonelyNfcProps {
- nftMetadata: UnlonelyNfcMetadata;
- publicationId: string;
-}
-
-const UnlonelyNfc: FC = ({ nftMetadata, publicationId }) => {
- const { id } = nftMetadata;
-
- const {
- data: nfc,
- error,
- loading
- } = useUnlonelyNfc({
- enabled: Boolean(id),
- id
- });
-
- if (loading) {
- return ;
- }
-
- if (!nfc) {
- return null;
- }
-
- if (error) {
- return null;
- }
-
- const { title, videoLink, videoThumbnail } = nfc;
-
- return (
- stopEventPropagation(event)}
- >
-
-
-
-
-
-
-
{title}
-
- {publicationId ? (
-
-
}
- onClick={() =>
- Leafwatch.track(
- PUBLICATION.OPEN_ACTIONS.UNLONELY_NFC.OPEN_LINK,
- { from: 'mint_embed', publication_id: publicationId }
- )
- }
- size="md"
- >
- Open
-
-
- ) : (
-
- )}
-
-
- );
-};
-
-export default UnlonelyNfc;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/Metadata.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/Metadata.tsx
deleted file mode 100644
index 798186203a84..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/Metadata.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import type { ZoraNft } from '@hey/types/nft';
-import type { FC } from 'react';
-
-import {
- ArrowTopRightOnSquareIcon,
- PuzzlePieceIcon,
- ShoppingBagIcon,
- UsersIcon
-} from '@heroicons/react/24/outline';
-import { PUBLICATION } from '@hey/data/tracking';
-import humanize from '@hey/lib/humanize';
-import { Leafwatch } from '@lib/leafwatch';
-import Link from 'next/link';
-
-interface MetadataProps {
- nft: ZoraNft;
- zoraLink: string;
-}
-
-const Metadata: FC = ({ nft, zoraLink }) => {
- return (
-
-
-
-
- Type:
- {nft.contractStandard === 'ERC721' ? 'ERC-721' : 'ERC-1155'}
-
-
- {nft.totalMinted > 0 ? (
-
-
- {humanize(nft.totalMinted)} minted
-
- ) : null}
- {!nft.isOpenEdition ? (
-
-
- {humanize(nft.remainingSupply)} remaining
-
- ) : null}
-
{
- Leafwatch.track(PUBLICATION.OPEN_ACTIONS.ZORA_NFT.OPEN_LINK, {
- from: 'mint_modal_link'
- });
- }}
- rel="noopener noreferrer"
- target="_blank"
- >
-
-
Open in Zora
-
-
- );
-};
-
-export default Metadata;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/MintAction.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/MintAction.tsx
deleted file mode 100644
index a1932705185c..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/MintAction.tsx
+++ /dev/null
@@ -1,240 +0,0 @@
-import type { ZoraNft } from '@hey/types/nft';
-import type { FC } from 'react';
-import type { Address } from 'viem';
-
-import WalletSelector from '@components/Shared/Login/WalletSelector';
-import SwitchNetwork from '@components/Shared/SwitchNetwork';
-import {
- CurrencyDollarIcon,
- CursorArrowRaysIcon
-} from '@heroicons/react/24/outline';
-import { CheckCircleIcon } from '@heroicons/react/24/solid';
-import { ZoraCreator1155Impl, ZoraERC721Drop } from '@hey/abis';
-import { Errors } from '@hey/data';
-import { APP_NAME, REWARDS_ADDRESS, ZERO_ADDRESS } from '@hey/data/constants';
-import { ZORA_FIXED_PRICE_SALE_STRATEGY } from '@hey/data/contracts';
-import { PUBLICATION } from '@hey/data/tracking';
-import getZoraChainInfo from '@hey/lib/getZoraChainInfo';
-import { Button, Spinner } from '@hey/ui';
-import { Leafwatch } from '@lib/leafwatch';
-import Link from 'next/link';
-import toast from 'react-hot-toast';
-import { useUpdateEffect } from 'usehooks-ts';
-import { encodeAbiParameters, parseAbiParameters, parseEther } from 'viem';
-import {
- useAccount,
- useChainId,
- useSimulateContract,
- useWaitForTransactionReceipt,
- useWriteContract
-} from 'wagmi';
-
-import { useZoraMintStore } from '.';
-
-const NO_BALANCE_ERROR = 'exceeds the balance of the account';
-const MAX_MINT_EXCEEDED_ERROR = 'Purchase_TooManyForAddress';
-const SALE_INACTIVE_ERROR = 'Sale_Inactive';
-const ALLOWED_ERRORS_FOR_MINTING = [NO_BALANCE_ERROR, MAX_MINT_EXCEEDED_ERROR];
-
-interface MintActionProps {
- nft: ZoraNft;
- publicationId: string;
- zoraLink: string;
-}
-
-const MintAction: FC = ({ nft, publicationId, zoraLink }) => {
- const quantity = useZoraMintStore((state) => state.quantity);
- const setCanMintOnHey = useZoraMintStore((state) => state.setCanMintOnHey);
-
- const chain = useChainId();
- const { address, isDisconnected } = useAccount();
-
- const nftAddress = nft.address;
- const recipient = (address || ZERO_ADDRESS) as Address;
- const comment = `Minted from ${APP_NAME}`;
- const mintReferral = REWARDS_ADDRESS;
- const nftPriceInEth = parseInt(nft.price) / 10 ** 18;
- const mintFee = 0.000777;
- const mintFeeInEth = parseEther(mintFee.toString());
- const value =
- (parseEther(nftPriceInEth.toString()) + mintFeeInEth) * BigInt(quantity);
-
- const abi =
- nft.contractStandard === 'ERC721' ? ZoraERC721Drop : ZoraCreator1155Impl;
- const args =
- nft.contractStandard === 'ERC721'
- ? [recipient, BigInt(quantity), comment, mintReferral]
- : [
- ZORA_FIXED_PRICE_SALE_STRATEGY,
- parseInt(nft.tokenId),
- BigInt(quantity),
- encodeAbiParameters(parseAbiParameters('address'), [recipient]),
- mintReferral
- ];
-
- const {
- data: simulateData,
- error: simulateError,
- failureCount: simulateFailureCount,
- isFetching: isSimulating
- } = useSimulateContract({
- abi,
- address: nftAddress,
- args,
- chainId: nft.chainId,
- functionName: 'mintWithRewards',
- value
- });
-
- const {
- data: writeHash,
- isPending: isContractWriteLoading,
- writeContract
- } = useWriteContract();
-
- const write = () => {
- if (!simulateData) {
- return toast.error(Errors.SomethingWentWrong);
- }
-
- return writeContract(simulateData.request);
- };
-
- const {
- data: txnData,
- isLoading,
- isSuccess
- } = useWaitForTransactionReceipt({
- chainId: nft.chainId,
- hash: writeHash
- });
-
- useUpdateEffect(() => {
- if (txnData?.transactionHash) {
- Leafwatch.track(PUBLICATION.OPEN_ACTIONS.ZORA_NFT.MINT, {
- ...(publicationId && { publication_id: publicationId }),
- chain: nft.chainId,
- hash: txnData.transactionHash,
- nft: nftAddress,
- price: (nftPriceInEth + mintFee) * quantity,
- quantity
- });
- }
- }, [isSuccess]);
-
- const isSimulateError = simulateFailureCount > 0;
-
- useUpdateEffect(() => {
- setCanMintOnHey(
- !isSimulateError ||
- (isSimulateError &&
- ALLOWED_ERRORS_FOR_MINTING.some((error) =>
- simulateError?.message.includes(error)
- ))
- );
- }, [isSimulating]);
-
- const mintingOrSuccess = isLoading || isSuccess;
-
- // Errors
- const noBalanceError = simulateError?.message?.includes(NO_BALANCE_ERROR);
- const maxMintExceededError = simulateError?.message?.includes(
- MAX_MINT_EXCEEDED_ERROR
- );
- const saleInactiveError =
- simulateError?.message?.includes(SALE_INACTIVE_ERROR);
-
- return !mintingOrSuccess ? (
-
- {isDisconnected ? (
-
-
-
- ) : chain !== nft.chainId ? (
-
- ) : isSimulateError ? (
- noBalanceError ? (
-
-
}
- size="md"
- >
- You don't have balance
-
-
- ) : maxMintExceededError ? (
-
-
-
- You exceeded the mint limit
-
-
- ) : (
-
-
}
- onClick={() =>
- Leafwatch.track(PUBLICATION.OPEN_ACTIONS.ZORA_NFT.OPEN_LINK, {
- ...(publicationId && { publication_id: publicationId }),
- from: 'mint_modal',
- type: saleInactiveError ? 'collect' : 'mint'
- })
- }
- size="md"
- >
- {saleInactiveError ? 'Collect on Zora' : 'Mint on Zora'}
-
-
- )
- ) : (
-
- ) : (
-
- )
- }
- onClick={() => write?.()}
- >
- Mint on Zora
-
- )}
-
- ) : (
-
- {isLoading ? (
-
-
-
Minting in progress
-
- ) : null}
- {isSuccess ? (
-
- ) : null}
-
- );
-};
-
-export default MintAction;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/MintedBy.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/MintedBy.tsx
deleted file mode 100644
index ccf176add950..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/MintedBy.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import type { Profile } from '@hey/lens';
-import type { FC } from 'react';
-import type { Address } from 'viem';
-
-import SmallUserProfileShimmer from '@components/Shared/Shimmer/SmallUserProfileShimmer';
-import SmallUserProfile from '@components/Shared/SmallUserProfile';
-import SmallWalletProfile from '@components/Shared/SmallWalletProfile';
-import { useDefaultProfileQuery } from '@hey/lens';
-
-interface MintedByProps {
- address: Address;
-}
-
-const MintedBy: FC = ({ address }) => {
- const { data, loading } = useDefaultProfileQuery({
- skip: !address,
- variables: { request: { for: address } }
- });
-
- if (!address) {
- return null;
- }
-
- return (
-
- by
- {loading ? (
-
- ) : data?.defaultProfile ? (
-
- ) : (
-
- )}
-
- );
-};
-
-export default MintedBy;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/Price.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/Price.tsx
deleted file mode 100644
index ce268b0fd271..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/Price.tsx
+++ /dev/null
@@ -1,111 +0,0 @@
-import type { ZoraNft } from '@hey/types/nft';
-import type { FC } from 'react';
-
-import { MinusIcon, PlusIcon } from '@heroicons/react/24/outline';
-import getRedstonePrice from '@hey/lib/getRedstonePrice';
-import { HelpTooltip } from '@hey/ui';
-import { useQuery } from '@tanstack/react-query';
-
-import { useZoraMintStore } from '.';
-
-interface PriceProps {
- nft: ZoraNft;
-}
-
-const Price: FC = ({ nft }) => {
- const quantity = useZoraMintStore((state) => state.quantity);
- const setQuantity = useZoraMintStore((state) => state.setQuantity);
- const canMintOnHey = useZoraMintStore((state) => state.canMintOnHey);
-
- const { data: usdPrice, isLoading } = useQuery({
- enabled: Boolean(nft.price),
- queryFn: async () => await getRedstonePrice('ETH'),
- queryKey: ['getRedstonePrice']
- });
-
- const price = quantity * parseInt(nft.price);
- const nftPriceInEth = price / 10 ** 18;
- const platformFeesInEth = quantity * 0.000777;
-
- const creatorReward = 0.000111 * quantity;
- const createReferralReward = 0.000222 * quantity;
- const mintReferralReward = 0.000222 * quantity;
- const zoraFee = 0.000222 * quantity;
-
- if (isLoading || !canMintOnHey) {
- return null;
- }
-
- const priceInUsd = usdPrice * (nftPriceInEth + platformFeesInEth);
-
- interface FeesProps {
- eth: number;
- title: string;
- }
-
- const Fees: FC = ({ eth, title }) => (
-
-
{title}
-
- {eth.toFixed(6)} ETH
-
- (${(eth * usdPrice).toFixed(2)} USD)
-
-
-
- );
-
- return (
-
-
-
-
- {price > 0 ? (
-
-
{nftPriceInEth}
-
ETH
-
- ) : null}
-
-
+ {platformFeesInEth} ETH mint fee
-
-
-
-
-
-
-
-
-
-
- ≈ ${priceInUsd.toFixed(2)} USD
-
-
-
-
-
{quantity}
-
-
-
-
- );
-};
-
-export default Price;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/index.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/index.tsx
deleted file mode 100644
index 539e641e6305..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Mint/index.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-import type { ZoraNft } from '@hey/types/nft';
-import type { FC } from 'react';
-
-import Markup from '@components/Shared/Markup';
-import getMentions from '@hey/lib/getMentions';
-import urlcat from 'urlcat';
-import { create } from 'zustand';
-
-import Metadata from './Metadata';
-import MintAction from './MintAction';
-import MintedBy from './MintedBy';
-import Price from './Price';
-
-interface ZoraMintState {
- canMintOnHey: boolean;
- quantity: number;
- setCanMintOnHey: (canMintOnHey: boolean) => void;
- setQuantity: (quantity: number) => void;
-}
-
-export const useZoraMintStore = create((set) => ({
- canMintOnHey: false,
- quantity: 1,
- setCanMintOnHey: (canMintOnHey) => set({ canMintOnHey }),
- setQuantity: (quantity) => set({ quantity })
-}));
-
-interface MintProps {
- nft: ZoraNft;
- publicationId: string;
- zoraLink: string;
-}
-
-const Mint: FC = ({ nft, publicationId, zoraLink }) => {
- if (!nft) {
- return null;
- }
-
- return (
-
-
-
{nft.name}
-
-
-
- {nft.description}
-
-
-
-
-
-
- );
-};
-
-export default Mint;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Shimmer.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Shimmer.tsx
deleted file mode 100644
index 81be0e39e1c8..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/Shimmer.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import type { FC } from 'react';
-
-import { Card } from '@hey/ui';
-
-const NftShimmer: FC = () => {
- return (
-
-
-
-
- );
-};
-
-export default NftShimmer;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/index.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/index.tsx
deleted file mode 100644
index 7546f7e9ae2c..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/ZoraNft/index.tsx
+++ /dev/null
@@ -1,157 +0,0 @@
-import type { BasicNftMetadata } from '@hey/types/nft';
-import type { FC } from 'react';
-
-import {
- CursorArrowRaysIcon,
- RectangleStackIcon
-} from '@heroicons/react/24/outline';
-import { PUBLICATION } from '@hey/data/tracking';
-import getZoraChainInfo from '@hey/lib/getZoraChainInfo';
-import stopEventPropagation from '@hey/lib/stopEventPropagation';
-import { Button, Card, Modal, Tooltip } from '@hey/ui';
-import { Leafwatch } from '@lib/leafwatch';
-import Link from 'next/link';
-import { useState } from 'react';
-import useZoraNft from 'src/hooks/zora/useZoraNft';
-import urlcat from 'urlcat';
-
-import Mint, { useZoraMintStore } from './Mint';
-import NftShimmer from './Shimmer';
-
-interface ZoraNftProps {
- nftMetadata: BasicNftMetadata;
- publicationId: string;
-}
-
-const ZoraNft: FC = ({ nftMetadata, publicationId }) => {
- const setQuantity = useZoraMintStore((state) => state.setQuantity);
- const setCanMintOnHey = useZoraMintStore((state) => state.setCanMintOnHey);
-
- const { address, chain, token } = nftMetadata;
- const [showMintModal, setShowMintModal] = useState(false);
-
- const {
- data: nft,
- error,
- loading
- } = useZoraNft({
- address,
- chain,
- enabled: Boolean(chain && address),
- token: token
- });
-
- if (loading) {
- return ;
- }
-
- if (!nft) {
- return null;
- }
-
- if (error) {
- return null;
- }
-
- const canMint = [
- 'ERC1155_COLLECTION_TOKEN',
- 'ERC721_DROP',
- 'ERC721_SINGLE_EDITION'
- ].includes(nft.contractType);
-
- const zoraLink = nftMetadata.mintLink;
-
- return (
- stopEventPropagation(event)}
- >
-
-
-
-
-
-
-
{nft.name}
- {nft.contractType === 'ERC1155_COLLECTION' ? (
-
-
-
- ) : null}
-
- {publicationId ? (
- canMint ? (
- <>
-
}
- onClick={() => {
- setQuantity(1);
- setCanMintOnHey(false);
- setShowMintModal(true);
- Leafwatch.track(PUBLICATION.OPEN_ACTIONS.ZORA_NFT.OPEN_MINT, {
- from: 'mint_embed',
- publication_id: publicationId
- });
- }}
- size="md"
- >
- Mint
-
-
}
- onClose={() => setShowMintModal(false)}
- show={showMintModal}
- title="Mint on Zora"
- >
-
-
- >
- ) : (
-
-
}
- onClick={() =>
- Leafwatch.track(PUBLICATION.OPEN_ACTIONS.ZORA_NFT.OPEN_LINK, {
- from: 'mint_embed',
- publication_id: publicationId
- })
- }
- size="md"
- >
- {nft.contractType === 'ERC1155_COLLECTION'
- ? 'Mint all on Zora'
- : 'Mint on Zora'}
-
-
- )
- ) : (
-
- )}
-
-
- );
-};
-
-export default ZoraNft;
diff --git a/apps/web/src/components/Publication/HeyOpenActions/Nft/index.tsx b/apps/web/src/components/Publication/HeyOpenActions/Nft/index.tsx
deleted file mode 100644
index 3d9cb3f63d44..000000000000
--- a/apps/web/src/components/Publication/HeyOpenActions/Nft/index.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import type {
- BasePaintCanvasMetadata,
- BasicNftMetadata,
- SoundReleaseMetadata,
- UnlonelyChannelMetadata,
- UnlonelyNfcMetadata
-} from '@hey/types/nft';
-import type { FC } from 'react';
-
-import getNft from '@hey/lib/nft/getNft';
-
-import BasePaintCanvas from './BasePaintCanvas';
-import SoundRelease from './SoundRelease';
-import UnlonelyChannel from './UnlonelyChannel';
-import UnlonelyNfc from './UnlonelyNfc';
-import ZoraNft from './ZoraNft';
-
-interface NftProps {
- mintLink: string;
- publicationId: string;
-}
-
-const Nft: FC = ({ mintLink, publicationId }) => {
- const nftMetadata = getNft([mintLink]);
-
- if (!nftMetadata) {
- return null;
- }
-
- const { provider } = nftMetadata;
-
- return provider === 'zora' ? (
-
- ) : provider === 'basepaint' ? (
-
- ) : provider === 'unlonely-channel' ? (
-
- ) : provider === 'unlonely-nfc' ? (
-
- ) : provider === 'sound-release' ? (
-
- ) : null;
-};
-
-export default Nft;
diff --git a/apps/web/src/components/Publication/LensOpenActions/UnknownModule/Tip/index.tsx b/apps/web/src/components/Publication/LensOpenActions/UnknownModule/Tip/index.tsx
index 15d7b23fdcd7..38bd9889d823 100644
--- a/apps/web/src/components/Publication/LensOpenActions/UnknownModule/Tip/index.tsx
+++ b/apps/web/src/components/Publication/LensOpenActions/UnknownModule/Tip/index.tsx
@@ -49,7 +49,7 @@ const TipOpenAction: FC = ({
className="rounded-full p-1.5 outline-offset-2 outline-gray-400 hover:bg-gray-300/20"
onClick={() => {
setShowOpenActionModal(true);
- Leafwatch.track(PUBLICATION.LENS_OPEN_ACTIONS.TIP.OPEN_TIP, {
+ Leafwatch.track(PUBLICATION.OPEN_ACTIONS.TIP.OPEN_TIP, {
publication_id: publication.id
});
}}
diff --git a/apps/web/src/components/Publication/PublicationBody.tsx b/apps/web/src/components/Publication/PublicationBody.tsx
index 98aba24bafd0..5c5b95e5d2ec 100644
--- a/apps/web/src/components/Publication/PublicationBody.tsx
+++ b/apps/web/src/components/Publication/PublicationBody.tsx
@@ -18,7 +18,6 @@ import { memo } from 'react';
import { isIOS, isMobile } from 'react-device-detect';
import EncryptedPublication from './EncryptedPublication';
-import Nft from './HeyOpenActions/Nft';
import Metadata from './Metadata';
import NotSupportedPublication from './NotSupportedPublication';
import Poll from './Poll';
@@ -66,8 +65,6 @@ const PublicationBody: FC = ({
return ;
}
- // Show NFT if it's there
- const showNft = metadata.__typename === 'MintMetadataV3';
// Show live if it's there
const showLive = metadata.__typename === 'LiveStreamMetadataV3';
// Show attachments if it's there
@@ -79,12 +76,7 @@ const PublicationBody: FC = ({
const showSharingLink = metadata.__typename === 'LinkMetadataV3';
// Show oembed if no NFT, no attachments, no quoted publication
const showOembed =
- !showSharingLink &&
- hasURLs &&
- !showNft &&
- !showLive &&
- !showAttachments &&
- !quoted;
+ !showSharingLink && hasURLs && !showLive && !showAttachments && !quoted;
return (
@@ -110,9 +102,6 @@ const PublicationBody: FC
= ({
) : null}
{/* Poll */}
{showPoll ? : null}
- {showNft ? (
-
- ) : null}
{showLive ? (
diff --git a/apps/web/src/components/Shared/Oembed/Nft/MintedBy.tsx b/apps/web/src/components/Shared/Oembed/Nft/MintedBy.tsx
new file mode 100644
index 000000000000..be56dc9dca68
--- /dev/null
+++ b/apps/web/src/components/Shared/Oembed/Nft/MintedBy.tsx
@@ -0,0 +1,37 @@
+import type { Profile } from '@hey/lens';
+import type { FC } from 'react';
+import type { Address } from 'viem';
+
+import SmallUserProfile from '@components/Shared/SmallUserProfile';
+import { useDefaultProfileQuery } from '@hey/lens';
+
+interface MintedByProps {
+ address: Address;
+}
+
+const MintedBy: FC
= ({ address }) => {
+ const { data, loading } = useDefaultProfileQuery({
+ skip: !address,
+ variables: { request: { for: address } }
+ });
+
+ if (!address && loading) {
+ return null;
+ }
+
+ if (!data?.defaultProfile) {
+ return null;
+ }
+
+ return (
+
+
+
+ );
+};
+
+export default MintedBy;
diff --git a/apps/web/src/components/Shared/Oembed/Nft/index.tsx b/apps/web/src/components/Shared/Oembed/Nft/index.tsx
new file mode 100644
index 000000000000..8435718c7bb8
--- /dev/null
+++ b/apps/web/src/components/Shared/Oembed/Nft/index.tsx
@@ -0,0 +1,65 @@
+import type { FC } from 'react';
+
+import { CursorArrowRaysIcon } from '@heroicons/react/24/outline';
+import { PUBLICATION } from '@hey/data/tracking';
+import getNftChainInfo from '@hey/lib/getNftChainInfo';
+import stopEventPropagation from '@hey/lib/stopEventPropagation';
+import { Nft } from '@hey/types/misc';
+import { Button, Card, Tooltip } from '@hey/ui';
+import { Leafwatch } from '@lib/leafwatch';
+import Link from 'next/link';
+
+import MintedBy from './MintedBy';
+
+interface NftProps {
+ nft: Nft;
+ publicationId?: string;
+}
+
+const Nft: FC = ({ nft, publicationId }) => {
+ return (
+
+
+
+ {nft.creatorAddress ?
: null}
+
+
+
+ {nft.chain ? (
+
+
+
+ ) : null}
+
{nft.collectionName}
+
+
+
}
+ onClick={() =>
+ Leafwatch.track(PUBLICATION.OPEN_NFT, {
+ publication_id: publicationId
+ })
+ }
+ size="md"
+ >
+ Mint
+
+
+
+
+ );
+};
+
+export default Nft;
diff --git a/apps/web/src/components/Shared/Oembed/index.tsx b/apps/web/src/components/Shared/Oembed/index.tsx
index 56b17afec97c..387930cbadff 100644
--- a/apps/web/src/components/Shared/Oembed/index.tsx
+++ b/apps/web/src/components/Shared/Oembed/index.tsx
@@ -7,6 +7,7 @@ import { useQuery } from '@tanstack/react-query';
import axios from 'axios';
import Embed from './Embed';
+import Nft from './Nft';
import Player from './Player';
interface OembedProps {
@@ -44,7 +45,7 @@ const Oembed: FC = ({ className = '', publicationId, url }) => {
url: url as string
};
- if (!og.title && !og.html) {
+ if (!og.title && !og.html && !og.nft) {
return null;
}
@@ -52,6 +53,8 @@ const Oembed: FC = ({ className = '', publicationId, url }) => {
{og.html ? (
+ ) : og.nft ? (
+
) : (
)}
diff --git a/apps/web/src/components/Shared/Shimmer/SmallUserProfileShimmer.tsx b/apps/web/src/components/Shared/Shimmer/SmallUserProfileShimmer.tsx
index 419f2651d246..dde44fcd6796 100644
--- a/apps/web/src/components/Shared/Shimmer/SmallUserProfileShimmer.tsx
+++ b/apps/web/src/components/Shared/Shimmer/SmallUserProfileShimmer.tsx
@@ -13,7 +13,7 @@ const SmallUserProfileShimmer: FC
= ({
diff --git a/apps/web/src/components/Shared/SmallUserProfile.tsx b/apps/web/src/components/Shared/SmallUserProfile.tsx
index 3a7cfeb7e0d8..520090d3e3c0 100644
--- a/apps/web/src/components/Shared/SmallUserProfile.tsx
+++ b/apps/web/src/components/Shared/SmallUserProfile.tsx
@@ -37,22 +37,22 @@ const SmallUserProfile: FC
= ({
{
currentTarget.src = getLennyURL(profile.id);
}}
src={getAvatar(profile)}
- width={smallAvatar ? 20 : 24}
+ width={smallAvatar ? 16 : 24}
/>
);
const UserName = () => (
-
+
{getProfile(profile).displayName}
{isVerified(profile.id) ? (
diff --git a/apps/web/src/components/Shared/SmallWalletProfile.tsx b/apps/web/src/components/Shared/SmallWalletProfile.tsx
deleted file mode 100644
index aff1dd698c5f..000000000000
--- a/apps/web/src/components/Shared/SmallWalletProfile.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import type { FC } from 'react';
-import type { Address } from 'viem';
-
-import { ArrowTopRightOnSquareIcon } from '@heroicons/react/24/outline';
-import { POLYGONSCAN_URL } from '@hey/data/constants';
-import formatAddress from '@hey/lib/formatAddress';
-import getStampFyiURL from '@hey/lib/getStampFyiURL';
-import imageKit from '@hey/lib/imageKit';
-import { Image } from '@hey/ui';
-import cn from '@hey/ui/cn';
-import Link from 'next/link';
-import useEnsName from 'src/hooks/useEnsName';
-
-interface SmallWalletProfileProps {
- address: Address;
- smallAvatar?: boolean;
-}
-
-const SmallWalletProfile: FC
= ({
- address,
- smallAvatar
-}) => {
- const { ens, loading } = useEnsName({ address, enabled: Boolean(address) });
-
- return (
-
-
-
{
- currentTarget.src = getStampFyiURL(address);
- }}
- src={imageKit(getStampFyiURL(address))}
- width={smallAvatar ? 20 : 24}
- />
-
-
-
{loading ? formatAddress(address) : formatAddress(ens)}
-
-
-
-
-
- );
-};
-
-export default SmallWalletProfile;
diff --git a/apps/web/src/hooks/basepaint/useBasePaintCanvas.ts b/apps/web/src/hooks/basepaint/useBasePaintCanvas.ts
deleted file mode 100644
index e3df354a96ff..000000000000
--- a/apps/web/src/hooks/basepaint/useBasePaintCanvas.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import type { BasePaintCanvas } from '@hey/types/nft';
-
-import { HEY_API_URL } from '@hey/data/constants';
-import { useQuery } from '@tanstack/react-query';
-import axios from 'axios';
-
-interface UseBasePaintCanvasProps {
- enabled?: boolean;
- id: number;
-}
-
-const useBasePaintCanvas = ({
- enabled,
- id
-}: UseBasePaintCanvasProps): {
- data: BasePaintCanvas;
- error: unknown;
- loading: boolean;
-} => {
- const getBasePaintCanvasMetadata = async () => {
- const response = await axios.get(`${HEY_API_URL}/nfts/basepaint/canvas`, {
- params: { id }
- });
-
- return response.data?.canvas;
- };
-
- const { data, error, isLoading } = useQuery({
- enabled,
- queryFn: getBasePaintCanvasMetadata,
- queryKey: ['getBasePaintCanvasMetadata', id],
- refetchOnMount: false
- });
-
- return { data, error, loading: isLoading };
-};
-
-export default useBasePaintCanvas;
diff --git a/apps/web/src/hooks/sound/useSoundRelease.ts b/apps/web/src/hooks/sound/useSoundRelease.ts
deleted file mode 100644
index 0942c52017b9..000000000000
--- a/apps/web/src/hooks/sound/useSoundRelease.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import type { SoundRelease } from '@hey/types/nft';
-
-import { HEY_API_URL } from '@hey/data/constants';
-import { useQuery } from '@tanstack/react-query';
-import axios from 'axios';
-
-interface UseSoundReleaseProps {
- enabled?: boolean;
- handle: string;
- slug: string;
-}
-
-const useSoundRelease = ({
- enabled,
- handle,
- slug
-}: UseSoundReleaseProps): {
- data: SoundRelease;
- error: unknown;
- loading: boolean;
-} => {
- // TODO: make this type safe
- const getSoundReleaseDetails = async () => {
- const { data } = await axios.get(`${HEY_API_URL}/nfts/sound/release`, {
- params: { handle, slug }
- });
-
- return data?.release;
- };
-
- const { data, error, isLoading } = useQuery({
- enabled,
- queryFn: getSoundReleaseDetails,
- queryKey: ['getSoundReleaseDetails', handle, slug],
- refetchOnMount: false
- });
-
- return { data, error, loading: isLoading };
-};
-
-export default useSoundRelease;
diff --git a/apps/web/src/hooks/unlonely/useUnlonelyChannel.ts b/apps/web/src/hooks/unlonely/useUnlonelyChannel.ts
deleted file mode 100644
index 123942669860..000000000000
--- a/apps/web/src/hooks/unlonely/useUnlonelyChannel.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import type { UnlonelyChannel } from '@hey/types/nft';
-
-import { HEY_API_URL } from '@hey/data/constants';
-import { useQuery } from '@tanstack/react-query';
-import axios from 'axios';
-
-interface UseUnlonelyChannelProps {
- enabled?: boolean;
- slug: string;
-}
-
-const useUnlonelyChannel = ({
- enabled,
- slug
-}: UseUnlonelyChannelProps): {
- data: UnlonelyChannel;
- error: unknown;
- loading: boolean;
-} => {
- const getUnlonelyChannelDetails = async () => {
- const response = await axios.get(`${HEY_API_URL}/nfts/unlonely/channel`, {
- params: { slug }
- });
-
- return response.data?.channel;
- };
-
- const { data, error, isLoading } = useQuery({
- enabled,
- queryFn: getUnlonelyChannelDetails,
- queryKey: ['getUnlonelyChannelDetails', slug],
- refetchOnMount: false
- });
-
- return { data, error, loading: isLoading };
-};
-
-export default useUnlonelyChannel;
diff --git a/apps/web/src/hooks/unlonely/useUnlonelyNfc.ts b/apps/web/src/hooks/unlonely/useUnlonelyNfc.ts
deleted file mode 100644
index 5faf384ba574..000000000000
--- a/apps/web/src/hooks/unlonely/useUnlonelyNfc.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import type { UnlonelyNfc } from '@hey/types/nft';
-
-import { HEY_API_URL } from '@hey/data/constants';
-import { useQuery } from '@tanstack/react-query';
-import axios from 'axios';
-
-interface UseUnlonelyNfcProps {
- enabled?: boolean;
- id: string;
-}
-
-const useUnlonelyNfc = ({
- enabled,
- id
-}: UseUnlonelyNfcProps): {
- data: UnlonelyNfc;
- error: unknown;
- loading: boolean;
-} => {
- const getUnlonelyNfcDetails = async () => {
- const response = await axios.get(`${HEY_API_URL}/nfts/unlonely/nfc`, {
- params: { id }
- });
-
- return response.data?.nfc;
- };
-
- const { data, error, isLoading } = useQuery({
- enabled,
- queryFn: getUnlonelyNfcDetails,
- queryKey: ['getUnlonelyNfcDetails', id],
- refetchOnMount: false
- });
-
- return { data, error, loading: isLoading };
-};
-
-export default useUnlonelyNfc;
diff --git a/apps/web/src/hooks/usePublicationMetadata.ts b/apps/web/src/hooks/usePublicationMetadata.ts
index f398a59a0ebd..13933285ca22 100644
--- a/apps/web/src/hooks/usePublicationMetadata.ts
+++ b/apps/web/src/hooks/usePublicationMetadata.ts
@@ -1,11 +1,8 @@
import { APP_NAME } from '@hey/data/constants';
-import getURLs from '@hey/lib/getURLs';
-import getNft from '@hey/lib/nft/getNft';
import {
audio,
image,
liveStream,
- mint,
textOnly,
video
} from '@lens-protocol/metadata';
@@ -54,13 +51,10 @@ const usePublicationMetadata = () => {
const getMetadata = useCallback(
({ baseMetadata }: UsePublicationMetadataProps) => {
- const urls = getURLs(baseMetadata.content);
-
const hasAttachments = attachments.length;
const isImage = attachments[0]?.type === 'Image';
const isAudio = attachments[0]?.type === 'Audio';
const isVideo = attachments[0]?.type === 'Video';
- const isMint = Boolean(getNft(urls)?.mintLink);
const isLiveStream = Boolean(showLiveVideoEditor && liveVideoConfig.id);
const localBaseMetadata = {
@@ -76,13 +70,6 @@ const usePublicationMetadata = () => {
}));
switch (true) {
- case isMint:
- return mint({
- ...baseMetadata,
- ...localBaseMetadata,
- ...(hasAttachments && { attachments: attachmentsToBeUploaded }),
- mintLink: getNft(urls)?.mintLink
- });
case isLiveStream:
return liveStream({
...baseMetadata,
diff --git a/apps/web/src/hooks/zora/useZoraNft.ts b/apps/web/src/hooks/zora/useZoraNft.ts
deleted file mode 100644
index 5e13f2d1d641..000000000000
--- a/apps/web/src/hooks/zora/useZoraNft.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import type { ZoraNft } from '@hey/types/nft';
-
-import { HEY_API_URL } from '@hey/data/constants';
-import { useQuery } from '@tanstack/react-query';
-import axios from 'axios';
-
-interface UseZoraNftProps {
- address: string;
- chain: string;
- enabled?: boolean;
- token?: string;
-}
-
-const useZoraNft = ({
- address,
- chain,
- enabled,
- token
-}: UseZoraNftProps): {
- data: ZoraNft;
- error: unknown;
- loading: boolean;
-} => {
- // TODO: make this type safe
- const getZoraNftDetails = async () => {
- const { data } = await axios.get(`${HEY_API_URL}/nfts/zora/nft`, {
- params: { address, chain, token }
- });
-
- if (data?.nft?.entityType === 'TOKEN' && !token) {
- return data?.nft.contract;
- }
-
- return data?.nft;
- };
-
- const { data, error, isLoading } = useQuery({
- enabled,
- queryFn: getZoraNftDetails,
- queryKey: ['getZoraNftDetails', chain, address, token],
- refetchOnMount: false
- });
-
- return { data, error, loading: isLoading };
-};
-
-export default useZoraNft;
diff --git a/packages/abis/BasePaint.ts b/packages/abis/BasePaint.ts
deleted file mode 100644
index c40c286ae8a9..000000000000
--- a/packages/abis/BasePaint.ts
+++ /dev/null
@@ -1,459 +0,0 @@
-export const BasePaint = [
- {
- inputs: [
- {
- internalType: 'contract IBasePaintBrush',
- name: '_brushes',
- type: 'address'
- },
- { internalType: 'uint256', name: '_epochDuration', type: 'uint256' }
- ],
- stateMutability: 'nonpayable',
- type: 'constructor'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'account',
- 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: 'uint256', name: 'day', type: 'uint256' },
- {
- indexed: false,
- internalType: 'address',
- name: 'author',
- type: 'address'
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256'
- }
- ],
- name: 'ArtistWithdraw',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- { indexed: true, internalType: 'uint256', name: 'day', type: 'uint256' },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256'
- }
- ],
- name: 'ArtistsEarned',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: 'uint256',
- name: 'price',
- type: 'uint256'
- }
- ],
- name: 'OpenEditionPriceUpdated',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- { indexed: false, internalType: 'uint256', name: 'fee', type: 'uint256' }
- ],
- name: 'OwnerFeeUpdated',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256'
- },
- { indexed: false, internalType: 'address', name: 'to', type: 'address' }
- ],
- name: 'OwnerWithdrew',
- 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: 'uint256', name: 'day', type: 'uint256' },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- indexed: false,
- internalType: 'address',
- name: 'author',
- type: 'address'
- },
- { indexed: false, internalType: 'bytes', name: 'pixels', type: 'bytes' }
- ],
- name: 'Painted',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: 'uint256',
- name: 'timestamp',
- type: 'uint256'
- }
- ],
- name: 'Started',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'operator',
- type: 'address'
- },
- { indexed: true, internalType: 'address', name: 'from', type: 'address' },
- { indexed: true, internalType: 'address', name: 'to', type: 'address' },
- {
- indexed: false,
- internalType: 'uint256[]',
- name: 'ids',
- type: 'uint256[]'
- },
- {
- indexed: false,
- internalType: 'uint256[]',
- name: 'values',
- type: 'uint256[]'
- }
- ],
- name: 'TransferBatch',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'operator',
- type: 'address'
- },
- { indexed: true, internalType: 'address', name: 'from', type: 'address' },
- { indexed: true, internalType: 'address', name: 'to', type: 'address' },
- { indexed: false, internalType: 'uint256', name: 'id', type: 'uint256' },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'value',
- type: 'uint256'
- }
- ],
- name: 'TransferSingle',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- { indexed: false, internalType: 'string', name: 'value', type: 'string' },
- { indexed: true, internalType: 'uint256', name: 'id', type: 'uint256' }
- ],
- name: 'URI',
- type: 'event'
- },
- {
- inputs: [{ internalType: 'uint256[]', name: 'indexes', type: 'uint256[]' }],
- name: 'authorWithdraw',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- { internalType: 'address', name: 'account', type: 'address' },
- { internalType: 'uint256', name: 'id', type: 'uint256' }
- ],
- name: 'balanceOf',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- { internalType: 'address[]', name: 'accounts', type: 'address[]' },
- { internalType: 'uint256[]', name: 'ids', type: 'uint256[]' }
- ],
- name: 'balanceOfBatch',
- outputs: [{ internalType: 'uint256[]', name: '', type: 'uint256[]' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- { internalType: 'uint256', name: 'day', type: 'uint256' },
- { internalType: 'uint256', name: 'tokenId', type: 'uint256' }
- ],
- name: 'brushUsed',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'brushes',
- outputs: [
- { internalType: 'contract IBasePaintBrush', name: '', type: 'address' }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- name: 'canvases',
- outputs: [
- { internalType: 'uint256', name: 'totalContributions', type: 'uint256' },
- { internalType: 'uint256', name: 'totalRaised', type: 'uint256' }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- { internalType: 'uint256', name: 'day', type: 'uint256' },
- { internalType: 'address', name: 'author', type: 'address' }
- ],
- name: 'contribution',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'epochDuration',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- { internalType: 'address', name: 'account', type: 'address' },
- { internalType: 'address', name: 'operator', type: 'address' }
- ],
- name: 'isApprovedForAll',
- outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- { internalType: 'uint256', name: 'day', type: 'uint256' },
- { internalType: 'uint256', name: 'count', type: 'uint256' }
- ],
- name: 'mint',
- outputs: [],
- stateMutability: 'payable',
- type: 'function'
- },
- {
- inputs: [],
- name: 'openEditionPrice',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'owner',
- outputs: [{ internalType: 'address', name: '', type: 'address' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'ownerEarned',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'ownerFeePartsPerMillion',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- { internalType: 'uint256', name: 'day', type: 'uint256' },
- { internalType: 'uint256', name: 'tokenId', type: 'uint256' },
- { internalType: 'bytes', name: 'pixels', type: 'bytes' }
- ],
- name: 'paint',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [],
- name: 'renounceOwnership',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- { internalType: 'address', name: 'from', type: 'address' },
- { internalType: 'address', name: 'to', type: 'address' },
- { internalType: 'uint256[]', name: 'ids', type: 'uint256[]' },
- { internalType: 'uint256[]', name: 'amounts', type: 'uint256[]' },
- { internalType: 'bytes', name: 'data', type: 'bytes' }
- ],
- name: 'safeBatchTransferFrom',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- { internalType: 'address', name: 'from', type: 'address' },
- { internalType: 'address', name: 'to', type: 'address' },
- { internalType: 'uint256', name: 'id', type: 'uint256' },
- { internalType: 'uint256', name: 'amount', type: 'uint256' },
- { internalType: 'bytes', name: 'data', type: 'bytes' }
- ],
- name: 'safeTransferFrom',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- { internalType: 'address', name: 'operator', type: 'address' },
- { internalType: 'bool', name: 'approved', type: 'bool' }
- ],
- name: 'setApprovalForAll',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'uint256', name: 'newPrice', type: 'uint256' }],
- name: 'setOpenEditionPrice',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'uint256', name: 'newFee', type: 'uint256' }],
- name: 'setOwnerFee',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'string', name: 'newuri', type: 'string' }],
- name: 'setURI',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [],
- name: 'start',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [],
- name: 'startedAt',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'bytes4', name: 'interfaceId', type: 'bytes4' }],
- name: 'supportsInterface',
- outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'today',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'address', name: 'newOwner', type: 'address' }],
- name: 'transferOwnership',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- name: 'uri',
- outputs: [{ internalType: 'string', name: '', type: 'string' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'address', name: 'to', type: 'address' }],
- name: 'withdraw',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- }
-];
diff --git a/packages/abis/FollowNft.ts b/packages/abis/FollowNft.ts
deleted file mode 100644
index 1a92d54b4865..000000000000
--- a/packages/abis/FollowNft.ts
+++ /dev/null
@@ -1,394 +0,0 @@
-export const FollowNft = [
- {
- inputs: [{ internalType: 'address', name: 'hub', type: 'address' }],
- stateMutability: 'nonpayable',
- type: 'constructor'
- },
- { inputs: [], name: 'BlockNumberInvalid', type: 'error' },
- { inputs: [], name: 'InitParamsInvalid', type: 'error' },
- { inputs: [], name: 'Initialized', type: 'error' },
- { inputs: [], name: 'NotHub', type: 'error' },
- { inputs: [], name: 'NotOwnerOrApproved', type: 'error' },
- { inputs: [], name: 'SignatureExpired', type: 'error' },
- { inputs: [], name: 'SignatureInvalid', type: 'error' },
- { inputs: [], name: 'TokenDoesNotExist', type: 'error' },
- { inputs: [], name: 'ZeroSpender', type: 'error' },
- {
- 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: 'from', type: 'address' },
- { indexed: true, internalType: 'address', name: 'to', type: 'address' },
- {
- indexed: true,
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- }
- ],
- name: 'Transfer',
- type: 'event'
- },
- {
- inputs: [],
- name: 'HUB',
- outputs: [{ internalType: 'address', name: '', type: 'address' }],
- stateMutability: 'view',
- 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: [
- { internalType: 'uint256', name: 'tokenId', type: 'uint256' },
- {
- components: [
- { internalType: 'uint8', name: 'v', type: 'uint8' },
- { internalType: 'bytes32', name: 'r', type: 'bytes32' },
- { internalType: 'bytes32', name: 's', type: 'bytes32' },
- { internalType: 'uint256', name: 'deadline', type: 'uint256' }
- ],
- internalType: 'struct DataTypes.EIP712Signature',
- name: 'sig',
- type: 'tuple'
- }
- ],
- name: 'burnWithSig',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'address', name: 'delegatee', type: 'address' }],
- name: 'delegate',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- { internalType: 'address', name: 'delegator', type: 'address' },
- { internalType: 'address', name: 'delegatee', type: 'address' },
- {
- components: [
- { internalType: 'uint8', name: 'v', type: 'uint8' },
- { internalType: 'bytes32', name: 'r', type: 'bytes32' },
- { internalType: 'bytes32', name: 's', type: 'bytes32' },
- { internalType: 'uint256', name: 'deadline', type: 'uint256' }
- ],
- internalType: 'struct DataTypes.EIP712Signature',
- name: 'sig',
- type: 'tuple'
- }
- ],
- name: 'delegateBySig',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'uint256', name: 'tokenId', type: 'uint256' }],
- name: 'exists',
- outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'uint256', name: 'tokenId', type: 'uint256' }],
- name: 'getApproved',
- outputs: [{ internalType: 'address', name: '', type: 'address' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'uint256', name: 'blockNumber', type: 'uint256' }],
- name: 'getDelegatedSupplyByBlockNumber',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'getDomainSeparator',
- outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- { internalType: 'address', name: 'user', type: 'address' },
- { internalType: 'uint256', name: 'blockNumber', type: 'uint256' }
- ],
- name: 'getPowerByBlockNumber',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'uint256', name: 'profileId', type: 'uint256' }],
- name: 'initialize',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- { internalType: 'address', name: 'owner', type: 'address' },
- { internalType: 'address', name: 'operator', type: 'address' }
- ],
- name: 'isApprovedForAll',
- outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'address', name: 'to', type: 'address' }],
- name: 'mint',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'uint256', name: 'tokenId', type: 'uint256' }],
- name: 'mintTimestampOf',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'name',
- outputs: [{ internalType: 'string', name: '', type: 'string' }],
- 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: 'spender', type: 'address' },
- { internalType: 'uint256', name: 'tokenId', type: 'uint256' },
- {
- components: [
- { internalType: 'uint8', name: 'v', type: 'uint8' },
- { internalType: 'bytes32', name: 'r', type: 'bytes32' },
- { internalType: 'bytes32', name: 's', type: 'bytes32' },
- { internalType: 'uint256', name: 'deadline', type: 'uint256' }
- ],
- internalType: 'struct DataTypes.EIP712Signature',
- name: 'sig',
- type: 'tuple'
- }
- ],
- name: 'permit',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- { internalType: 'address', name: 'owner', type: 'address' },
- { internalType: 'address', name: 'operator', type: 'address' },
- { internalType: 'bool', name: 'approved', type: 'bool' },
- {
- components: [
- { internalType: 'uint8', name: 'v', type: 'uint8' },
- { internalType: 'bytes32', name: 'r', type: 'bytes32' },
- { internalType: 'bytes32', name: 's', type: 'bytes32' },
- { internalType: 'uint256', name: 'deadline', type: 'uint256' }
- ],
- internalType: 'struct DataTypes.EIP712Signature',
- name: 'sig',
- type: 'tuple'
- }
- ],
- name: 'permitForAll',
- outputs: [],
- stateMutability: 'nonpayable',
- 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: [
- { internalType: 'address', name: 'operator', type: 'address' },
- { internalType: 'bool', name: 'approved', type: 'bool' }
- ],
- name: 'setApprovalForAll',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'address', name: '', type: 'address' }],
- name: 'sigNonces',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- stateMutability: 'view',
- 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: 'index', type: 'uint256' }],
- name: 'tokenByIndex',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [{ internalType: 'uint256', name: 'tokenId', type: 'uint256' }],
- name: 'tokenDataOf',
- outputs: [
- {
- components: [
- { internalType: 'address', name: 'owner', type: 'address' },
- { internalType: 'uint96', name: 'mintTimestamp', type: 'uint96' }
- ],
- internalType: 'struct IERC721Time.TokenData',
- name: '',
- type: 'tuple'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- { internalType: 'address', name: 'owner', type: 'address' },
- { internalType: 'uint256', name: 'index', type: 'uint256' }
- ],
- name: 'tokenOfOwnerByIndex',
- outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
- 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'
- }
-];
diff --git a/packages/abis/ZoraCreator1155Impl.ts b/packages/abis/ZoraCreator1155Impl.ts
deleted file mode 100644
index b42c0bffd2ef..000000000000
--- a/packages/abis/ZoraCreator1155Impl.ts
+++ /dev/null
@@ -1,2336 +0,0 @@
-export const ZoraCreator1155Impl = [
- {
- inputs: [
- {
- internalType: 'uint256',
- name: '_mintFeeAmount',
- type: 'uint256'
- },
- {
- internalType: 'address',
- name: '_mintFeeRecipient',
- type: 'address'
- },
- {
- internalType: 'address',
- name: '_factory',
- type: 'address'
- },
- {
- internalType: 'address',
- name: '_protocolRewards',
- type: 'address'
- }
- ],
- stateMutability: 'nonpayable',
- type: 'constructor'
- },
- {
- inputs: [],
- name: 'ADDRESS_DELEGATECALL_TO_NON_CONTRACT',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ADDRESS_LOW_LEVEL_CALL_FAILED',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'operator',
- type: 'address'
- },
- {
- internalType: 'address',
- name: 'user',
- type: 'address'
- }
- ],
- name: 'Burn_NotOwnerOrApproved',
- type: 'error'
- },
- {
- inputs: [],
- name: 'CREATOR_FUNDS_RECIPIENT_NOT_SET',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'bytes',
- name: 'reason',
- type: 'bytes'
- }
- ],
- name: 'CallFailed',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'quantity',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'totalMinted',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'maxSupply',
- type: 'uint256'
- }
- ],
- name: 'CannotMintMoreTokens',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'mintFeeRecipient',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'mintFee',
- type: 'uint256'
- }
- ],
- name: 'CannotSendMintFee',
- type: 'error'
- },
- {
- inputs: [],
- name: 'CannotSetMintFeeToZeroAddress',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'proposedAddress',
- type: 'address'
- }
- ],
- name: 'Config_TransferHookNotSupported',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ERC1155_ACCOUNTS_AND_IDS_LENGTH_MISMATCH',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ERC1155_ADDRESS_ZERO_IS_NOT_A_VALID_OWNER',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ERC1155_BURN_AMOUNT_EXCEEDS_BALANCE',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ERC1155_BURN_FROM_ZERO_ADDRESS',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ERC1155_CALLER_IS_NOT_TOKEN_OWNER_OR_APPROVED',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ERC1155_ERC1155RECEIVER_REJECTED_TOKENS',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ERC1155_IDS_AND_AMOUNTS_LENGTH_MISMATCH',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ERC1155_INSUFFICIENT_BALANCE_FOR_TRANSFER',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ERC1155_MINT_TO_ZERO_ADDRESS',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ERC1155_SETTING_APPROVAL_FOR_SELF',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ERC1155_TRANSFER_TO_NON_ERC1155RECEIVER_IMPLEMENTER',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ERC1155_TRANSFER_TO_ZERO_ADDRESS',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ERC1967_NEW_IMPL_NOT_CONTRACT',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ERC1967_NEW_IMPL_NOT_UUPS',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ERC1967_UNSUPPORTED_PROXIABLEUUID',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'recipient',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256'
- }
- ],
- name: 'ETHWithdrawFailed',
- type: 'error'
- },
- {
- inputs: [],
- name: 'FUNCTION_MUST_BE_CALLED_THROUGH_ACTIVE_PROXY',
- type: 'error'
- },
- {
- inputs: [],
- name: 'FUNCTION_MUST_BE_CALLED_THROUGH_DELEGATECALL',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'contractValue',
- type: 'uint256'
- }
- ],
- name: 'FundsWithdrawInsolvent',
- type: 'error'
- },
- {
- inputs: [],
- name: 'INITIALIZABLE_CONTRACT_ALREADY_INITIALIZED',
- type: 'error'
- },
- {
- inputs: [],
- name: 'INITIALIZABLE_CONTRACT_IS_NOT_INITIALIZING',
- type: 'error'
- },
- {
- inputs: [],
- name: 'INVALID_ADDRESS_ZERO',
- type: 'error'
- },
- {
- inputs: [],
- name: 'INVALID_ETH_AMOUNT',
- type: 'error'
- },
- {
- inputs: [],
- name: 'InvalidMintSchedule',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'mintFeeBPS',
- type: 'uint256'
- }
- ],
- name: 'MintFeeCannotBeMoreThanZeroPointOneETH',
- type: 'error'
- },
- {
- inputs: [],
- name: 'Mint_InsolventSaleTransfer',
- type: 'error'
- },
- {
- inputs: [],
- name: 'Mint_TokenIDMintNotAllowed',
- type: 'error'
- },
- {
- inputs: [],
- name: 'Mint_UnknownCommand',
- type: 'error'
- },
- {
- inputs: [],
- name: 'Mint_ValueTransferFail',
- type: 'error'
- },
- {
- inputs: [],
- name: 'NewOwnerNeedsToBeAdmin',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- }
- ],
- name: 'NoRendererForToken',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ONLY_CREATE_REFERRAL',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'caller',
- type: 'address'
- },
- {
- internalType: 'address',
- name: 'recipient',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256'
- }
- ],
- name: 'ProtocolRewardsWithdrawFailed',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'renderer',
- type: 'address'
- }
- ],
- name: 'RendererNotValid',
- type: 'error'
- },
- {
- inputs: [],
- name: 'Renderer_NotValidRendererContract',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'targetContract',
- type: 'address'
- }
- ],
- name: 'Sale_CannotCallNonSalesContract',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'expected',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'actual',
- type: 'uint256'
- }
- ],
- name: 'TokenIdMismatch',
- type: 'error'
- },
- {
- inputs: [],
- name: 'UUPS_UPGRADEABLE_MUST_NOT_BE_CALLED_THROUGH_DELEGATECALL',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'user',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'role',
- type: 'uint256'
- }
- ],
- name: 'UserMissingRoleForToken',
- 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: 'account',
- 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: 'updater',
- type: 'address'
- },
- {
- indexed: true,
- internalType: 'enum IZoraCreator1155.ConfigUpdate',
- name: 'updateType',
- type: 'uint8'
- },
- {
- components: [
- {
- internalType: 'address',
- name: 'owner',
- type: 'address'
- },
- {
- internalType: 'uint96',
- name: '__gap1',
- type: 'uint96'
- },
- {
- internalType: 'address payable',
- name: 'fundsRecipient',
- type: 'address'
- },
- {
- internalType: 'uint96',
- name: '__gap2',
- type: 'uint96'
- },
- {
- internalType: 'contract ITransferHookReceiver',
- name: 'transferHook',
- type: 'address'
- },
- {
- internalType: 'uint96',
- name: '__gap3',
- type: 'uint96'
- }
- ],
- indexed: false,
- internalType: 'struct IZoraCreator1155TypesV1.ContractConfig',
- name: 'newConfig',
- type: 'tuple'
- }
- ],
- name: 'ConfigUpdated',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'updater',
- type: 'address'
- },
- {
- indexed: false,
- internalType: 'string',
- name: 'uri',
- type: 'string'
- },
- {
- indexed: false,
- internalType: 'string',
- name: 'name',
- type: 'string'
- }
- ],
- name: 'ContractMetadataUpdated',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: 'contract IRenderer1155',
- name: 'renderer',
- type: 'address'
- }
- ],
- name: 'ContractRendererUpdated',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: 'uint8',
- name: 'version',
- type: 'uint8'
- }
- ],
- name: 'Initialized',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: 'address',
- name: 'lastOwner',
- type: 'address'
- },
- {
- indexed: false,
- internalType: 'address',
- name: 'newOwner',
- type: 'address'
- }
- ],
- name: 'OwnershipTransferred',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'sender',
- type: 'address'
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'minter',
- type: 'address'
- },
- {
- indexed: true,
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'quantity',
- type: 'uint256'
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'value',
- type: 'uint256'
- }
- ],
- name: 'Purchased',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'renderer',
- type: 'address'
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'user',
- type: 'address'
- }
- ],
- name: 'RendererUpdated',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'sender',
- type: 'address'
- },
- {
- indexed: false,
- internalType: 'string',
- name: 'newURI',
- type: 'string'
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'maxSupply',
- type: 'uint256'
- }
- ],
- name: 'SetupNewToken',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'operator',
- type: 'address'
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'from',
- type: 'address'
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'to',
- type: 'address'
- },
- {
- indexed: false,
- internalType: 'uint256[]',
- name: 'ids',
- type: 'uint256[]'
- },
- {
- indexed: false,
- internalType: 'uint256[]',
- name: 'values',
- type: 'uint256[]'
- }
- ],
- name: 'TransferBatch',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'operator',
- type: 'address'
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'from',
- type: 'address'
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'to',
- type: 'address'
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'id',
- type: 'uint256'
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'value',
- type: 'uint256'
- }
- ],
- name: 'TransferSingle',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: 'string',
- name: 'value',
- type: 'string'
- },
- {
- indexed: true,
- internalType: 'uint256',
- name: 'id',
- type: 'uint256'
- }
- ],
- name: 'URI',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'user',
- type: 'address'
- },
- {
- indexed: true,
- internalType: 'uint256',
- name: 'permissions',
- type: 'uint256'
- }
- ],
- name: 'UpdatedPermissions',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'user',
- type: 'address'
- },
- {
- components: [
- {
- internalType: 'uint32',
- name: 'royaltyMintSchedule',
- type: 'uint32'
- },
- {
- internalType: 'uint32',
- name: 'royaltyBPS',
- type: 'uint32'
- },
- {
- internalType: 'address',
- name: 'royaltyRecipient',
- type: 'address'
- }
- ],
- indexed: false,
- internalType: 'struct ICreatorRoyaltiesControl.RoyaltyConfiguration',
- name: 'configuration',
- type: 'tuple'
- }
- ],
- name: 'UpdatedRoyalties',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'from',
- type: 'address'
- },
- {
- indexed: true,
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- components: [
- {
- internalType: 'string',
- name: 'uri',
- type: 'string'
- },
- {
- internalType: 'uint256',
- name: 'maxSupply',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'totalMinted',
- type: 'uint256'
- }
- ],
- indexed: false,
- internalType: 'struct IZoraCreator1155TypesV1.TokenData',
- name: 'tokenData',
- type: 'tuple'
- }
- ],
- name: 'UpdatedToken',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'implementation',
- type: 'address'
- }
- ],
- name: 'Upgraded',
- type: 'event'
- },
- {
- inputs: [],
- name: 'CONTRACT_BASE_ID',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'PERMISSION_BIT_ADMIN',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'PERMISSION_BIT_FUNDS_MANAGER',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'PERMISSION_BIT_METADATA',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'PERMISSION_BIT_MINTER',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'PERMISSION_BIT_SALES',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- internalType: 'address',
- name: 'user',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'permissionBits',
- type: 'uint256'
- }
- ],
- name: 'addPermission',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'recipient',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'quantity',
- type: 'uint256'
- },
- {
- internalType: 'bytes',
- name: 'data',
- type: 'bytes'
- }
- ],
- name: 'adminMint',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'recipient',
- type: 'address'
- },
- {
- internalType: 'uint256[]',
- name: 'tokenIds',
- type: 'uint256[]'
- },
- {
- internalType: 'uint256[]',
- name: 'quantities',
- type: 'uint256[]'
- },
- {
- internalType: 'bytes',
- name: 'data',
- type: 'bytes'
- }
- ],
- name: 'adminMintBatch',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'lastTokenId',
- type: 'uint256'
- }
- ],
- name: 'assumeLastTokenIdMatches',
- outputs: [],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'account',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'id',
- type: 'uint256'
- }
- ],
- name: 'balanceOf',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'address[]',
- name: 'accounts',
- type: 'address[]'
- },
- {
- internalType: 'uint256[]',
- name: 'ids',
- type: 'uint256[]'
- }
- ],
- name: 'balanceOfBatch',
- outputs: [
- {
- internalType: 'uint256[]',
- name: 'batchBalances',
- type: 'uint256[]'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'from',
- type: 'address'
- },
- {
- internalType: 'uint256[]',
- name: 'tokenIds',
- type: 'uint256[]'
- },
- {
- internalType: 'uint256[]',
- name: 'amounts',
- type: 'uint256[]'
- }
- ],
- name: 'burnBatch',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- internalType: 'bytes',
- name: 'data',
- type: 'bytes'
- }
- ],
- name: 'callRenderer',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- internalType: 'contract IMinter1155',
- name: 'salesConfig',
- type: 'address'
- },
- {
- internalType: 'bytes',
- name: 'data',
- type: 'bytes'
- }
- ],
- name: 'callSale',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'numTokens',
- type: 'uint256'
- }
- ],
- name: 'computeFreeMintRewards',
- outputs: [
- {
- components: [
- {
- internalType: 'uint256',
- name: 'creatorReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'createReferralReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'mintReferralReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'firstMinterReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'zoraReward',
- type: 'uint256'
- }
- ],
- internalType: 'struct RewardsSettings',
- name: '',
- type: 'tuple'
- }
- ],
- stateMutability: 'pure',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'numTokens',
- type: 'uint256'
- }
- ],
- name: 'computePaidMintRewards',
- outputs: [
- {
- components: [
- {
- internalType: 'uint256',
- name: 'creatorReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'createReferralReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'mintReferralReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'firstMinterReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'zoraReward',
- type: 'uint256'
- }
- ],
- internalType: 'struct RewardsSettings',
- name: '',
- type: 'tuple'
- }
- ],
- stateMutability: 'pure',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'numTokens',
- type: 'uint256'
- }
- ],
- name: 'computeTotalReward',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'pure',
- type: 'function'
- },
- {
- inputs: [],
- name: 'config',
- outputs: [
- {
- internalType: 'address',
- name: 'owner',
- type: 'address'
- },
- {
- internalType: 'uint96',
- name: '__gap1',
- type: 'uint96'
- },
- {
- internalType: 'address payable',
- name: 'fundsRecipient',
- type: 'address'
- },
- {
- internalType: 'uint96',
- name: '__gap2',
- type: 'uint96'
- },
- {
- internalType: 'contract ITransferHookReceiver',
- name: 'transferHook',
- type: 'address'
- },
- {
- internalType: 'uint96',
- name: '__gap3',
- type: 'uint96'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'contractURI',
- outputs: [
- {
- internalType: 'string',
- name: '',
- type: 'string'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'contractVersion',
- outputs: [
- {
- internalType: 'string',
- name: '',
- type: 'string'
- }
- ],
- stateMutability: 'pure',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- name: 'createReferrals',
- outputs: [
- {
- internalType: 'address',
- name: '',
- type: 'address'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- name: 'customRenderers',
- outputs: [
- {
- internalType: 'contract IRenderer1155',
- name: '',
- type: 'address'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'getCreatorRewardRecipient',
- outputs: [
- {
- internalType: 'address payable',
- name: '',
- type: 'address'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- }
- ],
- name: 'getCustomRenderer',
- outputs: [
- {
- internalType: 'contract IRenderer1155',
- name: 'customRenderer',
- type: 'address'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- internalType: 'address',
- name: 'user',
- type: 'address'
- }
- ],
- name: 'getPermissions',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- }
- ],
- name: 'getRoyalties',
- outputs: [
- {
- components: [
- {
- internalType: 'uint32',
- name: 'royaltyMintSchedule',
- type: 'uint32'
- },
- {
- internalType: 'uint32',
- name: 'royaltyBPS',
- type: 'uint32'
- },
- {
- internalType: 'address',
- name: 'royaltyRecipient',
- type: 'address'
- }
- ],
- internalType: 'struct ICreatorRoyaltiesControl.RoyaltyConfiguration',
- name: '',
- type: 'tuple'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- }
- ],
- name: 'getTokenInfo',
- outputs: [
- {
- components: [
- {
- internalType: 'string',
- name: 'uri',
- type: 'string'
- },
- {
- internalType: 'uint256',
- name: 'maxSupply',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'totalMinted',
- type: 'uint256'
- }
- ],
- internalType: 'struct IZoraCreator1155TypesV1.TokenData',
- name: '',
- type: 'tuple'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'string',
- name: 'contractName',
- type: 'string'
- },
- {
- internalType: 'string',
- name: 'newContractURI',
- type: 'string'
- },
- {
- components: [
- {
- internalType: 'uint32',
- name: 'royaltyMintSchedule',
- type: 'uint32'
- },
- {
- internalType: 'uint32',
- name: 'royaltyBPS',
- type: 'uint32'
- },
- {
- internalType: 'address',
- name: 'royaltyRecipient',
- type: 'address'
- }
- ],
- internalType: 'struct ICreatorRoyaltiesControl.RoyaltyConfiguration',
- name: 'defaultRoyaltyConfiguration',
- type: 'tuple'
- },
- {
- internalType: 'address payable',
- name: 'defaultAdmin',
- type: 'address'
- },
- {
- internalType: 'bytes[]',
- name: 'setupActions',
- type: 'bytes[]'
- }
- ],
- name: 'initialize',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'user',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'role',
- type: 'uint256'
- }
- ],
- name: 'isAdminOrRole',
- outputs: [
- {
- internalType: 'bool',
- name: '',
- type: 'bool'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'account',
- type: 'address'
- },
- {
- internalType: 'address',
- name: 'operator',
- type: 'address'
- }
- ],
- name: 'isApprovedForAll',
- outputs: [
- {
- internalType: 'bool',
- name: '',
- type: 'bool'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- name: 'metadataRendererContract',
- outputs: [
- {
- internalType: 'address',
- name: '',
- type: 'address'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'contract IMinter1155',
- name: 'minter',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'quantity',
- type: 'uint256'
- },
- {
- internalType: 'bytes',
- name: 'minterArguments',
- type: 'bytes'
- }
- ],
- name: 'mint',
- outputs: [],
- stateMutability: 'payable',
- type: 'function'
- },
- {
- inputs: [],
- name: 'mintFee',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'mintFeeRecipient',
- outputs: [
- {
- internalType: 'address',
- name: '',
- type: 'address'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'contract IMinter1155',
- name: 'minter',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'quantity',
- type: 'uint256'
- },
- {
- internalType: 'bytes',
- name: 'minterArguments',
- type: 'bytes'
- },
- {
- internalType: 'address',
- name: 'mintReferral',
- type: 'address'
- }
- ],
- name: 'mintWithRewards',
- outputs: [],
- stateMutability: 'payable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'bytes[]',
- name: 'data',
- type: 'bytes[]'
- }
- ],
- name: 'multicall',
- outputs: [
- {
- internalType: 'bytes[]',
- name: 'results',
- type: 'bytes[]'
- }
- ],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [],
- name: 'name',
- outputs: [
- {
- internalType: 'string',
- name: '',
- type: 'string'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'nextTokenId',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'owner',
- outputs: [
- {
- internalType: 'address',
- name: '',
- type: 'address'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- },
- {
- internalType: 'address',
- name: '',
- type: 'address'
- }
- ],
- name: 'permissions',
- 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: 'tokenId',
- type: 'uint256'
- },
- {
- internalType: 'address',
- name: 'user',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'permissionBits',
- type: 'uint256'
- }
- ],
- name: 'removePermission',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- name: 'royalties',
- outputs: [
- {
- internalType: 'uint32',
- name: 'royaltyMintSchedule',
- type: 'uint32'
- },
- {
- internalType: 'uint32',
- name: 'royaltyBPS',
- type: 'uint32'
- },
- {
- internalType: 'address',
- name: 'royaltyRecipient',
- type: 'address'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- 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: 'ids',
- type: 'uint256[]'
- },
- {
- internalType: 'uint256[]',
- name: 'amounts',
- type: 'uint256[]'
- },
- {
- internalType: 'bytes',
- name: 'data',
- type: 'bytes'
- }
- ],
- name: 'safeBatchTransferFrom',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'from',
- type: 'address'
- },
- {
- internalType: 'address',
- name: 'to',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'id',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256'
- },
- {
- internalType: 'bytes',
- name: 'data',
- type: 'bytes'
- }
- ],
- name: 'safeTransferFrom',
- outputs: [],
- stateMutability: 'nonpayable',
- 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: 'fundsRecipient',
- type: 'address'
- }
- ],
- name: 'setFundsRecipient',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'newOwner',
- type: 'address'
- }
- ],
- name: 'setOwner',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- internalType: 'contract IRenderer1155',
- name: 'renderer',
- type: 'address'
- }
- ],
- name: 'setTokenMetadataRenderer',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'contract ITransferHookReceiver',
- name: 'transferHook',
- type: 'address'
- }
- ],
- name: 'setTransferHook',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'string',
- name: 'newURI',
- type: 'string'
- },
- {
- internalType: 'uint256',
- name: 'maxSupply',
- type: 'uint256'
- }
- ],
- name: 'setupNewToken',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'string',
- name: 'newURI',
- type: 'string'
- },
- {
- internalType: 'uint256',
- name: 'maxSupply',
- type: 'uint256'
- },
- {
- internalType: 'address',
- name: 'createReferral',
- type: 'address'
- }
- ],
- name: 'setupNewTokenWithCreateReferral',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'totalSupply',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'mintAmount',
- type: 'uint256'
- }
- ],
- name: 'supplyRoyaltyInfo',
- outputs: [
- {
- internalType: 'address',
- name: 'receiver',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'royaltyAmount',
- type: 'uint256'
- }
- ],
- stateMutability: 'view',
- 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: 'pure',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'string',
- name: '_newURI',
- type: 'string'
- },
- {
- internalType: 'string',
- name: '_newName',
- type: 'string'
- }
- ],
- name: 'updateContractMetadata',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- internalType: 'address',
- name: 'recipient',
- type: 'address'
- }
- ],
- name: 'updateCreateReferral',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- components: [
- {
- internalType: 'uint32',
- name: 'royaltyMintSchedule',
- type: 'uint32'
- },
- {
- internalType: 'uint32',
- name: 'royaltyBPS',
- type: 'uint32'
- },
- {
- internalType: 'address',
- name: 'royaltyRecipient',
- type: 'address'
- }
- ],
- internalType: 'struct ICreatorRoyaltiesControl.RoyaltyConfiguration',
- name: 'newConfiguration',
- type: 'tuple'
- }
- ],
- name: 'updateRoyaltiesForToken',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- internalType: 'string',
- name: '_newURI',
- type: 'string'
- }
- ],
- name: 'updateTokenURI',
- 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: [
- {
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- }
- ],
- name: 'uri',
- outputs: [
- {
- internalType: 'string',
- name: '',
- type: 'string'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'withdraw',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'to',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256'
- }
- ],
- name: 'withdrawRewards',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- }
-];
diff --git a/packages/abis/ZoraERC721Drop.ts b/packages/abis/ZoraERC721Drop.ts
deleted file mode 100644
index 43be9e120a24..000000000000
--- a/packages/abis/ZoraERC721Drop.ts
+++ /dev/null
@@ -1,2271 +0,0 @@
-export const ZoraERC721Drop = [
- {
- inputs: [
- {
- internalType: 'address',
- name: '_zoraERC721TransferHelper',
- type: 'address'
- },
- {
- internalType: 'contract IFactoryUpgradeGate',
- name: '_factoryUpgradeGate',
- type: 'address'
- },
- {
- internalType: 'address',
- name: '_marketFilterDAOAddress',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: '_mintFeeAmount',
- type: 'uint256'
- },
- {
- internalType: 'address payable',
- name: '_mintFeeRecipient',
- type: 'address'
- },
- {
- internalType: 'address',
- name: '_protocolRewards',
- 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: 'CREATOR_FUNDS_RECIPIENT_NOT_SET',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ExternalMetadataRenderer_CallFailed',
- type: 'error'
- },
- {
- inputs: [],
- name: 'INVALID_ADDRESS_ZERO',
- type: 'error'
- },
- {
- inputs: [],
- name: 'INVALID_ETH_AMOUNT',
- type: 'error'
- },
- {
- inputs: [],
- name: 'InvalidMintSchedule',
- type: 'error'
- },
- {
- inputs: [],
- name: 'MarketFilterDAOAddressNotSupportedForChain',
- type: 'error'
- },
- {
- inputs: [],
- name: 'MintFee_FundsSendFailure',
- type: 'error'
- },
- {
- inputs: [],
- name: 'MintToZeroAddress',
- type: 'error'
- },
- {
- inputs: [],
- name: 'MintZeroQuantity',
- type: 'error'
- },
- {
- inputs: [],
- name: 'Mint_SoldOut',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ONLY_CREATE_REFERRAL',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ONLY_OWNER',
- type: 'error'
- },
- {
- inputs: [],
- name: 'ONLY_PENDING_OWNER',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'operator',
- type: 'address'
- }
- ],
- name: 'OperatorNotAllowed',
- 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: 'ProtocolRewards_WithdrawSendFailure',
- type: 'error'
- },
- {
- inputs: [],
- name: 'Purchase_TooManyForAddress',
- type: 'error'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'correctPrice',
- type: 'uint256'
- }
- ],
- name: 'Purchase_WrongPrice',
- type: 'error'
- },
- {
- inputs: [],
- name: 'RemoteOperatorFilterRegistryCallFailed',
- 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: false,
- internalType: 'uint256',
- name: '_fromTokenId',
- type: 'uint256'
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: '_toTokenId',
- type: 'uint256'
- }
- ],
- name: 'BatchMetadataUpdate',
- 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: 'withdrawnBy',
- type: 'address'
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'withdrawnTo',
- type: 'address'
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256'
- },
- {
- indexed: false,
- internalType: 'address',
- name: 'feeRecipient',
- type: 'address'
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'feeAmount',
- type: 'uint256'
- }
- ],
- name: 'FundsWithdrawn',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: 'uint256',
- name: '_tokenId',
- type: 'uint256'
- }
- ],
- name: 'MetadataUpdate',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'sender',
- type: 'address'
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'tokenContract',
- type: 'address'
- },
- {
- indexed: true,
- internalType: 'uint256',
- name: 'tokenId',
- type: 'uint256'
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'quantity',
- type: 'uint256'
- },
- {
- indexed: false,
- internalType: 'string',
- name: 'comment',
- type: 'string'
- }
- ],
- name: 'MintComment',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: 'uint256',
- name: 'mintFeeAmount',
- type: 'uint256'
- },
- {
- indexed: false,
- internalType: 'address',
- name: 'mintFeeRecipient',
- type: 'address'
- },
- {
- indexed: false,
- internalType: 'bool',
- name: 'success',
- type: 'bool'
- }
- ],
- name: 'MintFeePayout',
- 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: 'potentialNewOwner',
- type: 'address'
- }
- ],
- name: 'OwnerCanceled',
- type: 'event'
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'previousOwner',
- type: 'address'
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'potentialNewOwner',
- type: 'address'
- }
- ],
- name: 'OwnerPending',
- 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: [
- {
- internalType: 'bytes',
- name: 'data',
- type: 'bytes'
- }
- ],
- name: 'callMetadataRenderer',
- outputs: [
- {
- internalType: 'bytes',
- name: '',
- type: 'bytes'
- }
- ],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'numTokens',
- type: 'uint256'
- }
- ],
- name: 'computeFreeMintRewards',
- outputs: [
- {
- components: [
- {
- internalType: 'uint256',
- name: 'creatorReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'createReferralReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'mintReferralReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'firstMinterReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'zoraReward',
- type: 'uint256'
- }
- ],
- internalType: 'struct RewardsSettings',
- name: '',
- type: 'tuple'
- }
- ],
- stateMutability: 'pure',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'numTokens',
- type: 'uint256'
- }
- ],
- name: 'computePaidMintRewards',
- outputs: [
- {
- components: [
- {
- internalType: 'uint256',
- name: 'creatorReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'createReferralReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'mintReferralReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'firstMinterReward',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'zoraReward',
- type: 'uint256'
- }
- ],
- internalType: 'struct RewardsSettings',
- name: '',
- type: 'tuple'
- }
- ],
- stateMutability: 'pure',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'numTokens',
- type: 'uint256'
- }
- ],
- name: 'computeTotalReward',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'pure',
- 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: 'createReferral',
- outputs: [
- {
- internalType: 'address',
- name: '',
- type: 'address'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'factoryUpgradeGate',
- outputs: [
- {
- internalType: 'contract IFactoryUpgradeGate',
- name: '',
- type: 'address'
- }
- ],
- 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'
- },
- {
- internalType: 'bytes[]',
- name: '_setupCalls',
- type: 'bytes[]'
- },
- {
- internalType: 'contract IMetadataRenderer',
- name: '_metadataRenderer',
- type: 'address'
- },
- {
- internalType: 'bytes',
- name: '_metadataRendererInit',
- type: 'bytes'
- },
- {
- internalType: 'address',
- name: '_createReferral',
- type: 'address'
- }
- ],
- 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: [
- {
- internalType: 'bool',
- name: 'enable',
- type: 'bool'
- }
- ],
- name: 'manageMarketFilterDAOSubscription',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [],
- name: 'marketFilterDAOAddress',
- outputs: [
- {
- internalType: 'address',
- name: '',
- type: 'address'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [],
- name: 'metadataRenderer',
- outputs: [
- {
- internalType: 'contract IMetadataRenderer',
- name: '',
- type: 'address'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'recipient',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'quantity',
- type: 'uint256'
- },
- {
- internalType: 'string',
- name: 'comment',
- type: 'string'
- },
- {
- internalType: 'address',
- name: 'mintReferral',
- type: 'address'
- }
- ],
- name: 'mintWithRewards',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'payable',
- 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: [
- {
- internalType: 'bytes[]',
- name: 'data',
- type: 'bytes[]'
- }
- ],
- name: 'multicall',
- outputs: [
- {
- internalType: 'bytes[]',
- name: 'results',
- type: 'bytes[]'
- }
- ],
- stateMutability: 'nonpayable',
- 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: 'uint256',
- name: 'quantity',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'maxQuantity',
- type: 'uint256'
- },
- {
- internalType: 'uint256',
- name: 'pricePerToken',
- type: 'uint256'
- },
- {
- internalType: 'bytes32[]',
- name: 'merkleProof',
- type: 'bytes32[]'
- },
- {
- internalType: 'string',
- name: 'comment',
- type: 'string'
- }
- ],
- name: 'purchasePresaleWithComment',
- 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[]'
- },
- {
- internalType: 'string',
- name: 'comment',
- type: 'string'
- },
- {
- internalType: 'address',
- name: 'mintReferral',
- type: 'address'
- }
- ],
- name: 'purchasePresaleWithRewards',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'payable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'quantity',
- type: 'uint256'
- },
- {
- internalType: 'string',
- name: 'comment',
- type: 'string'
- }
- ],
- name: 'purchaseWithComment',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256'
- }
- ],
- stateMutability: 'payable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'recipient',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'quantity',
- type: 'uint256'
- },
- {
- internalType: 'string',
- name: 'comment',
- type: 'string'
- }
- ],
- name: 'purchaseWithRecipient',
- 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: [],
- name: 'royaltyMintSchedule',
- outputs: [
- {
- internalType: 'uint32',
- name: '',
- type: 'uint32'
- }
- ],
- 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: 'recipient',
- type: 'address'
- }
- ],
- name: 'updateCreateReferral',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'bytes',
- name: 'args',
- type: 'bytes'
- }
- ],
- name: 'updateMarketFilterSettings',
- outputs: [
- {
- internalType: 'bytes',
- name: '',
- type: 'bytes'
- }
- ],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint32',
- name: 'newSchedule',
- type: 'uint32'
- }
- ],
- name: 'updateRoyaltyMintSchedule',
- 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: 'address',
- name: 'to',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256'
- }
- ],
- name: 'withdrawRewards',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function'
- },
- {
- inputs: [],
- name: 'zoraERC721TransferHelper',
- outputs: [
- {
- internalType: 'address',
- name: '',
- type: 'address'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'quantity',
- type: 'uint256'
- }
- ],
- name: 'zoraFeeForAmount',
- outputs: [
- {
- internalType: 'address payable',
- name: 'recipient',
- type: 'address'
- },
- {
- internalType: 'uint256',
- name: 'fee',
- type: 'uint256'
- }
- ],
- stateMutability: 'view',
- type: 'function'
- },
- {
- stateMutability: 'payable',
- type: 'receive'
- }
-];
diff --git a/packages/abis/index.ts b/packages/abis/index.ts
index 5756f57c26f1..71a06be4fd85 100644
--- a/packages/abis/index.ts
+++ b/packages/abis/index.ts
@@ -1,7 +1,3 @@
-export * from './BasePaint';
-export * from './FollowNft';
export * from './LensHub';
export * from './PublicAct';
export * from './TokenHandleRegistry';
-export * from './ZoraCreator1155Impl';
-export * from './ZoraERC721Drop';
diff --git a/packages/data/contracts.ts b/packages/data/contracts.ts
index 7adb5f3d1eb9..e0b50a681bd1 100644
--- a/packages/data/contracts.ts
+++ b/packages/data/contracts.ts
@@ -11,7 +11,3 @@ export enum TestnetContracts {
PublicActProxy = '0x4ed64Eb32C96Df0eA60BB8934798F4DFd3098Ba1',
TokenHandleRegistry = '0x66cA05cAc4e8D543028192dD28C0570a0b6e3413'
}
-
-export const BASEPAINT_CONTRACT = '0xba5e05cb26b78eda3a2f8e3b3814726305dcac83';
-export const ZORA_FIXED_PRICE_SALE_STRATEGY =
- '0x04E2516A2c207E84a1839755675dfd8eF6302F0a'; // as per https://github.com/ourzora/zora-protocol/blob/main/packages/protocol-deployments/addresses/7777777.json
diff --git a/packages/data/tracking.ts b/packages/data/tracking.ts
index 2e815ce0f63f..d3c4b793620c 100644
--- a/packages/data/tracking.ts
+++ b/packages/data/tracking.ts
@@ -48,45 +48,22 @@ export const PUBLICATION = {
},
COPY_TEXT: 'Copy publication text',
DELETE: 'Delete publication',
- LENS_OPEN_ACTIONS: {
- TIP: {
- OPEN_TIP: 'Open tip modal',
- TIP: 'Tip publication'
- }
- },
LIKE: 'Like publication',
MIRROR: 'Mirror publication',
NEW_COMMENT: 'New comment',
NEW_POST: 'New post',
NEW_QUOTE: 'New quote',
OPEN_ACTIONS: {
- BASEPAINT_NFT: {
- MINT: 'Mint BasePaint NFT',
- OPEN_LINK: 'Open BasePaint link',
- OPEN_MINT: 'Open BasePaint mint modal',
- OPEN_OPENSEA_LINK: 'Open BasePaint OpenSea link'
- },
- SOUND_RELEASE: {
- OPEN_LINK: 'Open Sound Release link',
- PAUSE: 'Pause Sound Release track',
- PLAY: 'Play Sound Release track'
- },
- UNLONELY_CHANNEL: {
- OPEN_LINK: 'Open Unlonely Channel link'
- },
- UNLONELY_NFC: {
- OPEN_LINK: 'Open Unlonely NFC link'
- },
- ZORA_NFT: {
- MINT: 'Mint Zora NFT',
- OPEN_LINK: 'Open Zora link',
- OPEN_MINT: 'Open Zora mint modal'
+ TIP: {
+ OPEN_TIP: 'Open tip modal',
+ TIP: 'Tip publication'
}
},
OPEN_COLLECTORS: 'Open collectors modal',
OPEN_GIFS: 'Open GIFs modal',
OPEN_LIKES: 'Open likes modal',
OPEN_MIRRORS: 'Open mirrors modal',
+ OPEN_NFT: 'Open NFT',
OPEN_QUOTES: 'Open quotes modal',
OPEN_VIEWS: 'Open views modal',
REPORT: 'Report publication',
diff --git a/packages/lib/getNftChainInfo.spec.ts b/packages/lib/getNftChainInfo.spec.ts
new file mode 100644
index 000000000000..2444b1522d6b
--- /dev/null
+++ b/packages/lib/getNftChainInfo.spec.ts
@@ -0,0 +1,78 @@
+import { STATIC_IMAGES_URL } from '@hey/data/constants';
+import { describe, expect, test } from 'vitest';
+
+import getNftChainInfo from './getNftChainInfo';
+
+describe('getNftChainInfo', () => {
+ test('should return Ethereum chain info when given chain ethereum', () => {
+ const expectedInfo = {
+ logo: `${STATIC_IMAGES_URL}/chains/ethereum.svg`,
+ name: 'Ethereum'
+ };
+
+ expect(getNftChainInfo('ethereum')).toEqual(expectedInfo);
+ });
+
+ test('should return Goerli chain info when given chain goerli', () => {
+ const expectedInfo = {
+ logo: `${STATIC_IMAGES_URL}/chains/ethereum.svg`,
+ name: 'Goerli'
+ };
+
+ expect(getNftChainInfo('goerli')).toEqual(expectedInfo);
+ });
+
+ test('should return Optimism chain info when given chain optimism', () => {
+ const expectedInfo = {
+ logo: `${STATIC_IMAGES_URL}/chains/optimism.svg`,
+ name: 'Optimism'
+ };
+
+ expect(getNftChainInfo('optimism')).toEqual(expectedInfo);
+ });
+
+ test('should return Optimism Testnet chain info when given chain optimism-testnet', () => {
+ const expectedInfo = {
+ logo: `${STATIC_IMAGES_URL}/chains/optimism.svg`,
+ name: 'Optimism Testnet'
+ };
+
+ expect(getNftChainInfo('optimism-testnet')).toEqual(expectedInfo);
+ });
+
+ test('should return Zora chain info when given chain zora', () => {
+ const expectedInfo = {
+ logo: `${STATIC_IMAGES_URL}/chains/zora.svg`,
+ name: 'Zora'
+ };
+
+ expect(getNftChainInfo('zora')).toEqual(expectedInfo);
+ });
+
+ test('should return Zora Testnet chain info when given chain zora-testnet', () => {
+ const expectedInfo = {
+ logo: `${STATIC_IMAGES_URL}/chains/zora.svg`,
+ name: 'Zora Testnet'
+ };
+
+ expect(getNftChainInfo('zora-testnet')).toEqual(expectedInfo);
+ });
+
+ test('should return Base chain info when given chain base', () => {
+ const expectedInfo = {
+ logo: `${STATIC_IMAGES_URL}/chains/base.svg`,
+ name: 'Base'
+ };
+
+ expect(getNftChainInfo('base')).toEqual(expectedInfo);
+ });
+
+ test('should return Base Testnet chain info when given chain base-testnet', () => {
+ const expectedInfo = {
+ logo: `${STATIC_IMAGES_URL}/chains/base.svg`,
+ name: 'Base Testnet'
+ };
+
+ expect(getNftChainInfo('base-testnet')).toEqual(expectedInfo);
+ });
+});
diff --git a/packages/lib/getZoraChainInfo.ts b/packages/lib/getNftChainInfo.ts
similarity index 51%
rename from packages/lib/getZoraChainInfo.ts
rename to packages/lib/getNftChainInfo.ts
index ec974bc945f3..5fe73ac96bb0 100644
--- a/packages/lib/getZoraChainInfo.ts
+++ b/packages/lib/getNftChainInfo.ts
@@ -1,40 +1,35 @@
import { STATIC_IMAGES_URL } from '@hey/data/constants';
-const getZoraChainInfo = (
- chain: number
+const getNftChainInfo = (
+ chain: string
): {
logo: string;
name: string;
} => {
switch (chain) {
- case 1:
- case 5:
+ case 'ethereum':
+ case 'goerli':
return {
logo: `${STATIC_IMAGES_URL}/chains/ethereum.svg`,
- name: chain === 1 ? 'Ethereum' : 'Goerli'
+ name: chain === 'ethereum' ? 'Ethereum' : 'Goerli'
};
- case 10:
- case 420:
+ case 'optimism':
+ case 'optimism-testnet':
return {
logo: `${STATIC_IMAGES_URL}/chains/optimism.svg`,
- name: chain === 10 ? 'Optimism' : 'Optimism Testnet'
+ name: chain === 'optimism' ? 'Optimism' : 'Optimism Testnet'
};
- case 7777777:
- case 999:
+ case 'zora':
+ case 'zora-testnet':
return {
logo: `${STATIC_IMAGES_URL}/chains/zora.svg`,
- name: chain === 7777777 ? 'Zora' : 'Zora Testnet'
+ name: chain === 'zora' ? 'Zora' : 'Zora Testnet'
};
- case 8453:
- case 84531:
+ case 'base':
+ case 'base-testnet':
return {
logo: `${STATIC_IMAGES_URL}/chains/base.svg`,
- name: chain === 8453 ? 'Base' : 'Base Testnet'
- };
- case 424:
- return {
- logo: `${STATIC_IMAGES_URL}/chains/pgn.svg`,
- name: 'PGN Network'
+ name: chain === 'base' ? 'Base' : 'Base Testnet'
};
default:
return {
@@ -44,4 +39,4 @@ const getZoraChainInfo = (
}
};
-export default getZoraChainInfo;
+export default getNftChainInfo;
diff --git a/packages/lib/getPublicationData.ts b/packages/lib/getPublicationData.ts
index 0a28545e238c..5ce7028a599d 100644
--- a/packages/lib/getPublicationData.ts
+++ b/packages/lib/getPublicationData.ts
@@ -4,7 +4,6 @@ import type { MetadataAsset } from '@hey/types/misc';
import { PLACEHOLDER_IMAGE } from '@hey/data/constants';
import getAttachmentsData from './getAttachmentsData';
-import removeUrlsByHostnames from './removeUrlsByHostnames';
const getPublicationData = (
metadata: PublicationMetadata
@@ -73,10 +72,7 @@ const getPublicationData = (
case 'MintMetadataV3':
return {
attachments: getAttachmentsData(metadata.attachments),
- content: removeUrlsByHostnames(
- metadata.content,
- new Set(['basepaint.art', 'unlonely.app'])
- )
+ content: metadata.content
};
case 'LiveStreamMetadataV3':
return {
diff --git a/packages/lib/getZoraChainInfo.spec.ts b/packages/lib/getZoraChainInfo.spec.ts
deleted file mode 100644
index eaab204dd367..000000000000
--- a/packages/lib/getZoraChainInfo.spec.ts
+++ /dev/null
@@ -1,106 +0,0 @@
-import { STATIC_IMAGES_URL } from '@hey/data/constants';
-import { describe, expect, test } from 'vitest';
-
-import getZoraChainInfo from './getZoraChainInfo';
-
-describe('getZoraChainInfo', () => {
- test('should return Ethereum chain info when given chain number 1', () => {
- const chainNumber = 1;
- const expectedInfo = {
- logo: `${STATIC_IMAGES_URL}/chains/ethereum.svg`,
- name: 'Ethereum'
- };
-
- expect(getZoraChainInfo(chainNumber)).toEqual(expectedInfo);
- });
-
- test('should return Goerli chain info when given chain number 5', () => {
- const chainNumber = 5;
- const expectedInfo = {
- logo: `${STATIC_IMAGES_URL}/chains/ethereum.svg`,
- name: 'Goerli'
- };
-
- expect(getZoraChainInfo(chainNumber)).toEqual(expectedInfo);
- });
-
- test('should return Optimism chain info when given chain number 10', () => {
- const chainNumber = 10;
- const expectedInfo = {
- logo: `${STATIC_IMAGES_URL}/chains/optimism.svg`,
- name: 'Optimism'
- };
-
- expect(getZoraChainInfo(chainNumber)).toEqual(expectedInfo);
- });
-
- test('should return Optimism Testnet chain info when given chain number 420', () => {
- const chainNumber = 420;
- const expectedInfo = {
- logo: `${STATIC_IMAGES_URL}/chains/optimism.svg`,
- name: 'Optimism Testnet'
- };
-
- expect(getZoraChainInfo(chainNumber)).toEqual(expectedInfo);
- });
-
- test('should return Zora chain info when given chain number 7777777', () => {
- const chainNumber = 7777777;
- const expectedInfo = {
- logo: `${STATIC_IMAGES_URL}/chains/zora.svg`,
- name: 'Zora'
- };
-
- expect(getZoraChainInfo(chainNumber)).toEqual(expectedInfo);
- });
-
- test('should return Zora Testnet chain info when given chain number 999', () => {
- const chainNumber = 999;
- const expectedInfo = {
- logo: `${STATIC_IMAGES_URL}/chains/zora.svg`,
- name: 'Zora Testnet'
- };
-
- expect(getZoraChainInfo(chainNumber)).toEqual(expectedInfo);
- });
-
- test('should return Base chain info when given chain number 8453', () => {
- const chainNumber = 8453;
- const expectedInfo = {
- logo: `${STATIC_IMAGES_URL}/chains/base.svg`,
- name: 'Base'
- };
-
- expect(getZoraChainInfo(chainNumber)).toEqual(expectedInfo);
- });
-
- test('should return Base Testnet chain info when given chain number 84531', () => {
- const chainNumber = 84531;
- const expectedInfo = {
- logo: `${STATIC_IMAGES_URL}/chains/base.svg`,
- name: 'Base Testnet'
- };
-
- expect(getZoraChainInfo(chainNumber)).toEqual(expectedInfo);
- });
-
- test('should return PGN Network chain info when given chain number 424', () => {
- const chainNumber = 424;
- const expectedInfo = {
- logo: `${STATIC_IMAGES_URL}/chains/pgn.svg`,
- name: 'PGN Network'
- };
-
- expect(getZoraChainInfo(chainNumber)).toEqual(expectedInfo);
- });
-
- test('should return default Ethereum chain info when given an unknown chain number', () => {
- const chainNumber = 123;
- const expectedInfo = {
- logo: `${STATIC_IMAGES_URL}/chains/ethereum.svg`,
- name: 'Ethereum'
- };
-
- expect(getZoraChainInfo(chainNumber)).toEqual(expectedInfo);
- });
-});
diff --git a/packages/lib/nft/getBasePaintCanvas.spec.ts b/packages/lib/nft/getBasePaintCanvas.spec.ts
deleted file mode 100644
index 4a5127669cbf..000000000000
--- a/packages/lib/nft/getBasePaintCanvas.spec.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { describe, expect, test } from 'vitest';
-
-import getBasePaintCanvas from './getBasePaintCanvas';
-
-describe('getBasePaintCanvas', () => {
- test('should return basepaint canvas id', () => {
- expect(getBasePaintCanvas('https://basepaint.art/mint/44')).contains({
- id: 44
- });
- });
-
- test('should return null if no basepaint canvas id is found', () => {
- expect(getBasePaintCanvas('https://basepaint.art/mint/')).toBeNull();
- });
-});
diff --git a/packages/lib/nft/getBasePaintCanvas.ts b/packages/lib/nft/getBasePaintCanvas.ts
deleted file mode 100644
index 504bea496d6c..000000000000
--- a/packages/lib/nft/getBasePaintCanvas.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import type { BasePaintCanvasMetadata } from '@hey/types/nft';
-
-const regex = /https:\/\/basepaint\.art\/mint\/(\d+)/;
-
-/**
- * Get BasePaint canvas id from a URL
- * @param url URL
- * @returns BasePaint canvas metadata
- */
-const getBasePaintCanvas = (url: string): BasePaintCanvasMetadata | null => {
- const matches = regex.exec(url);
- if (matches?.[1]) {
- const id = parseInt(matches[1]);
- const mintLink = `https://basepaint.art/mint/${id}`;
-
- return { id, mintLink, provider: 'basepaint' };
- }
-
- return null;
-};
-
-export default getBasePaintCanvas;
diff --git a/packages/lib/nft/getNft.spec.ts b/packages/lib/nft/getNft.spec.ts
deleted file mode 100644
index 8ec6306dc182..000000000000
--- a/packages/lib/nft/getNft.spec.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { describe, expect, test } from 'vitest';
-
-import getNft from './getNft';
-
-describe('getNft', () => {
- test('should return null if the list of URLs is empty', () => {
- const urls: string[] = [];
- expect(getNft(urls)).toBeNull();
- });
-
- test('should return zora nft', () => {
- const urls: string[] = [
- 'https://zora.co/collect/eth:0x2e1aa38556cd7eb7855a37f83101ee182c7af9b5/3'
- ];
- expect(getNft(urls)).contains({
- address: '0x2e1aa38556cd7eb7855a37f83101ee182c7af9b5',
- chain: 'eth',
- token: '3'
- });
- });
-
- test('should return base paint canvas', () => {
- const urls: string[] = ['https://basepaint.art/mint/44'];
- expect(getNft(urls)).contains({ id: 44 });
- });
-
- test('should return unlonely nfc', () => {
- const urls: string[] = ['https://www.unlonely.app/nfc/420'];
- expect(getNft(urls)).contains({ id: '420' });
- });
-
- test('should return unlonely channel', () => {
- const urls: string[] = ['https://www.unlonely.app/channels/hey'];
- expect(getNft(urls)).contains({ slug: 'hey' });
- });
-
- test('should return null if there are no known URLs', () => {
- const urls: string[] = ['https://example.com'];
- expect(getNft(urls)).toBeNull();
- });
-
- test('should return null if the known URLs do not have hostname "zora.co"', () => {
- const urls: string[] = ['https://example.com', 'https://unknown.com'];
- expect(getNft(urls)).toBeNull();
- });
-});
diff --git a/packages/lib/nft/getNft.ts b/packages/lib/nft/getNft.ts
deleted file mode 100644
index ad8d160eb7b6..000000000000
--- a/packages/lib/nft/getNft.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-import type { NftMetadata } from '@hey/types/nft';
-
-import getBasePaintCanvas from './getBasePaintCanvas';
-import getSoundRelease from './getSoundRelease';
-import getUnlonelyChannel from './getUnlonelyChannel';
-import getUnlonelyNfc from './getUnlonelyNfc';
-import getZoraNFT from './getZoraNft';
-
-export const knownMintHostnames = new Set([
- 'zora.co',
- 'testnet.zora.co',
- 'basepaint.art',
- 'unlonely.app',
- 'sound.xyz'
-]);
-
-/**
- * Get NFT metadata from a list of URLs
- * @param urls List of URLs
- * @returns NFT metadata
- */
-const getNft = (urls: string[]): NftMetadata | null => {
- if (!urls.length) {
- return null;
- }
-
- const knownUrls = urls.filter((url) => {
- const parsedUrl = new URL(url);
- const hostname = parsedUrl.hostname.replace('www.', '');
- return knownMintHostnames.has(hostname);
- });
-
- if (!knownUrls.length) {
- return null;
- }
-
- const url = knownUrls[0];
- const hostname = new URL(url).hostname.replace('www.', '');
- const path = new URL(url).pathname;
-
- switch (true) {
- case hostname === 'zora.co':
- case hostname === 'testnet.zora.co':
- return getZoraNFT(url);
- case hostname === 'basepaint.art':
- return getBasePaintCanvas(url);
- case hostname === 'unlonely.app' && path.startsWith('/channels'):
- return getUnlonelyChannel(url);
- case hostname === 'unlonely.app' && path.startsWith('/nfc'):
- return getUnlonelyNfc(url);
- case hostname === 'sound.xyz':
- return getSoundRelease(url);
- default:
- return null;
- }
-};
-
-export default getNft;
diff --git a/packages/lib/nft/getSoundRelease.ts b/packages/lib/nft/getSoundRelease.ts
deleted file mode 100644
index 97b0b54e5f8d..000000000000
--- a/packages/lib/nft/getSoundRelease.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import type { SoundReleaseMetadata } from '@hey/types/nft';
-
-const regex = /https:\/\/www\.sound\.xyz\/(\w+)\/([\w-]+)/;
-
-/**
- * Get Sound release slug and handle from a URL
- * @param url URL
- * @returns Sound release slug and handle metadata
- */
-const getSoundRelease = (url: string): null | SoundReleaseMetadata => {
- const matches = regex.exec(url);
- if (matches && matches.length >= 3) {
- const handle = matches[1];
- const slug = matches[2];
- const mintLink = `https://www.sound.xyz/${handle}/${slug}`;
-
- return { handle, mintLink, provider: 'sound-release', slug };
- }
-
- return null;
-};
-
-export default getSoundRelease;
diff --git a/packages/lib/nft/getUnlonelyChannel.spec.ts b/packages/lib/nft/getUnlonelyChannel.spec.ts
deleted file mode 100644
index 9bfb359da6f1..000000000000
--- a/packages/lib/nft/getUnlonelyChannel.spec.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { describe, expect, test } from 'vitest';
-
-import getUnlonelyChannel from './getUnlonelyChannel';
-
-describe('getUnlonelyChannel', () => {
- test('should return unlonely channel', () => {
- expect(
- getUnlonelyChannel('https://www.unlonely.app/channels/hey')
- ).contains({ slug: 'hey' });
- });
-
- test('should return null if no unlonely channel slug is found', () => {
- expect(getUnlonelyChannel('https://www.unlonely.app/channels/')).toBeNull();
- });
-});
diff --git a/packages/lib/nft/getUnlonelyChannel.ts b/packages/lib/nft/getUnlonelyChannel.ts
deleted file mode 100644
index 1017e4ee520c..000000000000
--- a/packages/lib/nft/getUnlonelyChannel.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import type { UnlonelyChannelMetadata } from '@hey/types/nft';
-
-const regex = /https:\/\/www\.unlonely\.app\/channels\/(\w+)/;
-
-/**
- * Get Unlonely channel slug from a URL
- * @param url URL
- * @returns Unlonely channel slug metadata
- */
-const getUnlonelyChannel = (url: string): null | UnlonelyChannelMetadata => {
- const matches = regex.exec(url);
- if (matches?.[1]) {
- const slug = matches[1];
- const mintLink = `https://www.unlonely.app/channels/${slug}`;
-
- return { mintLink, provider: 'unlonely-channel', slug };
- }
-
- return null;
-};
-
-export default getUnlonelyChannel;
diff --git a/packages/lib/nft/getUnlonelyNfc.spec.ts b/packages/lib/nft/getUnlonelyNfc.spec.ts
deleted file mode 100644
index 4c5e1e02526c..000000000000
--- a/packages/lib/nft/getUnlonelyNfc.spec.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { describe, expect, test } from 'vitest';
-
-import getUnlonelyNfc from './getUnlonelyNfc';
-
-describe('getUnlonelyNfc', () => {
- test('should return unlonely nfc', () => {
- expect(getUnlonelyNfc('https://www.unlonely.app/nfc/50')).contains({
- id: '50'
- });
- });
-
- test('should return null if no unlonely nfc id is found', () => {
- expect(getUnlonelyNfc('https://www.unlonely.app/nfc/')).toBeNull();
- });
-});
diff --git a/packages/lib/nft/getUnlonelyNfc.ts b/packages/lib/nft/getUnlonelyNfc.ts
deleted file mode 100644
index d287f174af58..000000000000
--- a/packages/lib/nft/getUnlonelyNfc.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import type { UnlonelyNfcMetadata } from '@hey/types/nft';
-
-const regex = /https:\/\/www\.unlonely\.app\/nfc\/(\w+)/;
-
-/**
- * Get Unlonely nfc id from a URL
- * @param url URL
- * @returns Unlonely nfc id metadata
- */
-const getUnlonelyNfc = (url: string): null | UnlonelyNfcMetadata => {
- const matches = regex.exec(url);
- if (matches?.[1]) {
- const id = matches[1];
- const mintLink = `https://www.unlonely.app/nfc/${id}`;
-
- return { id, mintLink, provider: 'unlonely-nfc' };
- }
-
- return null;
-};
-
-export default getUnlonelyNfc;
diff --git a/packages/lib/nft/getZoraChainIsMainnet.ts b/packages/lib/nft/getZoraChainIsMainnet.ts
deleted file mode 100644
index 1c6bbdbe9927..000000000000
--- a/packages/lib/nft/getZoraChainIsMainnet.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-const mainnetChains = ['eth', 'oeth', 'base', 'zora'];
-
-/**
- * Returns true if the chain is mainnet
- * @param chain The chain to check
- * @returns True if the chain is mainnet
- */
-const getZoraChainIsMainnet = (chain: string): boolean => {
- return mainnetChains.includes(chain);
-};
-
-export default getZoraChainIsMainnet;
diff --git a/packages/lib/nft/getZoraNft.spec.ts b/packages/lib/nft/getZoraNft.spec.ts
deleted file mode 100644
index 3e7a5f880c69..000000000000
--- a/packages/lib/nft/getZoraNft.spec.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import { describe, expect, test } from 'vitest';
-
-import getZoraNFT from './getZoraNft';
-
-describe('getZoraNft', () => {
- test('should return zora collection', () => {
- expect(
- getZoraNFT(
- 'https://zora.co/collect/eth:0x2e1aa38556cd7eb7855a37f83101ee182c7af9b5'
- )
- ).contains({
- address: '0x2e1aa38556cd7eb7855a37f83101ee182c7af9b5',
- chain: 'eth'
- });
- });
-
- test('should return zora collection with token', () => {
- expect(
- getZoraNFT(
- 'https://zora.co/collect/base:0x2e1aa38556cd7eb7855a37f83101ee182c7af9b5/1'
- )
- ).contains({
- address: '0x2e1aa38556cd7eb7855a37f83101ee182c7af9b5',
- chain: 'base',
- token: '1'
- });
- });
-
- test('should return zora collection with premint token', () => {
- expect(
- getZoraNFT(
- 'https://zora.co/collect/zora:0x2e1aa38556cd7eb7855a37f83101ee182c7af9b5/premint-1'
- )
- ).contains({
- address: '0x2e1aa38556cd7eb7855a37f83101ee182c7af9b5',
- chain: 'zora',
- token: 'premint-1'
- });
- });
-});
diff --git a/packages/lib/nft/getZoraNft.ts b/packages/lib/nft/getZoraNft.ts
deleted file mode 100644
index 297d53b56c37..000000000000
--- a/packages/lib/nft/getZoraNft.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import type { BasicNftMetadata } from '@hey/types/nft';
-
-import { REWARDS_ADDRESS } from '@hey/data/constants';
-
-import getZoraChainIsMainnet from './getZoraChainIsMainnet';
-
-export const regex =
- /https:\/\/(?:testnet\.)?zora\.co\/collect\/(eth|oeth|base|zora|gor|ogor|basegor|zgor):(0x[\dA-Fa-f]{40})\/?([\w-]+)?/;
-
-/**
- * Get Zora NFT metadata from a URL
- * @param url URL
- * @returns Zora NFT metadata
- */
-const getZoraNFT = (url: string): BasicNftMetadata | null => {
- const matches = regex.exec(url);
- if (regex.test(url) && matches && matches.length >= 3) {
- const chain = matches[1];
- const address = matches[2];
- const token = matches[3];
-
- const network = getZoraChainIsMainnet(chain) ? '' : 'testnet.';
- const mintLink = `https://${network}zora.co/collect/${chain}:${address}/${
- token || ''
- }?referrer=${REWARDS_ADDRESS}`;
-
- return { address, chain, mintLink, provider: 'zora', token };
- }
-
- return null;
-};
-
-export default getZoraNFT;
diff --git a/packages/lib/removeUrlsByHostnames.spec.ts b/packages/lib/removeUrlsByHostnames.spec.ts
deleted file mode 100644
index 4c5381880216..000000000000
--- a/packages/lib/removeUrlsByHostnames.spec.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { describe, expect, test } from 'vitest';
-
-import removeUrlsByHostnames from './removeUrlsByHostnames';
-
-describe('removeUrlsByHostnames', () => {
- test('should remove URLs containing specified hostnames from content', () => {
- const content =
- 'Collect my art at https://zora.co/collect/zora:0xeb0851f650150fec6b80ed894d95d152e7166a5b';
- const hostnames = new Set(['zora.co']);
- const expectedContent = 'Collect my art at';
-
- expect(removeUrlsByHostnames(content, hostnames)).toEqual(expectedContent);
- });
-
- test('should handle multiple hostnames in the regex pattern correctly', () => {
- const content =
- 'Collect my art at Zora https://zora.co/collect/zora:0xeb0851f650150fec6b80ed894d95d152e7166a5b and basepaint https://basepaint.art/mint/44';
- const hostnames = new Set(['zora.co', 'basepaint.art']);
- const expectedContent = 'Collect my art at Zora and basepaint';
-
- expect(removeUrlsByHostnames(content, hostnames)).toEqual(expectedContent);
- });
-
- test('should return the same content if no URLs match the specified hostnames', () => {
- const content = 'This is a sample text without any URLs.';
- const hostnames = new Set(['example.com']);
-
- expect(removeUrlsByHostnames(content, hostnames)).toBe(content);
- });
-});
diff --git a/packages/lib/removeUrlsByHostnames.ts b/packages/lib/removeUrlsByHostnames.ts
deleted file mode 100644
index 21a374df5cfe..000000000000
--- a/packages/lib/removeUrlsByHostnames.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-const removeUrlsByHostnames = (
- content: string,
- hostnames: Set
-): string => {
- const regexPattern = Array.from(hostnames)
- .map(
- (hostname) =>
- `https?:\\/\\/(www\\.)?${hostname.replace('.', '\\.')}[\\S]+`
- )
- .join('|');
- const regex = new RegExp(regexPattern, 'g');
-
- return content
- .replace(regex, '')
- .replace(/\s{2,}/g, ' ')
- .trim();
-};
-
-export default removeUrlsByHostnames;
diff --git a/packages/types/misc.d.ts b/packages/types/misc.d.ts
index cb48eb7cc0e2..bed0e82c2fd6 100644
--- a/packages/types/misc.d.ts
+++ b/packages/types/misc.d.ts
@@ -26,15 +26,15 @@ export interface UserSuggestion {
export interface Nft {
chain: null | string;
- collectionName: null | string;
- contractAddress: null | string;
- creatorAddress: null | string;
+ collectionName: string;
+ contractAddress: `0x${string}`;
+ creatorAddress: `0x${string}`;
endTime: null | string;
- mediaUrl: null | string;
+ mediaUrl: string;
mintCount: null | number;
mintStatus: 'closed' | 'live' | null | string;
mintUrl: null | string;
- schema: 'erc1155' | 'erc721' | null | string;
+ schema: 'erc1155' | 'erc721' | string;
sourceUrl: string;
}
diff --git a/packages/types/nft.d.ts b/packages/types/nft.d.ts
deleted file mode 100644
index e2ee862bfaf2..000000000000
--- a/packages/types/nft.d.ts
+++ /dev/null
@@ -1,131 +0,0 @@
-export interface NftProviderWithMintLink {
- mintLink: string;
- provider:
- | 'basepaint'
- | 'sound-release'
- | 'unlonely-channel'
- | 'unlonely-nfc'
- | 'zora';
-}
-
-export interface BasicNftMetadata extends NftProviderWithMintLink {
- address: string;
- chain: string;
- token: string;
-}
-
-export interface BasePaintCanvasMetadata extends NftProviderWithMintLink {
- id: number;
-}
-
-export interface UnlonelyChannelMetadata extends NftProviderWithMintLink {
- slug: string;
-}
-
-export interface UnlonelyNfcMetadata extends NftProviderWithMintLink {
- id: string;
-}
-
-export interface SoundReleaseMetadata extends NftProviderWithMintLink {
- handle: string;
- slug: string;
-}
-
-export type NftMetadata =
- | BasePaintCanvasMetadata
- | BasicNftMetadata
- | UnlonelyChannelMetadata
- | UnlonelyNfcMetadata;
-
-export interface ZoraNft {
- address: `0x${string}`;
- chainId: number;
- contractStandard: 'ERC1155' | 'ERC721';
- contractType:
- | 'ERC1155_COLLECTION_TOKEN'
- | 'ERC1155_COLLECTION'
- | 'ERC721_DROP'
- | 'ERC721_SINGLE_EDITION';
- coverImageUrl: string;
- creator: `0x${string}`;
- description: string;
- entityType: 'CONTRACT' | 'TOKEN';
- isOpenEdition: boolean;
- maxSupply: number;
- mediaUrl: string;
- name: string;
- owner: `0x${string}`;
- price: string;
- remainingSupply: number;
- tokenId: string;
- totalMinted: number;
-}
-
-export interface BasePaintCanvas {
- bitmap: {
- gif: string;
- };
- canContribute: boolean;
- canMint: boolean;
- contributions: {
- account: {
- id: string;
- screenName: string;
- totalPixels: number;
- };
- }[];
- id: number;
- palette: string[];
- pixelsCount: number;
- theme: string;
- totalEarned: string;
- totalMints: number;
-}
-
-export interface UnlonelyChannel {
- description: string;
- id: number;
- isLive: boolean;
- name: string;
- playbackUrl: string;
- slug: string;
-}
-
-export interface UnlonelyNfc {
- createdAt: string;
- id: number;
- openseaLink: string;
- owner: {
- FCImageUrl: string;
- lensImageUrl: string;
- username: string;
- };
- title: string;
- videoLink: string;
- videoThumbnail: string;
-}
-
-export interface SoundRelease {
- artist: {
- name: string;
- user: {
- avatar: {
- url: string;
- };
- };
- };
- coverImage: {
- dominantColor: string;
- url: string;
- };
- numSold: number;
- title: string;
- track: {
- audio: {
- audio256k: {
- url: string;
- };
- };
- normalizedPeaks: number[];
- };
-}