Skip to content

Instantly share code, notes, and snippets.

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}`);
function shortifyAddress(address: string) {
return `0x****${address.slice(-4)}`
}
.Toastify__spinner {
border-color: var(--toastify-spinner-color-empty-area) !important;
border-right-color: var(--toastify-spinner-color) !important;
}
<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>
sepolia: {
provider: () =>
new HDWalletProvider({
mnemonic: {
phrase: ""
},
providerOrUrl: "wss://sepolia.infura.io/ws/v3/YOUR-PROJECT-ID",
addressIndex: 0
}),
network_id: "11155111",
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>;
/* 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 },
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" />
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: {
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: {