This file contains 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
const hre = require("hardhat"); | |
const path = require("path"); | |
const fs = require("fs"); | |
async function main() { | |
console.log("Deployment started!"); | |
const [deployer] = await ethers.getSigners(); | |
const address = await deployer.getAddress(); | |
console.log(`Deploying the contract with the account: ${address}`); |
This file contains 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
function shortifyAddress(address: string) { | |
return `0x****${address.slice(-4)}` | |
} |
This file contains 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
.Toastify__spinner { | |
border-color: var(--toastify-spinner-color-empty-area) !important; | |
border-right-color: var(--toastify-spinner-color) !important; | |
} |
This file contains 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
<div className="flex-1"> | |
<div className="flex justify-between items-center"> | |
<div className="flex items-center mt-2"> | |
<div> | |
<img | |
className="inline-block h-9 w-9 rounded-full" | |
src="/images/default_avatar.png" | |
alt="" | |
/> | |
</div> |
This file contains 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
sepolia: { | |
provider: () => | |
new HDWalletProvider({ | |
mnemonic: { | |
phrase: "" | |
}, | |
providerOrUrl: "wss://sepolia.infura.io/ws/v3/YOUR-PROJECT-ID", | |
addressIndex: 0 | |
}), | |
network_id: "11155111", |
This file contains 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 { CryptoHookFactory } from "@_types/hooks"; | |
import { Nft } from "@_types/nft"; | |
import useSWR from "swr"; | |
import { ethers } from "ethers"; | |
type UseLastBoughNftResponse = {}; | |
type UseLastBoughNftFactory = CryptoHookFactory<Nft | null, UseLastBoughNftResponse>; | |
export type UseLastBoughNftHook = ReturnType<UseLastBoughNftFactory>; |
This file contains 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
/* eslint-disable @next/next/no-img-element */ | |
import type { NextPage } from 'next' | |
import { BaseLayout } from '@ui' | |
import { Nft } from '@_types/nft'; | |
import { useOwnedNfts } from '@hooks/web3'; | |
const tabs = [ | |
{ name: 'Your Collection', href: '#', current: true }, |
This file contains 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 type { NextPage } from 'next' | |
import { NftList } from '../../components' | |
import BaseLayout from '../../components/layout/BaseLayout' | |
const Home: NextPage = () => { | |
return ( | |
<BaseLayout> | |
<div className="relative bg-gray-50 pt-16 pb-20 px-4 sm:px-6 lg:pt-24 lg:pb-28 lg:px-8"> | |
<div className="absolute inset-0"> | |
<div className="bg-white h-1/3 sm:h-2/3" /> |
This file contains 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 { v4 as uuidv4 } from 'uuid'; | |
import { FileReq } from 'types/nft'; | |
import { NextApiRequest, NextApiResponse } from 'next'; | |
import { Session } from 'next-iron-session'; | |
import { addressCheckMiddleware, pinataJWTKey, withSession } from './utils'; | |
import axios from 'axios'; | |
import FormData from 'form-data'; | |
export const config = { | |
api: { |
This file contains 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 { v4 as uuidv4 } from 'uuid'; | |
import { FileReq } from 'types/nft'; | |
import { NextApiRequest, NextApiResponse } from 'next'; | |
import { Session } from 'next-iron-session'; | |
import { addressCheckMiddleware, pinataJWTKey, withSession } from './utils'; | |
import axios from 'axios'; | |
import FormData from 'form-data'; | |
export const config = { | |
api: { |