diff --git a/src/app/token/page.tsx b/src/app/token/page.tsx new file mode 100644 index 00000000..be076ede --- /dev/null +++ b/src/app/token/page.tsx @@ -0,0 +1,214 @@ +"use client"; + +import { useAccount, useReadContract } from "wagmi"; +import { formatUnits, erc20Abi } from "viem"; +import { useState } from "react"; +import { + PLOT_TOKEN, EXPLORER_URL, +} from "../../../lib/contracts/constants"; + +const BASESCAN_URL = `${EXPLORER_URL}/token/${PLOT_TOKEN}`; +const MINT_CLUB_URL = "https://mint.club/token/base/PLOT"; +const HUNT_TOWN_URL = "https://hunt.town/project/PLOT"; + +export default function TokenPage() { + const { address, isConnected } = useAccount(); + const [copied, setCopied] = useState(false); + + const { data: balance, isLoading: balanceLoading } = useReadContract({ + address: PLOT_TOKEN, + abi: erc20Abi, + functionName: "balanceOf", + args: address ? [address] : undefined, + query: { enabled: !!address }, + }); + + const { data: totalSupply, isLoading: supplyLoading } = useReadContract({ + address: PLOT_TOKEN, + abi: erc20Abi, + functionName: "totalSupply", + }); + + const formattedBalance = balance ? formatUnits(balance, 18) : "0"; + const formattedSupply = totalSupply ? formatUnits(totalSupply, 18) : "0"; + + const handleCopyAddress = async () => { + try { + await navigator.clipboard.writeText(PLOT_TOKEN); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + } catch {} + }; + + return ( +
The reserve token behind every story on PlotLink
+Connect your wallet to view balance
+Loading...
++ Reserve token for story tokens — every storyline token on PlotLink is backed by PLOT via MCV2 bonding curves. +
++ TVL growth — as more story tokens are minted, more PLOT gets locked in bonding curve reserves, increasing total value locked across all storylines. +
++ Creator royalties — 1% mint and 1% burn royalty on every trade flows directly to the story writer. +
++ Buy via Mint Club — purchase PLOT on the bonding curve using HUNT tokens. +
++ Sell story tokens — selling any storyline token returns PLOT to your wallet. +
++ Use the Zap — buy story tokens with ETH, USDC, or HUNT and the zap contract handles PLOT conversion automatically. +
+