From 6e8d937bc145d0cafeb789710393f8ea62856bfb Mon Sep 17 00:00:00 2001 From: akiraonstarknet Date: Sun, 15 Sep 2024 02:21:10 +0530 Subject: [PATCH 01/13] add OG NFT backend --- .env.sample | 4 ++ prisma/schema.prisma | 74 ++++++++++++---------- src/app/api/users/ognft/[address]/route.ts | 73 +++++++++++++++++++++ 3 files changed, 119 insertions(+), 32 deletions(-) create mode 100644 src/app/api/users/ognft/[address]/route.ts diff --git a/.env.sample b/.env.sample index 31d1ac37..bb479489 100644 --- a/.env.sample +++ b/.env.sample @@ -1,4 +1,8 @@ NEXT_PUBLIC_RPC_URL= RPC_URL= +# Referral and Signing storage DB, not required unless u r testing this feature DATABASE_URL= + +# OG NFT Signer. Not required unless u r testing this feature +ACCOUNT_PK= \ No newline at end of file diff --git a/prisma/schema.prisma b/prisma/schema.prisma index ae8a6e8d..aae5cb14 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -1,32 +1,42 @@ -datasource db { - url = env("DATABASE_URL") - provider = "postgresql" -} - -generator client { - provider = "prisma-client-js" -} - -model User { - id Int @id @default(autoincrement()) - address String @unique - isTncSigned Boolean? @default(false) - message String? - tncDocVersion String? @default("1.0") - referralCode String @unique - referrals Referral[] - referralCount Int? @default(0) - - createdAt DateTime @default(now()) -} - -model Referral { - referralId Int @id @default(autoincrement()) - refreeAddress String @unique - createdAt DateTime @default(now()) - - User User @relation(fields: [userId], references: [id]) - userId Int - - @@unique([userId, refreeAddress], name: "unique_referral") -} +datasource db { + url = env("DATABASE_URL") + provider = "postgresql" +} + +generator client { + provider = "prisma-client-js" +} + +model User { + id Int @id @default(autoincrement()) + address String @unique + isTncSigned Boolean? @default(false) + message String? + tncDocVersion String? @default("1.0") + referralCode String @unique + referrals Referral[] + referralCount Int? @default(0) + + createdAt DateTime @default(now()) + og_nft_users og_nft_users? +} + +model Referral { + referralId Int @id @default(autoincrement()) + refreeAddress String @unique + createdAt DateTime @default(now()) + + User User @relation(fields: [userId], references: [id]) + userId Int + + @@unique([userId, refreeAddress], name: "unique_referral") +} + +model og_nft_users { + id Int @id @default(autoincrement()) + userId Int @unique + User User @relation(fields: [userId], references: [id]) + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} diff --git a/src/app/api/users/ognft/[address]/route.ts b/src/app/api/users/ognft/[address]/route.ts new file mode 100644 index 00000000..f1bc20bd --- /dev/null +++ b/src/app/api/users/ognft/[address]/route.ts @@ -0,0 +1,73 @@ +import { NextResponse } from "next/server"; +import { ec, hash, num } from "starknet"; +import BigNumber from "bignumber.js"; +import { standariseAddress } from "@/utils"; +import { PrismaClient } from '@prisma/client'; +import { starknetChainId } from "@starknet-react/core"; +import { mainnet } from "@starknet-react/chains"; + +export const revalidate = 0; + +const prisma = new PrismaClient(); +const tenPow18 = new BigNumber(10).pow(18); + +export async function GET(req: Request, context: any) { + try { + const { params } = context; + const addr = params.address; + + // standardised address + let pAddr = addr; + try { + pAddr = standariseAddress(addr); + } catch (e) { + throw new Error('Invalid address'); + } + + let queryAddr = pAddr; + + if(!process.env.ACCOUNT_PK) { + throw new Error('Invalid signer'); + } + + const isOgUser = await prisma.user.findUnique({ + where: { + address: queryAddr + }, + include: { + og_nft_users: true + } + }); + const isOgNFTUser = isOgUser && isOgUser.og_nft_users ? true : false; + + if (!isOgUser) { + return NextResponse.json({ + address: '', + hash: '', + sig: [] + }, { + status: 404 + }) + } + + const hash1 = hash.computePedersenHash(pAddr, 0); + + const sig = ec.starkCurve.sign(hash1, process.env.ACCOUNT_PK); + + return NextResponse.json({ + address: pAddr, + isOgNFTUser, + hash: hash1, + sig: [sig.r.toString(), sig.s.toString()] + }) + } catch(err) { + console.error('Error /api/users/:address', err); + return NextResponse.json({ + address: '', + hash: '', + sig: [] + }, { + status: 500 + }) + } +} \ No newline at end of file From 73ed2a715910382976c88991acaf00c845db17a7 Mon Sep 17 00:00:00 2001 From: akiraonstarknet Date: Sun, 15 Sep 2024 03:41:24 +0530 Subject: [PATCH 02/13] add NFT claim on UI --- .env.sample | 4 +- public/og_nft_eligible_users.json | 37 ++++++ src/abi/nft.abi.json | 118 +++++++++++++++++++ src/app/api/users/ognft/[address]/route.ts | 125 ++++++++++----------- src/app/community/page.tsx | 99 +++++++++++++++- 5 files changed, 315 insertions(+), 68 deletions(-) create mode 100644 public/og_nft_eligible_users.json create mode 100644 src/abi/nft.abi.json diff --git a/.env.sample b/.env.sample index bb479489..f538545e 100644 --- a/.env.sample +++ b/.env.sample @@ -5,4 +5,6 @@ RPC_URL= DATABASE_URL= # OG NFT Signer. Not required unless u r testing this feature -ACCOUNT_PK= \ No newline at end of file +# Note: Below sample addresses are for Sepolia testnet +ACCOUNT_PK=0x0574ba4998dd9aedf1c4d6e56b747b29256a795bc3846437d121cd64b972bdd8 +NEXT_PUBLIC_OG_NFT_CONTRACT=0x3cb654f2f557a7f71a0c16d97c05a2dec62a0b744979d11afc95b804e1d7307 \ No newline at end of file diff --git a/public/og_nft_eligible_users.json b/public/og_nft_eligible_users.json new file mode 100644 index 00000000..24ca1245 --- /dev/null +++ b/public/og_nft_eligible_users.json @@ -0,0 +1,37 @@ +[ + "0x5b55db55f5884856860e63f3595b2ec6b2c9555f3f507b4ca728d8e427b7864", + "0x5095078578a59f8a9c17df97188db1b59574c6d4836dd3e705fe8537624228a", + "0x18489438975ee3c6bc18add415d7889a9630547398f26bb5dee27481216a67d", + "0x43fbdfdd75f2726f999ad87833ca6372261b200e956cd8df7986e4fc518d0eb", + "0x4d1740c01d87e64d7b5149616724bfe24537e200b3f13f6b8b8e760d0ec742", + "0x29dbf109d0f4c8fa807c14e867df953ab3bc9b39d9f66e9a13f1922d10243bb", + "0x708a705b8ee042cde294269c20f65790a9bb535e6e76b9df600821e322e03cf", + "0x36aa3388e7da64d6adf08653abc5699f681ffedacd7938d2e115f73919be294", + "0x47ab88662a0173b6014bfc41f7479cf8f973a7212fe5bc9abf8f40138c0c979", + "0x46d703df4dd4e1b8196b294ec295c8c66097836cd4085372299ac53dff5d478", + "0x11dfbced0c610ae46447105b97477b93e9bbc2f346980c7de51d3622f310201", + "0x3950ce99fa8c34188f591d55ccbeafb109c6215cb33f37f5b22d14d1462ae9c", + "0x55741fd3ec832f7b9500e24a885b8729f213357be4a8e209c4bca1f3b909ae", + "0x578ecc0659983818087560740a0842e846a516962231cbef4658735adb9063c", + "0x5caa422de56ffa4d6bbcf8cea2d8c7a3d0c490edf2155d3b29a68d9ddc55479", + "0x7a900c5b496d15bbb1c3c69d090e890a4b19dbceabee72232d4f2bec67ff4c", + "0x7f5d5b58f2a1c504f6a8d0e47269c903485582308b6f3415c27a561e0d1a6fa", + "0x17603b7963b1e2357a57e3c16f83abacef6bd8cf59e5394c34ae72ce566da2", + "0x4bbdde9359d8bc7e513f510f9080306dbf267acb41228a4706d1b55f2fd065d", + "0x4015548595f22ccf56f6f42ada31a5d8eb7cb307c4e9e550b578d44fa25bcc", + "0x50393e851e40de930abcd9569d9df55883b9f2836d4bae724f126d2258cd292", + "0x2915ca6c218df8b394237b278cc920668fd504268494e1ebcf108a660cd7136", + "0x552760d9b7d629e2daf636129fb519ac17a739e1a1fa05ee928ccb1f62c26cf", + "0x14f59c23735b4aaaf6b6c0df567cacff9adc27f50dcb8b5270cf1237605c263", + "0x6733e297fe300f78f48c7106ad550626377aa732cef360867218c08a536ea5e", + "0x1ca34f742a91a588a3e770c8c8c8618a0713d7f64fda7935d42dcfcf4adffa0", + "0x6a98eef8b1ce965ec9f6daf4c896f5c21217f2365652c30d462b13a1858ed7c", + "0x5105649f42252f79109356e1c8765b7dcdb9bf4a6a68534e7fc962421c7efd2", + "0x36177b6741a43c219602ce857c18e445920d5a6ea5f4ee3a0240e8ae319bbf5", + "0x679316db27cdb5d579d0508859ce450db3c2a2483e3628f7c1fc80b52e87634", + "0x7463d3ebcd4c6de2035cca849814bbba4dd7820dac25e074e78087903d1b585", + "0x7342070d73d4ceef7e7c84420acb3026720e88fef10302fc11fd25a7ee0b715", + "0x2b27457428b94b38ccad5339ebc17a211b7c482c008ac8ad22e01b30e923628", + "0x67b72d3df972e5816b07ad4794af8e85c968409554281880149e96f09df1d56", + "0x54d159fa98b0f67b3d3b287aae0340bf595d8f2a96ed99532785aeef08c1ede" +] diff --git a/src/abi/nft.abi.json b/src/abi/nft.abi.json new file mode 100644 index 00000000..8eeba6d9 --- /dev/null +++ b/src/abi/nft.abi.json @@ -0,0 +1,118 @@ +[ + { + "name": "name", + "type": "function", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "name": "symbol", + "type": "function", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "name": "mint", + "type": "function", + "inputs": [ + { + "name": "nftId", + "type": "core::integer::u8" + }, + { + "name": "rewardEarned", + "type": "core::integer::u128" + }, + { + "name": "hash", + "type": "core::felt252" + }, + { + "name": "signature", + "type": "core::array::Array::" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "name": "upgrade", + "type": "function", + "inputs": [ + { + "name": "newClassHash", + "type": "core::starknet::class_hash::ClassHash" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "name": "set_settings", + "type": "function", + "inputs": [ + { + "name": "settings", + "type": "defispring::nft::Settings" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "name": "get_settings", + "type": "function", + "inputs": [], + "outputs": [ + { + "type": "defispring::nft::Settings" + } + ], + "state_mutability": "view" + }, + { + "name": "set_pubkey", + "type": "function", + "inputs": [ + { + "name": "pubkey", + "type": "core::felt252" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "name": "get_pubkey", + "type": "function", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "name": "set_token_uri", + "type": "function", + "inputs": [ + { + "name": "uri", + "type": "core::byte_array::ByteArray" + } + ], + "outputs": [], + "state_mutability": "external" + } +] diff --git a/src/app/api/users/ognft/[address]/route.ts b/src/app/api/users/ognft/[address]/route.ts index f1bc20bd..5b04e197 100644 --- a/src/app/api/users/ognft/[address]/route.ts +++ b/src/app/api/users/ognft/[address]/route.ts @@ -1,73 +1,72 @@ -import { NextResponse } from "next/server"; -import { ec, hash, num } from "starknet"; -import BigNumber from "bignumber.js"; -import { standariseAddress } from "@/utils"; -import { PrismaClient } from '@prisma/client'; -import { starknetChainId } from "@starknet-react/core"; -import { mainnet } from "@starknet-react/chains"; +import { NextResponse } from 'next/server'; +import { ec, hash } from 'starknet'; +import { standariseAddress } from '@/utils'; +import OGNFTUsersJson from '@public/og_nft_eligible_users.json'; -export const revalidate = 0; - -const prisma = new PrismaClient(); -const tenPow18 = new BigNumber(10).pow(18); +export const revalidate = 3600; export async function GET(req: Request, context: any) { - try { - const { params } = context; - const addr = params.address; + try { + const { params } = context; + const addr = params.address; - // standardised address - let pAddr = addr; - try { - pAddr = standariseAddress(addr); - } catch (e) { - throw new Error('Invalid address'); - } + // standardised address + let pAddr = addr; + try { + pAddr = standariseAddress(addr); + } catch (e) { + throw new Error('Invalid address'); + } - let queryAddr = pAddr; - - if(!process.env.ACCOUNT_PK) { - throw new Error('Invalid signer'); - } + const queryAddr = pAddr; - const isOgUser = await prisma.user.findUnique({ - where: { - address: queryAddr - }, - include: { - og_nft_users: true - } - }); - const isOgNFTUser = isOgUser && isOgUser.og_nft_users ? true : false; + if (!process.env.ACCOUNT_PK) { + throw new Error('Invalid signer'); + } - if (!isOgUser) { - return NextResponse.json({ - address: '', - hash: '', - sig: [] - }, { - status: 404 - }) - } + const isOgNFTUser = OGNFTUsersJson.includes(queryAddr); - const hash1 = hash.computePedersenHash(pAddr, 0); - - const sig = ec.starkCurve.sign(hash1, process.env.ACCOUNT_PK); + // total ogNFTUsers + const totalOgNFTUsers = OGNFTUsersJson.length; - return NextResponse.json({ - address: pAddr, - isOgNFTUser, - hash: hash1, - sig: [sig.r.toString(), sig.s.toString()] - }) - } catch(err) { - console.error('Error /api/users/:address', err); - return NextResponse.json({ - address: '', - hash: '', - sig: [] - }, { - status: 500 - }) + console.log('isOgUser', isOgNFTUser); + if (!isOgNFTUser) { + return NextResponse.json( + { + address: '', + hash: '', + isOgNFTUser: false, + sig: [], + totalOgNFTUsers, + }, + { + status: 200, + }, + ); } -} \ No newline at end of file + + const hash1 = hash.computePedersenHash(pAddr, 0); + + const sig = ec.starkCurve.sign(hash1, process.env.ACCOUNT_PK); + + return NextResponse.json({ + address: pAddr, + isOgNFTUser, + hash: hash1, + sig: [sig.r.toString(), sig.s.toString()], + totalOgNFTUsers, + }); + } catch (err) { + console.error('Error /api/users/:address', err); + return NextResponse.json( + { + address: '', + hash: '', + sig: [], + }, + { + status: 500, + }, + ); + } +} diff --git a/src/app/community/page.tsx b/src/app/community/page.tsx index a00f42b4..21756890 100644 --- a/src/app/community/page.tsx +++ b/src/app/community/page.tsx @@ -1,7 +1,10 @@ +'use client'; + import { NextPage } from 'next'; -import React from 'react'; +import React, { useEffect, useMemo } from 'react'; import x from '@/assets/x.svg'; import illustration from '@/assets/illustration.svg'; +import NFTAbi from '../../abi/nft.abi.json'; import { Box, @@ -10,11 +13,77 @@ import { Container, Link, Text, + Flex, + Spinner, } from '@chakra-ui/react'; +import { atomWithQuery } from 'jotai-tanstack-query'; +import { addressAtom } from '@/store/claims.atoms'; +import { useAtomValue } from 'jotai'; +import { + useContractRead, + useContractWrite, + useProvider, +} from '@starknet-react/core'; +import { Contract } from 'starknet'; interface CommunityPage {} +interface OGNFTUserData { + address: string; + hash: string; + isOgNFTUser: boolean; + sig: string[]; + totalOgNFTUsers: number; +} +const isOGNFTEligibleAtom = atomWithQuery((get) => { + return { + queryKey: ['isOGNFTEligibleAtom'], + queryFn: async ({ queryKey }: any): Promise => { + const address = get(addressAtom); + if (!address) return null; + const data = await fetch(`/api/users/ognft/${address}`); + return data.json(); + }, + refetchInterval: 5000, + }; +}); + const CommunityPage: NextPage = () => { + const isOGNFTEligible = useAtomValue(isOGNFTEligibleAtom); + const address = useAtomValue(addressAtom); + const { provider } = useProvider(); + const isOGNFTLoading = useMemo(() => { + return isOGNFTEligible.isLoading || isOGNFTEligible.isError; + }, [isOGNFTEligible.isLoading, isOGNFTEligible.isError]); + + const ogNFTContract = new Contract( + NFTAbi, + process.env.NEXT_PUBLIC_OG_NFT_CONTRACT || '', + provider, + ); + const { writeAsync: claimOGNFT } = useContractWrite({ + calls: [ + ogNFTContract.populate('mint', { + nftId: 1, + rewardEarned: 0, + hash: isOGNFTEligible.data?.hash || '0', + signature: isOGNFTEligible.data?.sig || [], + }), + ], + }); + + const { data: ogNFTBalance } = useContractRead({ + abi: NFTAbi, + address: process.env.NEXT_PUBLIC_OG_NFT_CONTRACT || '0', + functionName: 'balanceOf', + args: [address || '0x0'], + }); + + useEffect(() => { + console.log('ogNFTBalance', ogNFTBalance); + console.log('isOGNFTEligible', isOGNFTEligible); + }, [ogNFTBalance, isOGNFTEligible]); + return ( = () => { Your Stats - = () => { zIndex: -1, }} > - + Coming soon - + + + + + Debug info: | isOGNFTEligible:{' '} + {isOGNFTEligible.data?.isOgNFTUser ? 'true' : 'false'} | + totalOgNFTUsers: {isOGNFTEligible.data?.totalOgNFTUsers} | sig:{' '} + {JSON.stringify(isOGNFTEligible.data?.sig)} + + + You will be able to check your points and claim your NFTs here soon. From ac4827bc2874164cd66497dfc71d566ba5f67ade Mon Sep 17 00:00:00 2001 From: akiraonstarknet Date: Mon, 16 Sep 2024 03:54:26 +0530 Subject: [PATCH 03/13] update og mock addresses --- public/og_nft_eligible_users.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/og_nft_eligible_users.json b/public/og_nft_eligible_users.json index 24ca1245..f454bbf7 100644 --- a/public/og_nft_eligible_users.json +++ b/public/og_nft_eligible_users.json @@ -33,5 +33,7 @@ "0x7342070d73d4ceef7e7c84420acb3026720e88fef10302fc11fd25a7ee0b715", "0x2b27457428b94b38ccad5339ebc17a211b7c482c008ac8ad22e01b30e923628", "0x67b72d3df972e5816b07ad4794af8e85c968409554281880149e96f09df1d56", - "0x54d159fa98b0f67b3d3b287aae0340bf595d8f2a96ed99532785aeef08c1ede" + "0x54d159fa98b0f67b3d3b287aae0340bf595d8f2a96ed99532785aeef08c1ede", + "0x87c9802f347e6f5ed8d20b5cbd2e826b59a9aa63d83745e75abb2a5aae613", + "0x1bae0e3cd91e0096bf2283d98390bd29579b39c93964c1d2a3eec8d5cf51c61" ] From 2fdab8103c9d4bb35f3b98db463f4327dd54625c Mon Sep 17 00:00:00 2001 From: EjembiEmmanuel Date: Wed, 18 Sep 2024 17:46:13 +0100 Subject: [PATCH 04/13] feat: add OG Section in community page --- src/app/community/page.tsx | 202 +++++++++++++++++++++++++++++++++++++ src/assets/og_nft.jpg | Bin 0 -> 29519 bytes 2 files changed, 202 insertions(+) create mode 100644 src/assets/og_nft.jpg diff --git a/src/app/community/page.tsx b/src/app/community/page.tsx index 0bf8ad78..9dadc65e 100644 --- a/src/app/community/page.tsx +++ b/src/app/community/page.tsx @@ -1,11 +1,21 @@ 'use client'; import x from '@/assets/x.svg'; +import og_nft from '@/assets/og_nft.jpg'; import illustration from '@/assets/illustration.svg'; import { useAtomValue } from 'jotai'; import { referralCodeAtom } from '@/store/referral.store'; import toast from 'react-hot-toast'; import { getReferralUrl } from '@/utils'; +import { + useContractRead, + useContractWrite, + useProvider, +} from '@starknet-react/core'; +import { Contract } from 'starknet'; +import NFTAbi from '../../abi/nft.abi.json'; +import { atomWithQuery } from 'jotai-tanstack-query'; +import { addressAtom } from '@/store/claims.atoms'; import { Box, @@ -13,11 +23,88 @@ import { Image as ChakraImage, Container, Link, + Progress, Text, } from '@chakra-ui/react'; +import { useEffect, useMemo, useState } from 'react'; + +interface OGNFTUserData { + address: string; + hash: string; + isOgNFTUser: boolean; + sig: string[]; + totalOgNFTUsers: number; +} + +const isOGNFTEligibleAtom = atomWithQuery((get) => { + return { + queryKey: ['isOGNFTEligibleAtom'], + queryFn: async ({ queryKey }: any): Promise => { + const address = get(addressAtom); + if (!address) return null; + const data = await fetch(`/api/users/ognft/${address}`); + return data.json(); + }, + refetchInterval: 5000, + }; +}); const CommunityPage = () => { + const [progress, setProgress] = useState(0); + const [isEligible, setIsEligible] = useState(false); + const [hasNFT, setHasNFT] = useState(false); + const [isEligibilityChecked, setIsEligibilityChecked] = useState(false); const referralCode = useAtomValue(referralCodeAtom); + const isOGNFTEligible = useAtomValue(isOGNFTEligibleAtom); + const address = useAtomValue(addressAtom); + const { provider } = useProvider(); + const isOGNFTLoading = useMemo(() => { + return ( + isOGNFTEligible.isLoading || + isOGNFTEligible.isFetching || + isOGNFTEligible.isError + ); + }, [ + isOGNFTEligible.isLoading, + isOGNFTEligible.isFetching, + isOGNFTEligible.isError, + ]); + + const ogNFTContract = new Contract( + NFTAbi, + process.env.NEXT_PUBLIC_OG_NFT_CONTRACT || '', + provider, + ); + const { writeAsync: claimOGNFT } = useContractWrite({ + calls: [ + ogNFTContract.populate('mint', { + nftId: 1, + rewardEarned: 0, + hash: isOGNFTEligible.data?.hash || '0', + signature: isOGNFTEligible.data?.sig || [], + }), + ], + }); + + const { data: ogNFTBalance } = useContractRead({ + abi: NFTAbi, + address: process.env.NEXT_PUBLIC_OG_NFT_CONTRACT || '0', + functionName: 'balanceOf', + args: [address || '0x0', 1], + }); + + useEffect(() => { + if (isOGNFTEligible.isSuccess && isOGNFTEligible.data?.totalOgNFTUsers) { + setProgress(isOGNFTEligible.data.totalOgNFTUsers); + } + + if (ogNFTBalance && Number(ogNFTBalance.toLocaleString()) !== 0) { + setHasNFT(true); + } + + console.log('ogNFTBalance', ogNFTBalance); + console.log('isOGNFTEligible', isOGNFTEligible); + }, [ogNFTBalance, isOGNFTEligible]); function copyReferralLink() { if (window.location.origin.includes('app.strkfarm.xyz')) { @@ -31,6 +118,25 @@ const CommunityPage = () => { }); } + function handleEligibility() { + if (!address) { + toast.error('Please connect wallet', { + position: 'bottom-right', + }); + return; + } + + if (!isEligible) { + if (!isOGNFTLoading && isOGNFTEligible.data?.isOgNFTUser) { + setIsEligible(true); + } + } else { + claimOGNFT(); + } + + setIsEligibilityChecked(true); + } + return ( { + + + + OG Farmer Limited edition NFT + + + + {`${progress}/100 Selected`} + + + div': { + backgroundColor: '#795BF4', + }, + }} + /> + + + + + + {!isEligible && isEligibilityChecked && ( + <> + You're not eligible, but you can still earn one.{' '} + + Learn how here + + + )} + {isEligible && + isEligibilityChecked && + 'πŸŽ‰ Congratulations. You are eligible.'} + + + + + + + + cX#*T9-M^)cS&$}_uwAfB?NbZ1_|V?z~1@yf6uw+ zo%inj?ssR^H&fGHQ(axw-7~Z1*W#}Y0E)D@lsEtk3>-iJ`T>5e07L+g5D>os5&{wm z5)uj;9tIk;A;Q7K!XqQ1pdce6BcY<>V4$L5qah(<5@2HE;^O1uqhJsc6XFr$;Nj!_ zW&#EY1qBTSjQ|6KfQO2ViueC{`_%(Lg#`zI10cZ20N|)#5U60k`amLr0l=WZzySZ+ zAi=<)pkW|jLA7|G3J9=&s|5oG^#c0WG5`Sr3;>P-fdT-49d)tHh|f1^>;H?%KQL@< z?vF)J)axaD0tFlYDE|kFtqlOLJ%~^3Z?msL|B`$wD&SM%B<#v+1f0;40Fd}%YRuAkW=JYn8bP-}lLEo;gR;r@Fn zQc#{v|AN~o%=F#$SI>dRh`pHr*JJ-GITBYUq3QNt0F&Jl3-7(PY=gRfi@HAV*NQhD z1;^(go&wplUUwR+Q8(vbls9EWg|q=$=jm-)bo01FaN^L=We{s0AmKF`uV~nq9w0f86Z;} ziuzmd>)n~p1c+M_EA9hs*fw*m)Fu;mn@ZS%qfG>y>ov7Le7yHx zB5QrlyBF5Eo-8Ks+`eVDwKy@}wTI+CUn(2MFBQZ@(K=725p6QY0LA#X;=Z%tJm}IY z{w4xT@7Z%7q!eUsbG`Uxd}`~y(Iz2&S(wd_g)Z7fG+cgJ<>U2~vY*cM*u4M|^8?Y1 z{ydWW!{Mjr20lWNdYkO@rC>DHTjzVK4a7lO$=Ek0uyLd=Ymk2!-lBe6@l5xsX-&cZ zbZfE0hhc>w0o%;{^{RS;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4OQ9_qU-qLLPCIrR9p%t|>OqHJ z>Q&C)5!D0lq#O}Q+^0S%HH<&4QBYS*7o0oE+Sy(^cHJAn8B|oYtZGOS%Xwb9zC7$O@EUHgz3Uo`iOjeSOV-y~t^!Xc%lDtrLmZ7do+Yjt5>-*_*V zMuR>$bdJ_g_s$?tTW1iT)2HQ^U*gnp}iQ zI49rZdIPO}UyU+ETX_Nv=c2GjqqWwoKiQKN9V}orsXF2>@}Kf%i7q?^QmDn3+=zxx z^``faQ8R0=E149`m}1%JHXS@syvyauE^&!UX4WiGFOZK`ST^3Mq$8wDO}P(L$+5?Y zG!ZYC_k~HZ>c9_E6U||Q>v3ea(*c*LLk?tq14iPY)BZy<1(-uD67a1dmiy&%_8-0; z{wWDsV6lom;0uw`G#APWn=UFdglh+FzXNXs0#uH*SgIuY0CJ^ zs-J7kw3TF~dz~c+X69cHc-0!Q1dW?tN8I{t*R5vw+%sF_{RYToM;@!UOnTZh8Re}U z&wy|`m<#4=b}^@L(^Foe+JwU@7HEW_LCOFJW5MhVAqZ7Px)ztEdK{Dywx+Ms*%wMu Wu#upD_`+F+5SU{MF75ig^uGY>d?}m& literal 0 HcmV?d00001 From e3e730efe83bbe98f13d0e8cedb537f6f2040501 Mon Sep 17 00:00:00 2001 From: EjembiEmmanuel Date: Thu, 19 Sep 2024 13:30:52 +0100 Subject: [PATCH 05/13] feat: ui and minor fixes --- src/abi/nft.abi.json | 845 ++++++++++++++++++++++++++++++++++--- src/app/community/page.tsx | 69 +-- 2 files changed, 816 insertions(+), 98 deletions(-) diff --git a/src/abi/nft.abi.json b/src/abi/nft.abi.json index 8eeba6d9..29b1968f 100644 --- a/src/abi/nft.abi.json +++ b/src/abi/nft.abi.json @@ -1,118 +1,823 @@ [ { - "name": "name", - "type": "function", - "inputs": [], - "outputs": [ + "name": "NFT", + "type": "impl", + "interface_name": "defispring::nft::IDeFiSpringNFT" + }, + { + "name": "core::byte_array::ByteArray", + "type": "struct", + "members": [ { - "type": "core::byte_array::ByteArray" + "name": "data", + "type": "core::array::Array::" + }, + { + "name": "pending_word", + "type": "core::felt252" + }, + { + "name": "pending_word_len", + "type": "core::integer::u32" } - ], - "state_mutability": "view" + ] }, { - "name": "symbol", - "type": "function", - "inputs": [], - "outputs": [ + "name": "defispring::nft::Settings", + "type": "struct", + "members": [ { - "type": "core::byte_array::ByteArray" + "name": "maxNFTs", + "type": "core::integer::u8" + }, + { + "name": "minEarnings", + "type": "core::array::Array::" } - ], - "state_mutability": "view" + ] }, { - "name": "mint", - "type": "function", - "inputs": [ + "name": "defispring::nft::IDeFiSpringNFT", + "type": "interface", + "items": [ { - "name": "nftId", - "type": "core::integer::u8" + "name": "name", + "type": "function", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "name": "symbol", + "type": "function", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "name": "mint", + "type": "function", + "inputs": [ + { + "name": "nftId", + "type": "core::integer::u8" + }, + { + "name": "points", + "type": "core::integer::u128" + }, + { + "name": "hash", + "type": "core::felt252" + }, + { + "name": "signature", + "type": "core::array::Array::" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "name": "upgrade", + "type": "function", + "inputs": [ + { + "name": "newClassHash", + "type": "core::starknet::class_hash::ClassHash" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "name": "set_settings", + "type": "function", + "inputs": [ + { + "name": "settings", + "type": "defispring::nft::Settings" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "name": "get_settings", + "type": "function", + "inputs": [], + "outputs": [ + { + "type": "defispring::nft::Settings" + } + ], + "state_mutability": "view" + }, + { + "name": "set_pubkey", + "type": "function", + "inputs": [ + { + "name": "pubkey", + "type": "core::felt252" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "name": "get_pubkey", + "type": "function", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + } + ] + }, + { + "name": "OwnableImpl", + "type": "impl", + "interface_name": "openzeppelin::access::ownable::interface::IOwnable" + }, + { + "name": "openzeppelin::access::ownable::interface::IOwnable", + "type": "interface", + "items": [ + { + "name": "owner", + "type": "function", + "inputs": [], + "outputs": [ + { + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "state_mutability": "view" }, { - "name": "rewardEarned", + "name": "transfer_ownership", + "type": "function", + "inputs": [ + { + "name": "new_owner", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "name": "renounce_ownership", + "type": "function", + "inputs": [], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "name": "ERC1155MixinImpl", + "type": "impl", + "interface_name": "openzeppelin::token::erc1155::interface::ERC1155ABI" + }, + { + "name": "core::integer::u256", + "type": "struct", + "members": [ + { + "name": "low", "type": "core::integer::u128" }, { - "name": "hash", - "type": "core::felt252" + "name": "high", + "type": "core::integer::u128" + } + ] + }, + { + "name": "core::array::Span::", + "type": "struct", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "name": "core::array::Span::", + "type": "struct", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "name": "core::array::Span::", + "type": "struct", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "name": "core::bool", + "type": "enum", + "variants": [ + { + "name": "False", + "type": "()" }, { - "name": "signature", - "type": "core::array::Array::" + "name": "True", + "type": "()" } - ], - "outputs": [], - "state_mutability": "external" + ] }, { - "name": "upgrade", - "type": "function", - "inputs": [ + "name": "openzeppelin::token::erc1155::interface::ERC1155ABI", + "type": "interface", + "items": [ { - "name": "newClassHash", - "type": "core::starknet::class_hash::ClassHash" + "name": "balance_of", + "type": "function", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_id", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "name": "balance_of_batch", + "type": "function", + "inputs": [ + { + "name": "accounts", + "type": "core::array::Span::" + }, + { + "name": "token_ids", + "type": "core::array::Span::" + } + ], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "view" + }, + { + "name": "safe_transfer_from", + "type": "function", + "inputs": [ + { + "name": "from", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "to", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_id", + "type": "core::integer::u256" + }, + { + "name": "value", + "type": "core::integer::u256" + }, + { + "name": "data", + "type": "core::array::Span::" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "name": "safe_batch_transfer_from", + "type": "function", + "inputs": [ + { + "name": "from", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "to", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_ids", + "type": "core::array::Span::" + }, + { + "name": "values", + "type": "core::array::Span::" + }, + { + "name": "data", + "type": "core::array::Span::" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "name": "is_approved_for_all", + "type": "function", + "inputs": [ + { + "name": "owner", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "operator", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "name": "set_approval_for_all", + "type": "function", + "inputs": [ + { + "name": "operator", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "approved", + "type": "core::bool" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "name": "supports_interface", + "type": "function", + "inputs": [ + { + "name": "interface_id", + "type": "core::felt252" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "name": "uri", + "type": "function", + "inputs": [ + { + "name": "token_id", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "name": "balanceOf", + "type": "function", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "tokenId", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "name": "balanceOfBatch", + "type": "function", + "inputs": [ + { + "name": "accounts", + "type": "core::array::Span::" + }, + { + "name": "tokenIds", + "type": "core::array::Span::" + } + ], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "view" + }, + { + "name": "safeTransferFrom", + "type": "function", + "inputs": [ + { + "name": "from", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "to", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "tokenId", + "type": "core::integer::u256" + }, + { + "name": "value", + "type": "core::integer::u256" + }, + { + "name": "data", + "type": "core::array::Span::" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "name": "safeBatchTransferFrom", + "type": "function", + "inputs": [ + { + "name": "from", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "to", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "tokenIds", + "type": "core::array::Span::" + }, + { + "name": "values", + "type": "core::array::Span::" + }, + { + "name": "data", + "type": "core::array::Span::" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "name": "isApprovedForAll", + "type": "function", + "inputs": [ + { + "name": "owner", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "operator", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "name": "setApprovalForAll", + "type": "function", + "inputs": [ + { + "name": "operator", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "approved", + "type": "core::bool" + } + ], + "outputs": [], + "state_mutability": "external" } - ], - "outputs": [], - "state_mutability": "external" + ] }, { - "name": "set_settings", - "type": "function", + "name": "constructor", + "type": "constructor", "inputs": [ + { + "name": "name", + "type": "core::byte_array::ByteArray" + }, + { + "name": "symbol", + "type": "core::byte_array::ByteArray" + }, + { + "name": "base_uri", + "type": "core::byte_array::ByteArray" + }, + { + "name": "owner", + "type": "core::starknet::contract_address::ContractAddress" + }, { "name": "settings", "type": "defispring::nft::Settings" + }, + { + "name": "pubkey", + "type": "core::felt252" } - ], - "outputs": [], - "state_mutability": "external" + ] }, { - "name": "get_settings", - "type": "function", - "inputs": [], - "outputs": [ + "kind": "struct", + "name": "openzeppelin::access::ownable::ownable::OwnableComponent::OwnershipTransferred", + "type": "event", + "members": [ { - "type": "defispring::nft::Settings" + "kind": "key", + "name": "previous_owner", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "kind": "key", + "name": "new_owner", + "type": "core::starknet::contract_address::ContractAddress" } - ], - "state_mutability": "view" + ] }, { - "name": "set_pubkey", - "type": "function", - "inputs": [ + "kind": "struct", + "name": "openzeppelin::access::ownable::ownable::OwnableComponent::OwnershipTransferStarted", + "type": "event", + "members": [ { - "name": "pubkey", - "type": "core::felt252" + "kind": "key", + "name": "previous_owner", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "kind": "key", + "name": "new_owner", + "type": "core::starknet::contract_address::ContractAddress" } - ], - "outputs": [], - "state_mutability": "external" + ] }, { - "name": "get_pubkey", - "type": "function", - "inputs": [], - "outputs": [ + "kind": "enum", + "name": "openzeppelin::access::ownable::ownable::OwnableComponent::Event", + "type": "event", + "variants": [ { - "type": "core::felt252" + "kind": "nested", + "name": "OwnershipTransferred", + "type": "openzeppelin::access::ownable::ownable::OwnableComponent::OwnershipTransferred" + }, + { + "kind": "nested", + "name": "OwnershipTransferStarted", + "type": "openzeppelin::access::ownable::ownable::OwnableComponent::OwnershipTransferStarted" } - ], - "state_mutability": "view" + ] }, { - "name": "set_token_uri", - "type": "function", - "inputs": [ + "kind": "struct", + "name": "openzeppelin::token::erc1155::erc1155::ERC1155Component::TransferSingle", + "type": "event", + "members": [ { - "name": "uri", + "kind": "key", + "name": "operator", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "kind": "key", + "name": "from", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "kind": "key", + "name": "to", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "kind": "data", + "name": "id", + "type": "core::integer::u256" + }, + { + "kind": "data", + "name": "value", + "type": "core::integer::u256" + } + ] + }, + { + "kind": "struct", + "name": "openzeppelin::token::erc1155::erc1155::ERC1155Component::TransferBatch", + "type": "event", + "members": [ + { + "kind": "key", + "name": "operator", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "kind": "key", + "name": "from", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "kind": "key", + "name": "to", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "kind": "data", + "name": "ids", + "type": "core::array::Span::" + }, + { + "kind": "data", + "name": "values", + "type": "core::array::Span::" + } + ] + }, + { + "kind": "struct", + "name": "openzeppelin::token::erc1155::erc1155::ERC1155Component::ApprovalForAll", + "type": "event", + "members": [ + { + "kind": "key", + "name": "owner", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "kind": "key", + "name": "operator", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "kind": "data", + "name": "approved", + "type": "core::bool" + } + ] + }, + { + "kind": "struct", + "name": "openzeppelin::token::erc1155::erc1155::ERC1155Component::URI", + "type": "event", + "members": [ + { + "kind": "data", + "name": "value", "type": "core::byte_array::ByteArray" + }, + { + "kind": "key", + "name": "id", + "type": "core::integer::u256" + } + ] + }, + { + "kind": "enum", + "name": "openzeppelin::token::erc1155::erc1155::ERC1155Component::Event", + "type": "event", + "variants": [ + { + "kind": "nested", + "name": "TransferSingle", + "type": "openzeppelin::token::erc1155::erc1155::ERC1155Component::TransferSingle" + }, + { + "kind": "nested", + "name": "TransferBatch", + "type": "openzeppelin::token::erc1155::erc1155::ERC1155Component::TransferBatch" + }, + { + "kind": "nested", + "name": "ApprovalForAll", + "type": "openzeppelin::token::erc1155::erc1155::ERC1155Component::ApprovalForAll" + }, + { + "kind": "nested", + "name": "URI", + "type": "openzeppelin::token::erc1155::erc1155::ERC1155Component::URI" + } + ] + }, + { + "kind": "enum", + "name": "openzeppelin::introspection::src5::SRC5Component::Event", + "type": "event", + "variants": [] + }, + { + "kind": "struct", + "name": "openzeppelin::upgrades::upgradeable::UpgradeableComponent::Upgraded", + "type": "event", + "members": [ + { + "kind": "data", + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash" + } + ] + }, + { + "kind": "enum", + "name": "openzeppelin::upgrades::upgradeable::UpgradeableComponent::Event", + "type": "event", + "variants": [ + { + "kind": "nested", + "name": "Upgraded", + "type": "openzeppelin::upgrades::upgradeable::UpgradeableComponent::Upgraded" + } + ] + }, + { + "kind": "enum", + "name": "defispring::nft::DeFiSpringNFT::Event", + "type": "event", + "variants": [ + { + "kind": "flat", + "name": "OwnableEvent", + "type": "openzeppelin::access::ownable::ownable::OwnableComponent::Event" + }, + { + "kind": "flat", + "name": "ERC1155Event", + "type": "openzeppelin::token::erc1155::erc1155::ERC1155Component::Event" + }, + { + "kind": "flat", + "name": "SRC5Event", + "type": "openzeppelin::introspection::src5::SRC5Component::Event" + }, + { + "kind": "flat", + "name": "UpgradeableEvent", + "type": "openzeppelin::upgrades::upgradeable::UpgradeableComponent::Event" } - ], - "outputs": [], - "state_mutability": "external" + ] } -] +] \ No newline at end of file diff --git a/src/app/community/page.tsx b/src/app/community/page.tsx index 9dadc65e..6fa7141a 100644 --- a/src/app/community/page.tsx +++ b/src/app/community/page.tsx @@ -24,6 +24,7 @@ import { Container, Link, Progress, + Spinner, Text, } from '@chakra-ui/react'; import { useEffect, useMemo, useState } from 'react'; @@ -39,8 +40,8 @@ interface OGNFTUserData { const isOGNFTEligibleAtom = atomWithQuery((get) => { return { queryKey: ['isOGNFTEligibleAtom'], - queryFn: async ({ queryKey }: any): Promise => { - const address = get(addressAtom); + queryFn: async ({ _queryKey }: any): Promise => { + const address = get(addressAtom) || '0x0'; if (!address) return null; const data = await fetch(`/api/users/ognft/${address}`); return data.json(); @@ -75,11 +76,12 @@ const CommunityPage = () => { process.env.NEXT_PUBLIC_OG_NFT_CONTRACT || '', provider, ); + const { writeAsync: claimOGNFT } = useContractWrite({ calls: [ ogNFTContract.populate('mint', { nftId: 1, - rewardEarned: 0, + points: 0, hash: isOGNFTEligible.data?.hash || '0', signature: isOGNFTEligible.data?.sig || [], }), @@ -101,11 +103,15 @@ const CommunityPage = () => { if (ogNFTBalance && Number(ogNFTBalance.toLocaleString()) !== 0) { setHasNFT(true); } - - console.log('ogNFTBalance', ogNFTBalance); - console.log('isOGNFTEligible', isOGNFTEligible); }, [ogNFTBalance, isOGNFTEligible]); + useEffect(() => { + if (address) { + isOGNFTEligible.refetch(); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [address]); + function copyReferralLink() { if (window.location.origin.includes('app.strkfarm.xyz')) { navigator.clipboard.writeText(`https://strkfarm.xyz/r/${referralCode}`); @@ -148,16 +154,16 @@ const CommunityPage = () => { Community Program Earn points to level up and collect NFTs that signal your loyalty. @@ -264,7 +270,7 @@ const CommunityPage = () => { display="flex" margin="40px 0" gap={{ base: '15px', md: '30px' }} - padding="20px 20px" + padding={{ base: '10px 10px', md: '20px 20px' }} className="theme-gradient" borderRadius="10px" > @@ -272,22 +278,26 @@ const CommunityPage = () => { OG Farmer Limited edition NFT - - {`${progress}/100 Selected`} - + {isOGNFTLoading && } + + {`${progress}/100 Selected`} + + div': { @@ -306,6 +316,7 @@ const CommunityPage = () => { background="purple" borderRadius="5px" marginRight={{ base: 'auto', md: '0' }} + height={{ base: '30px', md: '40px' }} _hover={{ bg: 'bg', borderColor: 'purple', @@ -316,11 +327,13 @@ const CommunityPage = () => { isDisabled={hasNFT || isOGNFTLoading || !isOGNFTEligible.data} > - {hasNFT - ? 'Claimed' - : !isEligible - ? 'Check eligibility' - : 'Claim'} + {!address + ? 'Connect wallet to check eligibility' + : hasNFT + ? 'Claimed' + : !isEligible + ? 'Check eligibility' + : 'Claim'} @@ -350,7 +363,7 @@ const CommunityPage = () => { @@ -360,11 +373,11 @@ const CommunityPage = () => { display="flex" flexDirection="column" gap="10px" - padding="10px 20px" + padding={{ base: '10px 10px', md: '20px 20px' }} className="theme-gradient" borderRadius="10px" > - + Your Stats { zIndex: -1, }} > - + Coming soon You will be able to check your points and claim your NFTs here soon. From 3c9d140c48635ff5c8600f009283d206daf87c95 Mon Sep 17 00:00:00 2001 From: akiraonstarknet Date: Thu, 19 Sep 2024 21:58:21 +0530 Subject: [PATCH 06/13] add og nft list --- public/og_nft_eligible_users.json | 79 ++++++++++++++++--------------- src/app/community/page.tsx | 6 +++ 2 files changed, 46 insertions(+), 39 deletions(-) diff --git a/public/og_nft_eligible_users.json b/public/og_nft_eligible_users.json index f454bbf7..e6eb6cc6 100644 --- a/public/og_nft_eligible_users.json +++ b/public/og_nft_eligible_users.json @@ -1,39 +1,40 @@ -[ - "0x5b55db55f5884856860e63f3595b2ec6b2c9555f3f507b4ca728d8e427b7864", - "0x5095078578a59f8a9c17df97188db1b59574c6d4836dd3e705fe8537624228a", - "0x18489438975ee3c6bc18add415d7889a9630547398f26bb5dee27481216a67d", - "0x43fbdfdd75f2726f999ad87833ca6372261b200e956cd8df7986e4fc518d0eb", - "0x4d1740c01d87e64d7b5149616724bfe24537e200b3f13f6b8b8e760d0ec742", - "0x29dbf109d0f4c8fa807c14e867df953ab3bc9b39d9f66e9a13f1922d10243bb", - "0x708a705b8ee042cde294269c20f65790a9bb535e6e76b9df600821e322e03cf", - "0x36aa3388e7da64d6adf08653abc5699f681ffedacd7938d2e115f73919be294", - "0x47ab88662a0173b6014bfc41f7479cf8f973a7212fe5bc9abf8f40138c0c979", - "0x46d703df4dd4e1b8196b294ec295c8c66097836cd4085372299ac53dff5d478", - "0x11dfbced0c610ae46447105b97477b93e9bbc2f346980c7de51d3622f310201", - "0x3950ce99fa8c34188f591d55ccbeafb109c6215cb33f37f5b22d14d1462ae9c", - "0x55741fd3ec832f7b9500e24a885b8729f213357be4a8e209c4bca1f3b909ae", - "0x578ecc0659983818087560740a0842e846a516962231cbef4658735adb9063c", - "0x5caa422de56ffa4d6bbcf8cea2d8c7a3d0c490edf2155d3b29a68d9ddc55479", - "0x7a900c5b496d15bbb1c3c69d090e890a4b19dbceabee72232d4f2bec67ff4c", - "0x7f5d5b58f2a1c504f6a8d0e47269c903485582308b6f3415c27a561e0d1a6fa", - "0x17603b7963b1e2357a57e3c16f83abacef6bd8cf59e5394c34ae72ce566da2", - "0x4bbdde9359d8bc7e513f510f9080306dbf267acb41228a4706d1b55f2fd065d", - "0x4015548595f22ccf56f6f42ada31a5d8eb7cb307c4e9e550b578d44fa25bcc", - "0x50393e851e40de930abcd9569d9df55883b9f2836d4bae724f126d2258cd292", - "0x2915ca6c218df8b394237b278cc920668fd504268494e1ebcf108a660cd7136", - "0x552760d9b7d629e2daf636129fb519ac17a739e1a1fa05ee928ccb1f62c26cf", - "0x14f59c23735b4aaaf6b6c0df567cacff9adc27f50dcb8b5270cf1237605c263", - "0x6733e297fe300f78f48c7106ad550626377aa732cef360867218c08a536ea5e", - "0x1ca34f742a91a588a3e770c8c8c8618a0713d7f64fda7935d42dcfcf4adffa0", - "0x6a98eef8b1ce965ec9f6daf4c896f5c21217f2365652c30d462b13a1858ed7c", - "0x5105649f42252f79109356e1c8765b7dcdb9bf4a6a68534e7fc962421c7efd2", - "0x36177b6741a43c219602ce857c18e445920d5a6ea5f4ee3a0240e8ae319bbf5", - "0x679316db27cdb5d579d0508859ce450db3c2a2483e3628f7c1fc80b52e87634", - "0x7463d3ebcd4c6de2035cca849814bbba4dd7820dac25e074e78087903d1b585", - "0x7342070d73d4ceef7e7c84420acb3026720e88fef10302fc11fd25a7ee0b715", - "0x2b27457428b94b38ccad5339ebc17a211b7c482c008ac8ad22e01b30e923628", - "0x67b72d3df972e5816b07ad4794af8e85c968409554281880149e96f09df1d56", - "0x54d159fa98b0f67b3d3b287aae0340bf595d8f2a96ed99532785aeef08c1ede", - "0x87c9802f347e6f5ed8d20b5cbd2e826b59a9aa63d83745e75abb2a5aae613", - "0x1bae0e3cd91e0096bf2283d98390bd29579b39c93964c1d2a3eec8d5cf51c61" -] +["0x5b55db55f5884856860e63f3595b2ec6b2c9555f3f507b4ca728d8e427b7864", +"0x5095078578a59f8a9c17df97188db1b59574c6d4836dd3e705fe8537624228a", +"0x18489438975ee3c6bc18add415d7889a9630547398f26bb5dee27481216a67d", +"0x4cced5156ab726bf0e0ca2afeb1f521de0362e748b8bdf07857b088dbc7b457", +"0x43fbdfdd75f2726f999ad87833ca6372261b200e956cd8df7986e4fc518d0eb", +"0x4d1740c01d87e64d7b5149616724bfe24537e200b3f13f6b8b8e760d0ec742", +"0x29dbf109d0f4c8fa807c14e867df953ab3bc9b39d9f66e9a13f1922d10243bb", +"0x708a705b8ee042cde294269c20f65790a9bb535e6e76b9df600821e322e03cf", +"0x36aa3388e7da64d6adf08653abc5699f681ffedacd7938d2e115f73919be294", +"0x47ab88662a0173b6014bfc41f7479cf8f973a7212fe5bc9abf8f40138c0c979", +"0x46d703df4dd4e1b8196b294ec295c8c66097836cd4085372299ac53dff5d478", +"0x11dfbced0c610ae46447105b97477b93e9bbc2f346980c7de51d3622f310201", +"0x3950ce99fa8c34188f591d55ccbeafb109c6215cb33f37f5b22d14d1462ae9c", +"0x55741fd3ec832f7b9500e24a885b8729f213357be4a8e209c4bca1f3b909ae", +"0x22202a0ee56bfc70ab7ab767f14b980357e482bc280ba10ec375172fe1b0bf8", +"0x578ecc0659983818087560740a0842e846a516962231cbef4658735adb9063c", +"0x5caa422de56ffa4d6bbcf8cea2d8c7a3d0c490edf2155d3b29a68d9ddc55479", +"0x7a900c5b496d15bbb1c3c69d090e890a4b19dbceabee72232d4f2bec67ff4c", +"0x7f5d5b58f2a1c504f6a8d0e47269c903485582308b6f3415c27a561e0d1a6fa", +"0x17603b7963b1e2357a57e3c16f83abacef6bd8cf59e5394c34ae72ce566da2", +"0x4bbdde9359d8bc7e513f510f9080306dbf267acb41228a4706d1b55f2fd065d", +"0x4015548595f22ccf56f6f42ada31a5d8eb7cb307c4e9e550b578d44fa25bcc", +"0x50393e851e40de930abcd9569d9df55883b9f2836d4bae724f126d2258cd292", +"0x2915ca6c218df8b394237b278cc920668fd504268494e1ebcf108a660cd7136", +"0x552760d9b7d629e2daf636129fb519ac17a739e1a1fa05ee928ccb1f62c26cf", +"0x14f59c23735b4aaaf6b6c0df567cacff9adc27f50dcb8b5270cf1237605c263", +"0x6733e297fe300f78f48c7106ad550626377aa732cef360867218c08a536ea5e", +"0x1ca34f742a91a588a3e770c8c8c8618a0713d7f64fda7935d42dcfcf4adffa0", +"0x6a98eef8b1ce965ec9f6daf4c896f5c21217f2365652c30d462b13a1858ed7c", +"0x5105649f42252f79109356e1c8765b7dcdb9bf4a6a68534e7fc962421c7efd2", +"0x36177b6741a43c219602ce857c18e445920d5a6ea5f4ee3a0240e8ae319bbf5", +"0x679316db27cdb5d579d0508859ce450db3c2a2483e3628f7c1fc80b52e87634", +"0x7463d3ebcd4c6de2035cca849814bbba4dd7820dac25e074e78087903d1b585", +"0x7342070d73d4ceef7e7c84420acb3026720e88fef10302fc11fd25a7ee0b715", +"0x2b27457428b94b38ccad5339ebc17a211b7c482c008ac8ad22e01b30e923628", +"0x67b72d3df972e5816b07ad4794af8e85c968409554281880149e96f09df1d56", +"0x73298a2ca8b06596d7bc85311c1c9d06458664a02a341655dee4e663600ac53", +"0x297268ffc3c342f9c7fa3df6a5a6ef63ef5a5232ceaaf67168df686283effca", +"0x16d730875c5dd15f3c1086523683bf5463fc11572405c8bee6e1ec65bead84e", +"0x5c755ba1828c70314349ec4c4ddaf310e648d5773f9bb6c4eb6ce2369288569"] \ No newline at end of file diff --git a/src/app/community/page.tsx b/src/app/community/page.tsx index 35e9a659..f22e64eb 100644 --- a/src/app/community/page.tsx +++ b/src/app/community/page.tsx @@ -119,6 +119,12 @@ const CommunityPage = () => { }, []); function handleEligibility() { + mixpanel.track('Check OG NFT Eligibility', { + address, + isEligible, + isEligibilityChecked, + isOGNFTEligible: isOGNFTEligible.data?.isOgNFTUser, + }) if (!address) { toast.error('Please connect wallet', { position: 'bottom-right', From 0d85174eec577387b4b85c2849ed6fef3c341794 Mon Sep 17 00:00:00 2001 From: akiraonstarknet Date: Thu, 19 Sep 2024 21:59:21 +0530 Subject: [PATCH 07/13] add og nft list --- public/og_nft_eligible_users.json | 82 ++++++++++++++++--------------- src/abi/nft.abi.json | 2 +- src/app/community/page.tsx | 3 +- 3 files changed, 44 insertions(+), 43 deletions(-) diff --git a/public/og_nft_eligible_users.json b/public/og_nft_eligible_users.json index e6eb6cc6..553b1d8e 100644 --- a/public/og_nft_eligible_users.json +++ b/public/og_nft_eligible_users.json @@ -1,40 +1,42 @@ -["0x5b55db55f5884856860e63f3595b2ec6b2c9555f3f507b4ca728d8e427b7864", -"0x5095078578a59f8a9c17df97188db1b59574c6d4836dd3e705fe8537624228a", -"0x18489438975ee3c6bc18add415d7889a9630547398f26bb5dee27481216a67d", -"0x4cced5156ab726bf0e0ca2afeb1f521de0362e748b8bdf07857b088dbc7b457", -"0x43fbdfdd75f2726f999ad87833ca6372261b200e956cd8df7986e4fc518d0eb", -"0x4d1740c01d87e64d7b5149616724bfe24537e200b3f13f6b8b8e760d0ec742", -"0x29dbf109d0f4c8fa807c14e867df953ab3bc9b39d9f66e9a13f1922d10243bb", -"0x708a705b8ee042cde294269c20f65790a9bb535e6e76b9df600821e322e03cf", -"0x36aa3388e7da64d6adf08653abc5699f681ffedacd7938d2e115f73919be294", -"0x47ab88662a0173b6014bfc41f7479cf8f973a7212fe5bc9abf8f40138c0c979", -"0x46d703df4dd4e1b8196b294ec295c8c66097836cd4085372299ac53dff5d478", -"0x11dfbced0c610ae46447105b97477b93e9bbc2f346980c7de51d3622f310201", -"0x3950ce99fa8c34188f591d55ccbeafb109c6215cb33f37f5b22d14d1462ae9c", -"0x55741fd3ec832f7b9500e24a885b8729f213357be4a8e209c4bca1f3b909ae", -"0x22202a0ee56bfc70ab7ab767f14b980357e482bc280ba10ec375172fe1b0bf8", -"0x578ecc0659983818087560740a0842e846a516962231cbef4658735adb9063c", -"0x5caa422de56ffa4d6bbcf8cea2d8c7a3d0c490edf2155d3b29a68d9ddc55479", -"0x7a900c5b496d15bbb1c3c69d090e890a4b19dbceabee72232d4f2bec67ff4c", -"0x7f5d5b58f2a1c504f6a8d0e47269c903485582308b6f3415c27a561e0d1a6fa", -"0x17603b7963b1e2357a57e3c16f83abacef6bd8cf59e5394c34ae72ce566da2", -"0x4bbdde9359d8bc7e513f510f9080306dbf267acb41228a4706d1b55f2fd065d", -"0x4015548595f22ccf56f6f42ada31a5d8eb7cb307c4e9e550b578d44fa25bcc", -"0x50393e851e40de930abcd9569d9df55883b9f2836d4bae724f126d2258cd292", -"0x2915ca6c218df8b394237b278cc920668fd504268494e1ebcf108a660cd7136", -"0x552760d9b7d629e2daf636129fb519ac17a739e1a1fa05ee928ccb1f62c26cf", -"0x14f59c23735b4aaaf6b6c0df567cacff9adc27f50dcb8b5270cf1237605c263", -"0x6733e297fe300f78f48c7106ad550626377aa732cef360867218c08a536ea5e", -"0x1ca34f742a91a588a3e770c8c8c8618a0713d7f64fda7935d42dcfcf4adffa0", -"0x6a98eef8b1ce965ec9f6daf4c896f5c21217f2365652c30d462b13a1858ed7c", -"0x5105649f42252f79109356e1c8765b7dcdb9bf4a6a68534e7fc962421c7efd2", -"0x36177b6741a43c219602ce857c18e445920d5a6ea5f4ee3a0240e8ae319bbf5", -"0x679316db27cdb5d579d0508859ce450db3c2a2483e3628f7c1fc80b52e87634", -"0x7463d3ebcd4c6de2035cca849814bbba4dd7820dac25e074e78087903d1b585", -"0x7342070d73d4ceef7e7c84420acb3026720e88fef10302fc11fd25a7ee0b715", -"0x2b27457428b94b38ccad5339ebc17a211b7c482c008ac8ad22e01b30e923628", -"0x67b72d3df972e5816b07ad4794af8e85c968409554281880149e96f09df1d56", -"0x73298a2ca8b06596d7bc85311c1c9d06458664a02a341655dee4e663600ac53", -"0x297268ffc3c342f9c7fa3df6a5a6ef63ef5a5232ceaaf67168df686283effca", -"0x16d730875c5dd15f3c1086523683bf5463fc11572405c8bee6e1ec65bead84e", -"0x5c755ba1828c70314349ec4c4ddaf310e648d5773f9bb6c4eb6ce2369288569"] \ No newline at end of file +[ + "0x5b55db55f5884856860e63f3595b2ec6b2c9555f3f507b4ca728d8e427b7864", + "0x5095078578a59f8a9c17df97188db1b59574c6d4836dd3e705fe8537624228a", + "0x18489438975ee3c6bc18add415d7889a9630547398f26bb5dee27481216a67d", + "0x4cced5156ab726bf0e0ca2afeb1f521de0362e748b8bdf07857b088dbc7b457", + "0x43fbdfdd75f2726f999ad87833ca6372261b200e956cd8df7986e4fc518d0eb", + "0x4d1740c01d87e64d7b5149616724bfe24537e200b3f13f6b8b8e760d0ec742", + "0x29dbf109d0f4c8fa807c14e867df953ab3bc9b39d9f66e9a13f1922d10243bb", + "0x708a705b8ee042cde294269c20f65790a9bb535e6e76b9df600821e322e03cf", + "0x36aa3388e7da64d6adf08653abc5699f681ffedacd7938d2e115f73919be294", + "0x47ab88662a0173b6014bfc41f7479cf8f973a7212fe5bc9abf8f40138c0c979", + "0x46d703df4dd4e1b8196b294ec295c8c66097836cd4085372299ac53dff5d478", + "0x11dfbced0c610ae46447105b97477b93e9bbc2f346980c7de51d3622f310201", + "0x3950ce99fa8c34188f591d55ccbeafb109c6215cb33f37f5b22d14d1462ae9c", + "0x55741fd3ec832f7b9500e24a885b8729f213357be4a8e209c4bca1f3b909ae", + "0x22202a0ee56bfc70ab7ab767f14b980357e482bc280ba10ec375172fe1b0bf8", + "0x578ecc0659983818087560740a0842e846a516962231cbef4658735adb9063c", + "0x5caa422de56ffa4d6bbcf8cea2d8c7a3d0c490edf2155d3b29a68d9ddc55479", + "0x7a900c5b496d15bbb1c3c69d090e890a4b19dbceabee72232d4f2bec67ff4c", + "0x7f5d5b58f2a1c504f6a8d0e47269c903485582308b6f3415c27a561e0d1a6fa", + "0x17603b7963b1e2357a57e3c16f83abacef6bd8cf59e5394c34ae72ce566da2", + "0x4bbdde9359d8bc7e513f510f9080306dbf267acb41228a4706d1b55f2fd065d", + "0x4015548595f22ccf56f6f42ada31a5d8eb7cb307c4e9e550b578d44fa25bcc", + "0x50393e851e40de930abcd9569d9df55883b9f2836d4bae724f126d2258cd292", + "0x2915ca6c218df8b394237b278cc920668fd504268494e1ebcf108a660cd7136", + "0x552760d9b7d629e2daf636129fb519ac17a739e1a1fa05ee928ccb1f62c26cf", + "0x14f59c23735b4aaaf6b6c0df567cacff9adc27f50dcb8b5270cf1237605c263", + "0x6733e297fe300f78f48c7106ad550626377aa732cef360867218c08a536ea5e", + "0x1ca34f742a91a588a3e770c8c8c8618a0713d7f64fda7935d42dcfcf4adffa0", + "0x6a98eef8b1ce965ec9f6daf4c896f5c21217f2365652c30d462b13a1858ed7c", + "0x5105649f42252f79109356e1c8765b7dcdb9bf4a6a68534e7fc962421c7efd2", + "0x36177b6741a43c219602ce857c18e445920d5a6ea5f4ee3a0240e8ae319bbf5", + "0x679316db27cdb5d579d0508859ce450db3c2a2483e3628f7c1fc80b52e87634", + "0x7463d3ebcd4c6de2035cca849814bbba4dd7820dac25e074e78087903d1b585", + "0x7342070d73d4ceef7e7c84420acb3026720e88fef10302fc11fd25a7ee0b715", + "0x2b27457428b94b38ccad5339ebc17a211b7c482c008ac8ad22e01b30e923628", + "0x67b72d3df972e5816b07ad4794af8e85c968409554281880149e96f09df1d56", + "0x73298a2ca8b06596d7bc85311c1c9d06458664a02a341655dee4e663600ac53", + "0x297268ffc3c342f9c7fa3df6a5a6ef63ef5a5232ceaaf67168df686283effca", + "0x16d730875c5dd15f3c1086523683bf5463fc11572405c8bee6e1ec65bead84e", + "0x5c755ba1828c70314349ec4c4ddaf310e648d5773f9bb6c4eb6ce2369288569" +] diff --git a/src/abi/nft.abi.json b/src/abi/nft.abi.json index 29b1968f..627811eb 100644 --- a/src/abi/nft.abi.json +++ b/src/abi/nft.abi.json @@ -820,4 +820,4 @@ } ] } -] \ No newline at end of file +] diff --git a/src/app/community/page.tsx b/src/app/community/page.tsx index f22e64eb..f309a4c6 100644 --- a/src/app/community/page.tsx +++ b/src/app/community/page.tsx @@ -51,7 +51,6 @@ const isOGNFTEligibleAtom = atomWithQuery((get) => { }; }); - const CommunityPage = () => { const [progress, setProgress] = useState(0); const [isEligible, setIsEligible] = useState(false); @@ -124,7 +123,7 @@ const CommunityPage = () => { isEligible, isEligibilityChecked, isOGNFTEligible: isOGNFTEligible.data?.isOgNFTUser, - }) + }); if (!address) { toast.error('Please connect wallet', { position: 'bottom-right', From ada3eb02ab44195217d60559a7537ee6a11587c6 Mon Sep 17 00:00:00 2001 From: EjembiEmmanuel Date: Fri, 20 Sep 2024 13:58:32 +0100 Subject: [PATCH 08/13] feat: add popup on successfule nft claim --- src/app/community/page.tsx | 124 +++++++++++++++++++++++++++++++++---- 1 file changed, 112 insertions(+), 12 deletions(-) diff --git a/src/app/community/page.tsx b/src/app/community/page.tsx index 6fa7141a..c9cb04e8 100644 --- a/src/app/community/page.tsx +++ b/src/app/community/page.tsx @@ -5,6 +5,7 @@ import og_nft from '@/assets/og_nft.jpg'; import illustration from '@/assets/illustration.svg'; import { useAtomValue } from 'jotai'; import { referralCodeAtom } from '@/store/referral.store'; +import { useEffect, useMemo, useState } from 'react'; import toast from 'react-hot-toast'; import { getReferralUrl } from '@/utils'; import { @@ -23,11 +24,16 @@ import { Image as ChakraImage, Container, Link, + Modal, + ModalBody, + ModalCloseButton, + ModalContent, + ModalOverlay, Progress, Spinner, Text, + useDisclosure, } from '@chakra-ui/react'; -import { useEffect, useMemo, useState } from 'react'; interface OGNFTUserData { address: string; @@ -55,6 +61,7 @@ const CommunityPage = () => { const [isEligible, setIsEligible] = useState(false); const [hasNFT, setHasNFT] = useState(false); const [isEligibilityChecked, setIsEligibilityChecked] = useState(false); + const { isOpen, onOpen, onClose } = useDisclosure(); const referralCode = useAtomValue(referralCodeAtom); const isOGNFTEligible = useAtomValue(isOGNFTEligibleAtom); const address = useAtomValue(addressAtom); @@ -77,7 +84,12 @@ const CommunityPage = () => { provider, ); - const { writeAsync: claimOGNFT } = useContractWrite({ + const { + writeAsync: claimOGNFT, + isPending: isClaimOGNFTPending, + isError: isClaimOGNFTError, + error: claimOGTError, + } = useContractWrite({ calls: [ ogNFTContract.populate('mint', { nftId: 1, @@ -124,7 +136,7 @@ const CommunityPage = () => { }); } - function handleEligibility() { + async function handleEligibility() { if (!address) { toast.error('Please connect wallet', { position: 'bottom-right', @@ -137,7 +149,17 @@ const CommunityPage = () => { setIsEligible(true); } } else { - claimOGNFT(); + const result = await claimOGNFT(); + if (result.transaction_hash) { + onOpen(); + } + + if (isClaimOGNFTError) { + console.error(claimOGTError); + toast.error('An error occurred during the claim', { + position: 'bottom-right', + }); + } } setIsEligibilityChecked(true); @@ -324,16 +346,27 @@ const CommunityPage = () => { color: 'purple', }} onClick={handleEligibility} - isDisabled={hasNFT || isOGNFTLoading || !isOGNFTEligible.data} + isDisabled={ + hasNFT || + isOGNFTLoading || + !isOGNFTEligible.data || + isClaimOGNFTPending + } > - {!address - ? 'Connect wallet to check eligibility' - : hasNFT - ? 'Claimed' - : !isEligible - ? 'Check eligibility' - : 'Claim'} + {isClaimOGNFTPending && !isClaimOGNFTError ? ( + + Claiming + + ) : !address ? ( + 'Connect wallet to check eligibility' + ) : hasNFT ? ( + 'Claimed' + ) : !isEligible ? ( + 'Check eligibility' + ) : ( + 'Claim' + )} @@ -420,6 +453,73 @@ const CommunityPage = () => { You will be able to check your points and claim your NFTs here soon. + + + + + + + πŸŽ‰ + + Share your achievement on X + + + + + + + + + + ); }; From f6eb4c81c656d3bc8eddb39ffab31eb7205eb220 Mon Sep 17 00:00:00 2001 From: EjembiEmmanuel Date: Fri, 20 Sep 2024 14:12:59 +0100 Subject: [PATCH 09/13] feat: optimize popup modal on mobile devices --- src/app/community/page.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app/community/page.tsx b/src/app/community/page.tsx index fce4f197..79836a88 100644 --- a/src/app/community/page.tsx +++ b/src/app/community/page.tsx @@ -451,13 +451,14 @@ const CommunityPage = () => { - + @@ -469,7 +470,7 @@ const CommunityPage = () => { justifyContent="center" > πŸŽ‰ - + Share your achievement on X @@ -485,7 +486,7 @@ const CommunityPage = () => { display="flex" gap="5px" alignItems="center" - padding={{ base: '5px', md: '10px' }} + padding={{ base: '5px 10px', md: '10px' }} fontSize={{ md: '14px' }} background="white" color="black" From f0c9cad62f3bf7c989e5e90da4fb9271456bf053 Mon Sep 17 00:00:00 2001 From: EjembiEmmanuel Date: Fri, 20 Sep 2024 14:28:59 +0100 Subject: [PATCH 10/13] fix: fix modal always open --- src/app/community/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/community/page.tsx b/src/app/community/page.tsx index 79836a88..af6ce0ee 100644 --- a/src/app/community/page.tsx +++ b/src/app/community/page.tsx @@ -451,7 +451,7 @@ const CommunityPage = () => { - + Date: Fri, 20 Sep 2024 19:22:23 +0530 Subject: [PATCH 11/13] OG NFT UI: UX improvements --- .husky/pre-commit | 2 +- src/app/community/page.tsx | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index e72aa91e..3ef8c522 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1 @@ -yarn run lint:fix && yarn run format:fix \ No newline at end of file +yarn run lint:fix && yarn run format:fix && git add . \ No newline at end of file diff --git a/src/app/community/page.tsx b/src/app/community/page.tsx index ccbbf8cf..068edb18 100644 --- a/src/app/community/page.tsx +++ b/src/app/community/page.tsx @@ -101,7 +101,7 @@ const CommunityPage = () => { ], }); - const { data: ogNFTBalance } = useContractRead({ + const { data: ogNFTBalance, status: balanceQueryStatus } = useContractRead({ abi: NFTAbi, address: process.env.NEXT_PUBLIC_OG_NFT_CONTRACT || '0', functionName: 'balanceOf', @@ -353,7 +353,8 @@ const CommunityPage = () => { hasNFT || isOGNFTLoading || !isOGNFTEligible.data || - isClaimOGNFTPending + isClaimOGNFTPending || + !address } > @@ -363,6 +364,9 @@ const CommunityPage = () => { ) : !address ? ( 'Connect wallet to check eligibility' + ) : isOGNFTEligible.isLoading || + balanceQueryStatus == 'pending' ? ( + ) : hasNFT ? ( 'Claimed' ) : !isEligible ? ( @@ -467,7 +471,7 @@ const CommunityPage = () => { margin="0 25px" border="1px solid var(--chakra-colors-color2_65p)" > - + Date: Fri, 20 Sep 2024 19:42:04 +0530 Subject: [PATCH 12/13] OG NFT UI: fix path issue --- src/app/api/users/ognft/[address]/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/api/users/ognft/[address]/route.ts b/src/app/api/users/ognft/[address]/route.ts index 5b04e197..28760a7d 100644 --- a/src/app/api/users/ognft/[address]/route.ts +++ b/src/app/api/users/ognft/[address]/route.ts @@ -1,7 +1,7 @@ import { NextResponse } from 'next/server'; import { ec, hash } from 'starknet'; -import { standariseAddress } from '@/utils'; -import OGNFTUsersJson from '@public/og_nft_eligible_users.json'; +import { standariseAddress } from '../../../../../utils'; +import OGNFTUsersJson from '../../../../../../public/og_nft_eligible_users.json'; export const revalidate = 3600; From d6040c08f323daf7dffcfbad3f6b221a137d079e Mon Sep 17 00:00:00 2001 From: akiraonstarknet Date: Fri, 20 Sep 2024 20:19:10 +0530 Subject: [PATCH 13/13] OG NFT UI: fix claim fetch issue --- src/app/community/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/community/page.tsx b/src/app/community/page.tsx index 068edb18..b6ff6631 100644 --- a/src/app/community/page.tsx +++ b/src/app/community/page.tsx @@ -46,7 +46,7 @@ interface OGNFTUserData { const isOGNFTEligibleAtom = atomWithQuery((get) => { return { - queryKey: ['isOGNFTEligibleAtom'], + queryKey: ['isOGNFTEligibleAtom', get(addressAtom)], queryFn: async ({ _queryKey }: any): Promise => { const address = get(addressAtom) || '0x0'; if (!address) return null;