This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.18; | |
| import {VRFConsumerBaseV2Plus} from "@chainlink/contracts@1.1.1/src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol"; | |
| import {VRFV2PlusClient} from "@chainlink/contracts@1.1.1/src/v0.8/vrf/dev/libraries/VRFV2PlusClient.sol"; | |
| error Raffle__RaffleEmpty(); | |
| error Raffle__RaffleNotOpen(); | |
| error Raffle__NotEnoughEthSent(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.10; | |
| import {IReferenceModule} from 'contracts/interfaces/IReferenceModule.sol'; | |
| import {HubRestricted} from 'contracts/base/HubRestricted.sol'; | |
| import {Errors} from 'contracts/modules/constants/Errors.sol'; | |
| import {IERC721} from '@openzeppelin/contracts/token/ERC721/IERC721.sol'; | |
| import {Types} from 'contracts/libraries/constants/Types.sol'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use client"; | |
| import { useState, useEffect } from "react"; | |
| import { useWeb3Modal } from "@web3modal/wagmi/react"; | |
| import { useAccount, useSignMessage } from "wagmi"; | |
| import Image from "next/image"; | |
| import { Button, buttonVariants } from "../ui/button"; | |
| import truncateAddress from "~/utils/truncateAddress"; | |
| import { | |
| ProfileId, | |
| useLogin, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const authOptions: NextAuthOptions = { | |
| callbacks: { | |
| session: ({ session, token }) => ({ | |
| ...session, | |
| user: { | |
| ...session.user, | |
| id: token.sub, | |
| }, | |
| }), | |
| jwt: async ({ token }) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use client"; | |
| import { AvatarImage, AvatarFallback, Avatar } from "~/components/ui/avatar"; | |
| import { Button } from "~/components/ui/button"; | |
| import { CardContent, Card, CardTitle } from "~/components/ui/card"; | |
| import { | |
| FollowPolicyType, | |
| Image, | |
| ProfileCoverSet, | |
| ProfileId, | |
| useFollow, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use client"; | |
| import { AvatarImage, AvatarFallback, Avatar } from "~/components/ui/avatar"; | |
| import { Button } from "~/components/ui/button"; | |
| import { CardContent, Card, CardTitle } from "~/components/ui/card"; | |
| import { | |
| FollowPolicyType, | |
| Image, | |
| ProfileCoverSet, | |
| useLogin, | |
| useProfile, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use client"; | |
| import React, { useCallback, useEffect, useMemo, useState } from "react"; | |
| import type { Hex } from "viem"; | |
| import { useAccount, usePublicClient, useSignMessage } from "wagmi"; | |
| import { SiweMessage } from "siwe"; | |
| import { Button } from "./button"; | |
| import { useQuery } from "@tanstack/react-query"; | |
| import { signIn } from "next-auth/react"; | |
| import { parseErc6492Signature } from "viem/experimental"; | |
| // Function to fetch nonce from the backend |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { PrismaAdapter } from "@auth/prisma-adapter"; | |
| import { | |
| getServerSession, | |
| type DefaultSession, | |
| type NextAuthOptions, | |
| } from "next-auth"; | |
| import { type Adapter } from "next-auth/adapters"; | |
| import Credentials from "next-auth/providers/credentials"; | |
| import { SiweMessage } from "siwe"; | |
| import { createPublicClient, http } from "viem"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useEffect, useState } from 'react' | |
| import { erc721Abi } from 'viem' | |
| import { useReadContract } from 'wagmi' | |
| const IPFS_GATEWAY = 'https://ipfs.io/ipfs/' | |
| interface NftMetadata { | |
| name: string | |
| image: string | |
| description: string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use client' | |
| import React, { useState } from 'react' | |
| import { useNftMetaData } from '@/hooks/useNft' // Import the hook from its file | |
| import Image from 'next/image' | |
| import { erc721Abi } from 'viem' | |
| import { useReadContract } from 'wagmi' | |
| const IPFS_GATEWAY = 'https://ipfs.io/ipfs/' | |
| type Address = `0x${string}` | undefined |
NewerOlder