+
Amount
-
-
{maxBalance ? formatUnits(maxBalance as bigint, decimals as number) :
} USDC
+
+
+ {maxBalance ? (
+ formatUnits(maxBalance, decimals as number)
+ ) : (
+
+ )}{" "}
+ USDC
{isDesktop ? (
-
+
) : (
)}
/>
- {
- isPending ? (
-
- ) : (
-
- )
- }
+
+ {isPending ? (
+
+ ) : (
+
+ )}
- {
- // Desktop would be using dialog
- isDesktop ? (
-
- ) : (
- // Mobile would be using drawer
-
-
-
-
-
-
- Transaction status
-
- Follow the transaction status below.
-
-
-
- {hash ? (
-
- ) : (
-
-
- No transaction hash
-
- )}
- {
- !isPending && !isConfirmed && !isConfirming && (
-
- No transaction submitted
-
- )
- }
- {isConfirming && (
-
- Waiting
- for confirmation...
-
- )}
- {isConfirmed && (
-
- Transaction confirmed!
-
- )}
- {error && (
-
- Error:{" "}
- {(error as BaseError).shortMessage || error.message}
-
- )}
-
-
-
-
-
-
-
-
- )
- }
+
+ {isDesktop ? (
+
+ ) : (
+
+
+
+
+
+
+ Transaction status
+
+ Follow every step—from wallet signature to confirmation.
+
+
+
+
+
+
+
+
+
+
+
+
+ )}
);
}
+
+/* --------------------------------------------------------------------- */
+/* helper component */
+/* --------------------------------------------------------------------- */
+
+type StatusProps = {
+ hash?: `0x${string}`;
+ isPending: boolean;
+ isConfirming: boolean;
+ isConfirmed: boolean;
+ error: BaseError | WriteContractErrorType | null | undefined;
+ explorerUrl?: string;
+};
+
+function StatusBody({
+ hash,
+ isPending,
+ isConfirming,
+ isConfirmed,
+ error,
+ explorerUrl,
+}: StatusProps) {
+ return (
+
+ {hash ? (
+
+ ) : (
+
+
+ No hash
+
+ )}
+
+ {isPending && (
+
+
+ Awaiting signature in wallet…
+
+ )}
+
+ {!isPending && !isConfirming && !isConfirmed && (
+
+ No transaction
+
+ )}
+
+ {isConfirming && (
+
+
+ Broadcast to network—waiting for confirmations…
+
+ )}
+
+ {isConfirmed && (
+
+
+ Confirmed on-chain!
+
+ )}
+
+ {error && (
+
+
+ {"shortMessage" in (error as BaseError)
+ ? (error as BaseError).shortMessage
+ : (error as Error).message}
+
+ )}
+
+ );
+}
\ No newline at end of file
diff --git a/challenge-3-frontend/components/yield-farm/index.tsx b/challenge-3-frontend/components/yield-farm/index.tsx
new file mode 100644
index 0000000..73e7ea7
--- /dev/null
+++ b/challenge-3-frontend/components/yield-farm/index.tsx
@@ -0,0 +1,107 @@
+"use client";
+
+import { useMemo } from "react";
+import { formatUnits } from "viem";
+import { useReadContract } from "wagmi";
+import {
+ Tabs,
+ TabsContent,
+ TabsList,
+ TabsTrigger,
+} from "@/components/ui/tabs";
+import {
+ Card,
+ CardHeader,
+ CardTitle,
+ CardDescription,
+ CardContent,
+} from "@/components/ui/card";
+import Stake from "./stake";
+import Withdraw from "./withdraw";
+import {
+ LIQUIDITY_POOL_TOKEN_CONTRACT_ADDRESS,
+ YIELD_FARMING_CONTRACT_ADDRESS,
+} from "@/lib/config";
+import { mockErc20Abi, yieldFarmingAbi } from "@/lib/abi";
+import { Skeleton } from "@/components/ui/skeleton";
+
+export default function YieldFarm() {
+ /* ------------------------------------------------------------ */
+ /* On-chain pooled metrics */
+ /* ------------------------------------------------------------ */
+ const { data: tvlRaw } = useReadContract({
+ address: LIQUIDITY_POOL_TOKEN_CONTRACT_ADDRESS,
+ abi: mockErc20Abi,
+ functionName: "totalSupply",
+ });
+
+ const { data: rewardRateRaw } = useReadContract({
+ address: YIELD_FARMING_CONTRACT_ADDRESS,
+ abi: yieldFarmingAbi,
+ functionName: "rewardRate",
+ });
+
+ const tvl = useMemo(
+ () => (tvlRaw ? formatUnits(tvlRaw as bigint, 18) : null),
+ [tvlRaw]
+ );
+
+ const rewardRate = useMemo(
+ () => (rewardRateRaw ? formatUnits(rewardRateRaw as bigint, 18) : null),
+ [rewardRateRaw]
+ );
+
+ /* ------------------------------------------------------------ */
+ /* UI */
+ /* ------------------------------------------------------------ */
+ return (
+
+ {/* Pool statistics */}
+
+
+ Pool Statistics
+ Updated live on-chain
+
+
+
+
+
+
+
+ {/* Stake / Withdraw tabs */}
+
+
+ Stake
+ Withdraw
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+/* ------------------------------------------------------------ */
+/* Helper component */
+/* ------------------------------------------------------------ */
+
+function Stat({ label, value }: { label: string; value?: string | null }) {
+ return (
+
+ {label}
+ {value ? (
+ {value}
+ ) : (
+
+ )}
+
+ );
+}
\ No newline at end of file
diff --git a/challenge-3-frontend/components/yield-farm/mint-lp-token.tsx b/challenge-3-frontend/components/yield-farm/mint-lp-token.tsx
new file mode 100644
index 0000000..e016073
--- /dev/null
+++ b/challenge-3-frontend/components/yield-farm/mint-lp-token.tsx
@@ -0,0 +1,98 @@
+"use client";
+
+import { useEffect } from "react";
+import {
+ useWaitForTransactionReceipt,
+ useConfig,
+ useWriteContract,
+ useAccount,
+ useReadContract,
+} from "wagmi";
+import { parseUnits } from "viem";
+import { Loader2 } from "lucide-react";
+import { Button } from "@/components/ui/button";
+import { getSigpassWallet } from "@/lib/sigpass";
+import { useAtomValue } from "jotai";
+import { addressAtom } from "@/components/sigpasskit";
+import { localConfig, westendAssetHub } from "@/app/providers";
+import { LIQUIDITY_POOL_TOKEN_CONTRACT_ADDRESS } from "@/lib/config";
+import { mockErc20Abi } from "@/lib/abi";
+
+type Props = {
+ label: string;
+};
+
+export default function MintLpToken({ label }: Props) {
+ const config = useConfig();
+ const account = useAccount();
+ const address = useAtomValue(addressAtom);
+
+ const {
+ data: hash,
+ isPending,
+ writeContractAsync,
+ } = useWriteContract({
+ config: address ? localConfig : config,
+ });
+
+ const { data: decimalsData, refetch } = useReadContract({
+ address: LIQUIDITY_POOL_TOKEN_CONTRACT_ADDRESS,
+ abi: mockErc20Abi,
+ functionName: "decimals",
+ chainId: westendAssetHub.id,
+ config: address ? localConfig : config,
+ });
+
+ const decimals = decimalsData as number | undefined;
+
+ const { isLoading: isConfirming, isSuccess: isConfirmed } =
+ useWaitForTransactionReceipt({
+ hash,
+ config: address ? localConfig : config,
+ });
+
+ const handleMint = async () => {
+ try {
+ const args = [
+ address ?? account.address,
+ parseUnits("1000", decimals as number),
+ ] as const;
+
+ if (address) {
+ await writeContractAsync({
+ account: await getSigpassWallet(),
+ address: LIQUIDITY_POOL_TOKEN_CONTRACT_ADDRESS,
+ abi: mockErc20Abi,
+ functionName: "mint",
+ args,
+ chainId: westendAssetHub.id,
+ });
+ } else {
+ await writeContractAsync({
+ address: LIQUIDITY_POOL_TOKEN_CONTRACT_ADDRESS,
+ abi: mockErc20Abi,
+ functionName: "mint",
+ args,
+ chainId: westendAssetHub.id,
+ });
+ }
+ } catch (error) {
+ console.error(error);
+ }
+ };
+
+ useEffect(() => {
+ if (isConfirmed) {
+ refetch();
+ }
+ }, [isConfirmed, refetch]);
+
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/challenge-3-frontend/components/yield-farm/stake.tsx b/challenge-3-frontend/components/yield-farm/stake.tsx
new file mode 100644
index 0000000..b0c084c
--- /dev/null
+++ b/challenge-3-frontend/components/yield-farm/stake.tsx
@@ -0,0 +1,487 @@
+"use client";
+
+import { useState, useEffect } from "react";
+import {
+ type BaseError,
+ useWaitForTransactionReceipt,
+ useConfig,
+ useWriteContract,
+ useReadContracts,
+ useAccount,
+} from "wagmi";
+import type { WriteContractErrorType } from "wagmi/actions";
+import { parseUnits, formatUnits } from "viem";
+import {
+ Ban,
+ ExternalLink,
+ ChevronDown,
+ X,
+ Hash,
+ LoaderCircle,
+ CircleCheck,
+ WalletMinimal,
+ Lock,
+} from "lucide-react";
+import { z } from "zod";
+import { zodResolver } from "@hookform/resolvers/zod";
+import { useForm } from "react-hook-form";
+import { Button } from "@/components/ui/button";
+import {
+ Form,
+ FormControl,
+ FormDescription,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+} from "@/components/ui/form";
+import {
+ Select,
+ SelectTrigger,
+ SelectValue,
+ SelectContent,
+ SelectGroup,
+ SelectLabel,
+ SelectItem,
+} from "@/components/ui/select";
+import { Input } from "@/components/ui/input";
+import { useMediaQuery } from "@/hooks/use-media-query";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogHeader,
+ DialogFooter,
+ DialogTitle,
+ DialogTrigger,
+ DialogClose,
+} from "@/components/ui/dialog";
+import {
+ Drawer,
+ DrawerClose,
+ DrawerContent,
+ DrawerDescription,
+ DrawerFooter,
+ DrawerHeader,
+ DrawerTitle,
+ DrawerTrigger,
+} from "@/components/ui/drawer";
+import { truncateHash } from "@/lib/utils";
+import CopyButton from "@/components/copy-button";
+import { getSigpassWallet } from "@/lib/sigpass";
+import { westendAssetHub, localConfig } from "@/app/providers";
+import { useAtomValue } from "jotai";
+import { addressAtom } from "@/components/sigpasskit";
+import { Skeleton } from "@/components/ui/skeleton";
+import { mockErc20Abi, yieldFarmingAbi } from "@/lib/abi";
+import { LIQUIDITY_POOL_TOKEN_CONTRACT_ADDRESS, YIELD_FARMING_CONTRACT_ADDRESS } from "@/lib/config";
+
+export default function Stake() {
+ const config = useConfig();
+ const account = useAccount();
+ const isDesktop = useMediaQuery("(min-width: 768px)");
+ const [open, setOpen] = useState(false);
+ const address = useAtomValue(addressAtom);
+
+ /* ------------------------------- schema ------------------------------- */
+ const formSchema = z.object({
+ amount: z
+ .string()
+ .refine((val) => !isNaN(parseFloat(val)) && parseFloat(val) > 0, {
+ message: "Amount must be a positive number",
+ })
+ .refine((val) => /^\d*\.?\d{0,18}$/.test(val), {
+ message: "Amount cannot have more than 18 decimal places",
+ })
+ .superRefine((val, ctx) => {
+ if (!maxBalance || !decimals) return;
+ const inputAmount = parseUnits(val, decimals as number);
+ if (inputAmount > (maxBalance as bigint)) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ message: "Amount exceeds available balance",
+ });
+ }
+ }),
+ lockDays: z.enum(["0", "7", "30", "90"]),
+ });
+
+ const form = useForm
>({
+ resolver: zodResolver(formSchema),
+ defaultValues: { amount: "", lockDays: "0" },
+ });
+
+ /* ------------------------- on-chain allowances ------------------------ */
+ const {
+ data,
+ refetch: refetchBalances,
+ } = useReadContracts({
+ contracts: [
+ {
+ address: LIQUIDITY_POOL_TOKEN_CONTRACT_ADDRESS,
+ abi: mockErc20Abi,
+ functionName: "balanceOf",
+ args: [address ?? account.address],
+ },
+ {
+ address: LIQUIDITY_POOL_TOKEN_CONTRACT_ADDRESS,
+ abi: mockErc20Abi,
+ functionName: "decimals",
+ },
+ {
+ address: LIQUIDITY_POOL_TOKEN_CONTRACT_ADDRESS,
+ abi: mockErc20Abi,
+ functionName: "allowance",
+ args: [address ?? account.address, YIELD_FARMING_CONTRACT_ADDRESS],
+ },
+ ],
+ config: address ? localConfig : config,
+ });
+
+ const maxBalance = data?.[0]?.result as bigint | undefined;
+ const decimals = data?.[1]?.result as number | undefined;
+ const allowance = data?.[2]?.result as bigint | undefined;
+
+ const amountInput = form.watch("amount");
+ const needsApprove =
+ allowance !== undefined && amountInput
+ ? allowance < parseUnits(amountInput, decimals || 18)
+ : false;
+
+ /* --------------------------- write helpers --------------------------- */
+ const {
+ data: hash,
+ error,
+ isPending,
+ writeContractAsync,
+ } = useWriteContract({
+ config: address ? localConfig : config,
+ });
+
+ async function onSubmit(values: z.infer) {
+ const stakeAmount = parseUnits(values.amount, decimals as number);
+
+ // off-chain analytics only use lockDays
+ const txArgs = [stakeAmount] as const;
+
+ if (address) {
+ await writeOrApprove(txArgs, needsApprove, true);
+ } else {
+ await writeOrApprove(txArgs, needsApprove, false);
+ }
+ }
+
+ async function writeOrApprove(
+ stakeArgs: readonly [bigint],
+ approveFirst: boolean,
+ isSigpass: boolean
+ ) {
+ if (approveFirst) {
+ await writeContractAsync({
+ ...(isSigpass && { account: await getSigpassWallet() }),
+ address: LIQUIDITY_POOL_TOKEN_CONTRACT_ADDRESS,
+ abi: mockErc20Abi,
+ functionName: "approve",
+ args: [YIELD_FARMING_CONTRACT_ADDRESS, stakeArgs[0]],
+ chainId: westendAssetHub.id,
+ });
+ } else {
+ await writeContractAsync({
+ ...(isSigpass && { account: await getSigpassWallet() }),
+ address: YIELD_FARMING_CONTRACT_ADDRESS,
+ abi: yieldFarmingAbi,
+ functionName: "stake",
+ args: stakeArgs,
+ chainId: westendAssetHub.id,
+ });
+ }
+ }
+
+ /* --------------------------- tx lifecycle ---------------------------- */
+ useEffect(() => {
+ if (hash) setOpen(true);
+ }, [hash]);
+
+ const { isLoading: isConfirming, isSuccess: isConfirmed } =
+ useWaitForTransactionReceipt({
+ hash,
+ config: address ? localConfig : config,
+ });
+
+ useEffect(() => {
+ if (isConfirmed) refetchBalances();
+ }, [isConfirmed, refetchBalances]);
+
+ /* ------------------------------ render ------------------------------- */
+ return (
+
+
+
+
+ {/* status dialog / drawer */}
+ {isDesktop ? (
+
+ ) : (
+
+ )}
+
+ );
+}
+
+/* --------------------------------------------------------------------- */
+/* helpers */
+/* --------------------------------------------------------------------- */
+
+type StatusProps = {
+ hash?: `0x${string}`;
+ isPending: boolean;
+ isConfirming: boolean;
+ isConfirmed: boolean;
+ error: BaseError | WriteContractErrorType | null | undefined;
+ explorerUrl?: string;
+};
+
+function StatusBody({
+ hash,
+ isPending,
+ isConfirming,
+ isConfirmed,
+ error,
+ explorerUrl,
+}: StatusProps) {
+ return (
+
+ {hash ? (
+
+ ) : (
+
+
+ No hash
+
+ )}
+
+ {isPending && (
+
+
+ Awaiting signature in wallet…
+
+ )}
+
+ {!isPending && !isConfirming && !isConfirmed && (
+
+ No transaction
+
+ )}
+
+ {isConfirming && (
+
+
+ Broadcast to network—waiting for confirmations…
+
+ )}
+
+ {isConfirmed && (
+
+
+ Confirmed on-chain! Funds are now active.
+
+ )}
+
+ {error && (
+
+
+ {"shortMessage" in (error as BaseError)
+ ? (error as BaseError).shortMessage
+ : (error as Error).message}
+
+ )}
+
+ );
+}
+
+// StatusDialog and StatusDrawer remain identical except for updated StatusProps
+function StatusDialog({
+ open,
+ setOpen,
+ ...status
+}: { open: boolean; setOpen: (v: boolean) => void } & StatusProps) {
+ return (
+
+ );
+}
+
+function StatusDrawer({
+ open,
+ setOpen,
+ ...status
+}: { open: boolean; setOpen: (v: boolean) => void } & StatusProps) {
+ return (
+
+
+
+
+
+
+ Transaction status
+
+ Follow every step—from wallet signature to final confirmation.
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/challenge-3-frontend/components/yield-farm/withdraw.tsx b/challenge-3-frontend/components/yield-farm/withdraw.tsx
new file mode 100644
index 0000000..d21ccd4
--- /dev/null
+++ b/challenge-3-frontend/components/yield-farm/withdraw.tsx
@@ -0,0 +1,446 @@
+"use client";
+
+import { useState, useEffect } from "react";
+import {
+ type BaseError,
+ useWaitForTransactionReceipt,
+ useConfig,
+ useWriteContract,
+ useReadContracts,
+ useAccount,
+} from "wagmi";
+import type { WriteContractErrorType } from "wagmi/actions";
+import { parseUnits, formatUnits } from "viem";
+import {
+ Ban,
+ ExternalLink,
+ ChevronDown,
+ X,
+ Hash,
+ LoaderCircle,
+ CircleCheck,
+ WalletMinimal,
+} from "lucide-react";
+import { z } from "zod";
+import { zodResolver } from "@hookform/resolvers/zod";
+import { useForm } from "react-hook-form";
+import { Button } from "@/components/ui/button";
+import {
+ Form,
+ FormControl,
+ FormDescription,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+} from "@/components/ui/form";
+import { Input } from "@/components/ui/input";
+import { useMediaQuery } from "@/hooks/use-media-query";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogHeader,
+ DialogFooter,
+ DialogTitle,
+ DialogTrigger,
+ DialogClose,
+} from "@/components/ui/dialog";
+import {
+ Drawer,
+ DrawerClose,
+ DrawerContent,
+ DrawerDescription,
+ DrawerFooter,
+ DrawerHeader,
+ DrawerTitle,
+ DrawerTrigger,
+} from "@/components/ui/drawer";
+import { truncateHash } from "@/lib/utils";
+import CopyButton from "@/components/copy-button";
+import { getSigpassWallet } from "@/lib/sigpass";
+import { westendAssetHub } from "@/app/providers";
+import { useAtomValue } from "jotai";
+import { addressAtom } from "@/components/sigpasskit";
+import { localConfig } from "@/app/providers";
+import { mockErc20Abi, yieldFarmingAbi } from "@/lib/abi";
+import {
+ LIQUIDITY_POOL_TOKEN_CONTRACT_ADDRESS,
+ YIELD_FARMING_CONTRACT_ADDRESS,
+} from "@/lib/config";
+import { Skeleton } from "../ui/skeleton";
+
+export default function Withdraw() {
+ const config = useConfig();
+ const account = useAccount();
+ const isDesktop = useMediaQuery("(min-width: 768px)");
+ const [open, setOpen] = useState(false);
+ const address = useAtomValue(addressAtom);
+ const formSchema = z.object({
+ amount: z
+ .string()
+ .refine((val) => !isNaN(parseFloat(val)) && parseFloat(val) > 0, {
+ message: "Amount must be a positive number",
+ })
+ .refine((val) => /^\d*\.?\d{0,18}$/.test(val), {
+ message: "Amount cannot have more than 18 decimal places",
+ })
+ .superRefine((val, ctx) => {
+ if (!maxBalance || !decimals) return;
+
+ const inputAmount = parseUnits(val, decimals as number);
+
+ if (inputAmount > (maxBalance as bigint)) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ message: "Amount exceeds available balance",
+ });
+ }
+ }),
+ });
+
+ const form = useForm>({
+ resolver: zodResolver(formSchema),
+ defaultValues: {
+ amount: "",
+ },
+ });
+
+ const {
+ data: hash,
+ error,
+ isPending,
+ writeContractAsync,
+ } = useWriteContract({
+ config: address ? localConfig : config,
+ });
+
+ const { data, refetch } = useReadContracts({
+ contracts: [
+ {
+ address: YIELD_FARMING_CONTRACT_ADDRESS,
+ abi: yieldFarmingAbi,
+ functionName: "userInfo",
+ args: [address ? address : account.address],
+ },
+ {
+ address: YIELD_FARMING_CONTRACT_ADDRESS,
+ abi: yieldFarmingAbi,
+ functionName: "pendingRewards",
+ args: [address ? address : account.address],
+ },
+ {
+ address: LIQUIDITY_POOL_TOKEN_CONTRACT_ADDRESS,
+ abi: mockErc20Abi,
+ functionName: "decimals",
+ },
+ ],
+ config: address ? localConfig : config,
+ });
+
+ const maxBalance = (data?.[0]?.result as [bigint] | undefined)?.[0];
+ const pendingRewards = data?.[1]?.result as bigint | undefined;
+ const decimals = data?.[2]?.result as number | undefined;
+
+ async function onSubmit(values: z.infer) {
+ if (address) {
+ writeContractAsync({
+ account: await getSigpassWallet(),
+ address: YIELD_FARMING_CONTRACT_ADDRESS,
+ abi: yieldFarmingAbi,
+ functionName: "withdraw",
+ args: [parseUnits(values.amount, decimals as number)],
+ chainId: westendAssetHub.id,
+ });
+ } else {
+ writeContractAsync({
+ address: YIELD_FARMING_CONTRACT_ADDRESS,
+ abi: yieldFarmingAbi,
+ functionName: "withdraw",
+ args: [parseUnits(values.amount, decimals as number)],
+ chainId: westendAssetHub.id,
+ });
+ }
+ }
+
+ const handleClaim = async () => {
+ if (address) {
+ writeContractAsync({
+ account: await getSigpassWallet(),
+ address: YIELD_FARMING_CONTRACT_ADDRESS,
+ abi: yieldFarmingAbi,
+ functionName: "claimRewards",
+ chainId: westendAssetHub.id,
+ });
+ } else {
+ writeContractAsync({
+ address: YIELD_FARMING_CONTRACT_ADDRESS,
+ abi: yieldFarmingAbi,
+ functionName: "claimRewards",
+ chainId: westendAssetHub.id,
+ });
+ }
+ };
+
+ useEffect(() => {
+ if (hash) {
+ setOpen(true);
+ }
+ }, [hash]);
+
+ const { isLoading: isConfirming, isSuccess: isConfirmed } =
+ useWaitForTransactionReceipt({
+ hash,
+ config: address ? localConfig : config,
+ });
+
+ useEffect(() => {
+ if (isConfirmed) {
+ refetch();
+ }
+ }, [isConfirmed, refetch]);
+
+ return (
+
+ {pendingRewards && pendingRewards > 0 ? (
+ <>
+
+ Total reward:
+ {formatUnits(pendingRewards as bigint, decimals as number)}
+
+
+ >
+ ) : null}
+
+
+ {
+ // Desktop would be using dialog
+ isDesktop ? (
+
+ ) : (
+ // Mobile would be using drawer
+
+ )
+ }
+
+ );
+}
+
+/* --------------------------------------------------------------------- */
+/* helpers */
+/* --------------------------------------------------------------------- */
+
+type StatusProps = {
+ hash?: `0x${string}`;
+ isPending: boolean;
+ isConfirming: boolean;
+ isConfirmed: boolean;
+ error: BaseError | WriteContractErrorType | null | undefined;
+ explorerUrl?: string;
+};
+
+function StatusBody({
+ hash,
+ isPending,
+ isConfirming,
+ isConfirmed,
+ error,
+ explorerUrl,
+}: StatusProps) {
+ return (
+
+ {hash ? (
+
+ ) : (
+
+
+ No transaction hash
+
+ )}
+
+ {isPending && (
+
+ Awaiting
+ signature in wallet…
+
+ )}
+
+ {!isPending && !isConfirmed && !isConfirming && (
+
+ No transaction submitted
+
+ )}
+ {isConfirming && (
+
+ Broadcast to
+ network—waiting for confirmations…
+
+ )}
+ {isConfirmed && (
+
+ Transaction confirmed!
+
+ )}
+ {error && (
+
+ {" "}
+ {"shortMessage" in (error as BaseError)
+ ? (error as BaseError).shortMessage
+ : (error as Error).message}
+
+ )}
+
+ );
+}
+
+function StatusDialog({
+ open,
+ setOpen,
+ ...status
+}: { open: boolean; setOpen: (v: boolean) => void } & StatusProps) {
+ return (
+
+ );
+}
+
+function StatusDrawer({
+ open,
+ setOpen,
+ ...status
+}: { open: boolean; setOpen: (v: boolean) => void } & StatusProps) {
+ return (
+
+
+
+
+
+
+ Transaction status
+
+ Follow every step—from wallet signature to final confirmation.
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/challenge-3-frontend/lib/abi.ts b/challenge-3-frontend/lib/abi.ts
index 78ac757..d1f64a9 100644
--- a/challenge-3-frontend/lib/abi.ts
+++ b/challenge-3-frontend/lib/abi.ts
@@ -1,2419 +1,3699 @@
// ERC-20 token ABI
export const erc20Abi = [
- {
- inputs: [
- {
- internalType: "address",
- name: "initialOwner",
- type: "address",
- },
- ],
- stateMutability: "nonpayable",
- type: "constructor",
- },
- {
- inputs: [],
- name: "ECDSAInvalidSignature",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "uint256",
- name: "length",
- type: "uint256",
- },
- ],
- name: "ECDSAInvalidSignatureLength",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "bytes32",
- name: "s",
- type: "bytes32",
- },
- ],
- name: "ECDSAInvalidSignatureS",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "spender",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "allowance",
- type: "uint256",
- },
- {
- internalType: "uint256",
- name: "needed",
- type: "uint256",
- },
- ],
- name: "ERC20InsufficientAllowance",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "sender",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "balance",
- type: "uint256",
- },
- {
- internalType: "uint256",
- name: "needed",
- type: "uint256",
- },
- ],
- name: "ERC20InsufficientBalance",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "approver",
- type: "address",
- },
- ],
- name: "ERC20InvalidApprover",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "receiver",
- type: "address",
- },
- ],
- name: "ERC20InvalidReceiver",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "sender",
- type: "address",
- },
- ],
- name: "ERC20InvalidSender",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "spender",
- type: "address",
- },
- ],
- name: "ERC20InvalidSpender",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "uint256",
- name: "deadline",
- type: "uint256",
- },
- ],
- name: "ERC2612ExpiredSignature",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "signer",
- type: "address",
- },
- {
- internalType: "address",
- name: "owner",
- type: "address",
- },
- ],
- name: "ERC2612InvalidSigner",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "uint256",
- name: "maxLoan",
- type: "uint256",
- },
- ],
- name: "ERC3156ExceededMaxLoan",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "receiver",
- type: "address",
- },
- ],
- name: "ERC3156InvalidReceiver",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "token",
- type: "address",
- },
- ],
- name: "ERC3156UnsupportedToken",
- type: "error",
- },
- {
- inputs: [],
- name: "EnforcedPause",
- type: "error",
- },
- {
- inputs: [],
- name: "ExpectedPause",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "account",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "currentNonce",
- type: "uint256",
- },
- ],
- name: "InvalidAccountNonce",
- type: "error",
- },
- {
- inputs: [],
- name: "InvalidShortString",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "owner",
- type: "address",
- },
- ],
- name: "OwnableInvalidOwner",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "account",
- type: "address",
- },
- ],
- name: "OwnableUnauthorizedAccount",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "string",
- name: "str",
- type: "string",
- },
- ],
- name: "StringTooLong",
- type: "error",
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: "address",
- name: "owner",
- type: "address",
- },
- {
- indexed: true,
- internalType: "address",
- name: "spender",
- type: "address",
- },
- {
- indexed: false,
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "Approval",
- type: "event",
- },
- {
- anonymous: false,
- inputs: [],
- name: "EIP712DomainChanged",
- type: "event",
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: "address",
- name: "previousOwner",
- type: "address",
- },
- {
- indexed: true,
- internalType: "address",
- name: "newOwner",
- type: "address",
- },
- ],
- name: "OwnershipTransferred",
- type: "event",
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: "address",
- name: "account",
- type: "address",
- },
- ],
- name: "Paused",
- type: "event",
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: "address",
- name: "from",
- type: "address",
- },
- {
- indexed: true,
- internalType: "address",
- name: "to",
- type: "address",
- },
- {
- indexed: false,
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "Transfer",
- type: "event",
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: "address",
- name: "account",
- type: "address",
- },
- ],
- name: "Unpaused",
- type: "event",
- },
- {
- inputs: [],
- name: "DOMAIN_SEPARATOR",
- outputs: [
- {
- internalType: "bytes32",
- name: "",
- type: "bytes32",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "owner",
- type: "address",
- },
- {
- internalType: "address",
- name: "spender",
- type: "address",
- },
- ],
- name: "allowance",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "spender",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "approve",
- outputs: [
- {
- internalType: "bool",
- name: "",
- type: "bool",
- },
- ],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "account",
- type: "address",
- },
- ],
- name: "balanceOf",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "burn",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "account",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "burnFrom",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [],
- name: "decimals",
- outputs: [
- {
- internalType: "uint8",
- name: "",
- type: "uint8",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [],
- name: "eip712Domain",
- outputs: [
- {
- internalType: "bytes1",
- name: "fields",
- type: "bytes1",
- },
- {
- internalType: "string",
- name: "name",
- type: "string",
- },
- {
- internalType: "string",
- name: "version",
- type: "string",
- },
- {
- internalType: "uint256",
- name: "chainId",
- type: "uint256",
- },
- {
- internalType: "address",
- name: "verifyingContract",
- type: "address",
- },
- {
- internalType: "bytes32",
- name: "salt",
- type: "bytes32",
- },
- {
- internalType: "uint256[]",
- name: "extensions",
- type: "uint256[]",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "token",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "flashFee",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "contract IERC3156FlashBorrower",
- name: "receiver",
- type: "address",
- },
- {
- internalType: "address",
- name: "token",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- {
- internalType: "bytes",
- name: "data",
- type: "bytes",
- },
- ],
- name: "flashLoan",
- outputs: [
- {
- internalType: "bool",
- name: "",
- type: "bool",
- },
- ],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "token",
- type: "address",
- },
- ],
- name: "maxFlashLoan",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "to",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "amount",
- type: "uint256",
- },
- ],
- name: "mint",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [],
- name: "name",
- outputs: [
- {
- internalType: "string",
- name: "",
- type: "string",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "owner",
- type: "address",
- },
- ],
- name: "nonces",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [],
- name: "owner",
- outputs: [
- {
- internalType: "address",
- name: "",
- type: "address",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [],
- name: "pause",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [],
- name: "paused",
- outputs: [
- {
- internalType: "bool",
- name: "",
- type: "bool",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "owner",
- type: "address",
- },
- {
- internalType: "address",
- name: "spender",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- {
- internalType: "uint256",
- name: "deadline",
- type: "uint256",
- },
- {
- internalType: "uint8",
- name: "v",
- type: "uint8",
- },
- {
- internalType: "bytes32",
- name: "r",
- type: "bytes32",
- },
- {
- internalType: "bytes32",
- name: "s",
- type: "bytes32",
- },
- ],
- name: "permit",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [],
- name: "renounceOwnership",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [],
- name: "symbol",
- outputs: [
- {
- internalType: "string",
- name: "",
- type: "string",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [],
- name: "totalSupply",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "to",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "transfer",
- outputs: [
- {
- internalType: "bool",
- name: "",
- type: "bool",
- },
- ],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "from",
- type: "address",
- },
- {
- internalType: "address",
- name: "to",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "transferFrom",
- outputs: [
- {
- internalType: "bool",
- name: "",
- type: "bool",
- },
- ],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "newOwner",
- type: "address",
- },
- ],
- name: "transferOwnership",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [],
- name: "unpause",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "initialOwner",
+ type: "address",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "constructor",
+ },
+ {
+ inputs: [],
+ name: "ECDSAInvalidSignature",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "uint256",
+ name: "length",
+ type: "uint256",
+ },
+ ],
+ name: "ECDSAInvalidSignatureLength",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "bytes32",
+ name: "s",
+ type: "bytes32",
+ },
+ ],
+ name: "ECDSAInvalidSignatureS",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "allowance",
+ type: "uint256",
+ },
+ {
+ internalType: "uint256",
+ name: "needed",
+ type: "uint256",
+ },
+ ],
+ name: "ERC20InsufficientAllowance",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "sender",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "balance",
+ type: "uint256",
+ },
+ {
+ internalType: "uint256",
+ name: "needed",
+ type: "uint256",
+ },
+ ],
+ name: "ERC20InsufficientBalance",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "approver",
+ type: "address",
+ },
+ ],
+ name: "ERC20InvalidApprover",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "receiver",
+ type: "address",
+ },
+ ],
+ name: "ERC20InvalidReceiver",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "sender",
+ type: "address",
+ },
+ ],
+ name: "ERC20InvalidSender",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ ],
+ name: "ERC20InvalidSpender",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "uint256",
+ name: "deadline",
+ type: "uint256",
+ },
+ ],
+ name: "ERC2612ExpiredSignature",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "signer",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ ],
+ name: "ERC2612InvalidSigner",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "uint256",
+ name: "maxLoan",
+ type: "uint256",
+ },
+ ],
+ name: "ERC3156ExceededMaxLoan",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "receiver",
+ type: "address",
+ },
+ ],
+ name: "ERC3156InvalidReceiver",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "token",
+ type: "address",
+ },
+ ],
+ name: "ERC3156UnsupportedToken",
+ type: "error",
+ },
+ {
+ inputs: [],
+ name: "EnforcedPause",
+ type: "error",
+ },
+ {
+ inputs: [],
+ name: "ExpectedPause",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "currentNonce",
+ type: "uint256",
+ },
+ ],
+ name: "InvalidAccountNonce",
+ type: "error",
+ },
+ {
+ inputs: [],
+ name: "InvalidShortString",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ ],
+ name: "OwnableInvalidOwner",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ ],
+ name: "OwnableUnauthorizedAccount",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "string",
+ name: "str",
+ type: "string",
+ },
+ ],
+ name: "StringTooLong",
+ type: "error",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ {
+ indexed: true,
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ {
+ indexed: false,
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "Approval",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [],
+ name: "EIP712DomainChanged",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ internalType: "address",
+ name: "previousOwner",
+ type: "address",
+ },
+ {
+ indexed: true,
+ internalType: "address",
+ name: "newOwner",
+ type: "address",
+ },
+ ],
+ name: "OwnershipTransferred",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: false,
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ ],
+ name: "Paused",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ internalType: "address",
+ name: "from",
+ type: "address",
+ },
+ {
+ indexed: true,
+ internalType: "address",
+ name: "to",
+ type: "address",
+ },
+ {
+ indexed: false,
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "Transfer",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: false,
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ ],
+ name: "Unpaused",
+ type: "event",
+ },
+ {
+ inputs: [],
+ name: "DOMAIN_SEPARATOR",
+ outputs: [
+ {
+ internalType: "bytes32",
+ name: "",
+ type: "bytes32",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ ],
+ name: "allowance",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "approve",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ ],
+ name: "balanceOf",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "burn",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "burnFrom",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "decimals",
+ outputs: [
+ {
+ internalType: "uint8",
+ name: "",
+ type: "uint8",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "eip712Domain",
+ outputs: [
+ {
+ internalType: "bytes1",
+ name: "fields",
+ type: "bytes1",
+ },
+ {
+ internalType: "string",
+ name: "name",
+ type: "string",
+ },
+ {
+ internalType: "string",
+ name: "version",
+ type: "string",
+ },
+ {
+ internalType: "uint256",
+ name: "chainId",
+ type: "uint256",
+ },
+ {
+ internalType: "address",
+ name: "verifyingContract",
+ type: "address",
+ },
+ {
+ internalType: "bytes32",
+ name: "salt",
+ type: "bytes32",
+ },
+ {
+ internalType: "uint256[]",
+ name: "extensions",
+ type: "uint256[]",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "token",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "flashFee",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "contract IERC3156FlashBorrower",
+ name: "receiver",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "token",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ {
+ internalType: "bytes",
+ name: "data",
+ type: "bytes",
+ },
+ ],
+ name: "flashLoan",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "token",
+ type: "address",
+ },
+ ],
+ name: "maxFlashLoan",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "to",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "amount",
+ type: "uint256",
+ },
+ ],
+ name: "mint",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "name",
+ outputs: [
+ {
+ internalType: "string",
+ name: "",
+ type: "string",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ ],
+ name: "nonces",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "owner",
+ outputs: [
+ {
+ internalType: "address",
+ name: "",
+ type: "address",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "pause",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "paused",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ {
+ internalType: "uint256",
+ name: "deadline",
+ type: "uint256",
+ },
+ {
+ internalType: "uint8",
+ name: "v",
+ type: "uint8",
+ },
+ {
+ internalType: "bytes32",
+ name: "r",
+ type: "bytes32",
+ },
+ {
+ internalType: "bytes32",
+ name: "s",
+ type: "bytes32",
+ },
+ ],
+ name: "permit",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "renounceOwnership",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "symbol",
+ outputs: [
+ {
+ internalType: "string",
+ name: "",
+ type: "string",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "totalSupply",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "to",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "transfer",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "from",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "to",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "transferFrom",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "newOwner",
+ type: "address",
+ },
+ ],
+ name: "transferOwnership",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "unpause",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
];
-// ERC-20 token ABI Extend
+// ERC-20 token ABI Extend
export const erc20AbiExtend = [
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "initialOwner",
- "type": "address"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "constructor"
- },
- {
- "inputs": [],
- "name": "ECDSAInvalidSignature",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "length",
- "type": "uint256"
- }
- ],
- "name": "ECDSAInvalidSignatureLength",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "bytes32",
- "name": "s",
- "type": "bytes32"
- }
- ],
- "name": "ECDSAInvalidSignatureS",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "spender",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "allowance",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "needed",
- "type": "uint256"
- }
- ],
- "name": "ERC20InsufficientAllowance",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "sender",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "balance",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "needed",
- "type": "uint256"
- }
- ],
- "name": "ERC20InsufficientBalance",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "approver",
- "type": "address"
- }
- ],
- "name": "ERC20InvalidApprover",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- }
- ],
- "name": "ERC20InvalidReceiver",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "sender",
- "type": "address"
- }
- ],
- "name": "ERC20InvalidSender",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "spender",
- "type": "address"
- }
- ],
- "name": "ERC20InvalidSpender",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "deadline",
- "type": "uint256"
- }
- ],
- "name": "ERC2612ExpiredSignature",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "signer",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "owner",
- "type": "address"
- }
- ],
- "name": "ERC2612InvalidSigner",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "maxLoan",
- "type": "uint256"
- }
- ],
- "name": "ERC3156ExceededMaxLoan",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- }
- ],
- "name": "ERC3156InvalidReceiver",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "token",
- "type": "address"
- }
- ],
- "name": "ERC3156UnsupportedToken",
- "type": "error"
- },
- {
- "inputs": [],
- "name": "EnforcedPause",
- "type": "error"
- },
- {
- "inputs": [],
- "name": "ExpectedPause",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "account",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "currentNonce",
- "type": "uint256"
- }
- ],
- "name": "InvalidAccountNonce",
- "type": "error"
- },
- {
- "inputs": [],
- "name": "InvalidShortString",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "owner",
- "type": "address"
- }
- ],
- "name": "OwnableInvalidOwner",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "account",
- "type": "address"
- }
- ],
- "name": "OwnableUnauthorizedAccount",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "string",
- "name": "str",
- "type": "string"
- }
- ],
- "name": "StringTooLong",
- "type": "error"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "owner",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "spender",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "Approval",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [],
- "name": "EIP712DomainChanged",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "previousOwner",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "OwnershipTransferred",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "account",
- "type": "address"
- }
- ],
- "name": "Paused",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "from",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "Transfer",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "account",
- "type": "address"
- }
- ],
- "name": "Unpaused",
- "type": "event"
- },
- {
- "inputs": [],
- "name": "DOMAIN_SEPARATOR",
- "outputs": [
- {
- "internalType": "bytes32",
- "name": "",
- "type": "bytes32"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "owner",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "spender",
- "type": "address"
- }
- ],
- "name": "allowance",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "spender",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "approve",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "account",
- "type": "address"
- }
- ],
- "name": "balanceOf",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "burn",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "account",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "burnFrom",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "decimals",
- "outputs": [
- {
- "internalType": "uint8",
- "name": "",
- "type": "uint8"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "eip712Domain",
- "outputs": [
- {
- "internalType": "bytes1",
- "name": "fields",
- "type": "bytes1"
- },
- {
- "internalType": "string",
- "name": "name",
- "type": "string"
- },
- {
- "internalType": "string",
- "name": "version",
- "type": "string"
- },
- {
- "internalType": "uint256",
- "name": "chainId",
- "type": "uint256"
- },
- {
- "internalType": "address",
- "name": "verifyingContract",
- "type": "address"
- },
- {
- "internalType": "bytes32",
- "name": "salt",
- "type": "bytes32"
- },
- {
- "internalType": "uint256[]",
- "name": "extensions",
- "type": "uint256[]"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "token",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "flashFee",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "contract IERC3156FlashBorrower",
- "name": "receiver",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "token",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- },
- {
- "internalType": "bytes",
- "name": "data",
- "type": "bytes"
- }
- ],
- "name": "flashLoan",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "token",
- "type": "address"
- }
- ],
- "name": "maxFlashLoan",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- }
- ],
- "name": "mint",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "name",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "owner",
- "type": "address"
- }
- ],
- "name": "nonces",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "owner",
- "outputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "pause",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "paused",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "owner",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "spender",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "deadline",
- "type": "uint256"
- },
- {
- "internalType": "uint8",
- "name": "v",
- "type": "uint8"
- },
- {
- "internalType": "bytes32",
- "name": "r",
- "type": "bytes32"
- },
- {
- "internalType": "bytes32",
- "name": "s",
- "type": "bytes32"
- }
- ],
- "name": "permit",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "renounceOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "symbol",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "totalSupply",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "transfer",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "from",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "transferFrom",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "transferOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "unpause",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- }
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "initialOwner",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ },
+ {
+ "inputs": [],
+ "name": "ECDSAInvalidSignature",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "length",
+ "type": "uint256"
+ }
+ ],
+ "name": "ECDSAInvalidSignatureLength",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes32",
+ "name": "s",
+ "type": "bytes32"
+ }
+ ],
+ "name": "ECDSAInvalidSignatureS",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "allowance",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "needed",
+ "type": "uint256"
+ }
+ ],
+ "name": "ERC20InsufficientAllowance",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "sender",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "balance",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "needed",
+ "type": "uint256"
+ }
+ ],
+ "name": "ERC20InsufficientBalance",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "approver",
+ "type": "address"
+ }
+ ],
+ "name": "ERC20InvalidApprover",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "receiver",
+ "type": "address"
+ }
+ ],
+ "name": "ERC20InvalidReceiver",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "sender",
+ "type": "address"
+ }
+ ],
+ "name": "ERC20InvalidSender",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ }
+ ],
+ "name": "ERC20InvalidSpender",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "deadline",
+ "type": "uint256"
+ }
+ ],
+ "name": "ERC2612ExpiredSignature",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "signer",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ }
+ ],
+ "name": "ERC2612InvalidSigner",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "maxLoan",
+ "type": "uint256"
+ }
+ ],
+ "name": "ERC3156ExceededMaxLoan",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "receiver",
+ "type": "address"
+ }
+ ],
+ "name": "ERC3156InvalidReceiver",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "ERC3156UnsupportedToken",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "EnforcedPause",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "ExpectedPause",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "currentNonce",
+ "type": "uint256"
+ }
+ ],
+ "name": "InvalidAccountNonce",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidShortString",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ }
+ ],
+ "name": "OwnableInvalidOwner",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "OwnableUnauthorizedAccount",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "string",
+ "name": "str",
+ "type": "string"
+ }
+ ],
+ "name": "StringTooLong",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "Approval",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [],
+ "name": "EIP712DomainChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "previousOwner",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "OwnershipTransferred",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Paused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "Transfer",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Unpaused",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "DOMAIN_SEPARATOR",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ }
+ ],
+ "name": "allowance",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "approve",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "balanceOf",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "burn",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "burnFrom",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "decimals",
+ "outputs": [
+ {
+ "internalType": "uint8",
+ "name": "",
+ "type": "uint8"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "eip712Domain",
+ "outputs": [
+ {
+ "internalType": "bytes1",
+ "name": "fields",
+ "type": "bytes1"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "internalType": "string",
+ "name": "version",
+ "type": "string"
+ },
+ {
+ "internalType": "uint256",
+ "name": "chainId",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address",
+ "name": "verifyingContract",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "salt",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint256[]",
+ "name": "extensions",
+ "type": "uint256[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "flashFee",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "contract IERC3156FlashBorrower",
+ "name": "receiver",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ }
+ ],
+ "name": "flashLoan",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "maxFlashLoan",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "mint",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "name",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ }
+ ],
+ "name": "nonces",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "owner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "pause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "paused",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "deadline",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint8",
+ "name": "v",
+ "type": "uint8"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "r",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "s",
+ "type": "bytes32"
+ }
+ ],
+ "name": "permit",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "renounceOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "symbol",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "totalSupply",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "transfer",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "transferFrom",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "transferOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "unpause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ }
];
// Moonbeam SLpX ABI Contract
export const moonbeamSlpxAbi = [
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "previousAdmin",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "address",
- "name": "newAdmin",
- "type": "address"
- }
- ],
- "name": "AdminChanged",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "beacon",
- "type": "address"
- }
- ],
- "name": "BeaconUpgraded",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "implementation",
- "type": "address"
- }
- ],
- "name": "Upgraded",
- "type": "event"
- },
- {
- "stateMutability": "payable",
- "type": "fallback"
- },
- {
- "inputs": [],
- "name": "admin",
- "outputs": [
- {
- "internalType": "address",
- "name": "admin_",
- "type": "address"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "newAdmin",
- "type": "address"
- }
- ],
- "name": "changeAdmin",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "implementation",
- "outputs": [
- {
- "internalType": "address",
- "name": "implementation_",
- "type": "address"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "newImplementation",
- "type": "address"
- }
- ],
- "name": "upgradeTo",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "newImplementation",
- "type": "address"
- },
- {
- "internalType": "bytes",
- "name": "data",
- "type": "bytes"
- }
- ],
- "name": "upgradeToAndCall",
- "outputs": [],
- "stateMutability": "payable",
- "type": "function"
- },
- {
- "stateMutability": "payable",
- "type": "receive"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "assetAddress",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint128",
- "name": "amount",
- "type": "uint128"
- },
- {
- "indexed": false,
- "internalType": "uint64",
- "name": "dest_chain_id",
- "type": "uint64"
- },
- {
- "indexed": false,
- "internalType": "bytes",
- "name": "receiver",
- "type": "bytes"
- },
- {
- "indexed": false,
- "internalType": "string",
- "name": "remark",
- "type": "string"
- },
- {
- "indexed": false,
- "internalType": "uint32",
- "name": "channel_id",
- "type": "uint32"
- }
- ],
- "name": "CreateOrder",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "uint8",
- "name": "version",
- "type": "uint8"
- }
- ],
- "name": "Initialized",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "minter",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "address",
- "name": "assetAddress",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- },
- {
- "indexed": false,
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "bytes",
- "name": "callcode",
- "type": "bytes"
- },
- {
- "indexed": false,
- "internalType": "string",
- "name": "remark",
- "type": "string"
- }
- ],
- "name": "Mint",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "previousOwner",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "OwnershipTransferred",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "account",
- "type": "address"
- }
- ],
- "name": "Paused",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "redeemer",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "address",
- "name": "assetAddress",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- },
- {
- "indexed": false,
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "bytes",
- "name": "callcode",
- "type": "bytes"
- }
- ],
- "name": "Redeem",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "account",
- "type": "address"
- }
- ],
- "name": "Unpaused",
- "type": "event"
- },
- {
- "inputs": [],
- "name": "BNCAddress",
- "outputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "name": "addressToAssetInfo",
- "outputs": [
- {
- "internalType": "bytes2",
- "name": "currencyId",
- "type": "bytes2"
- },
- {
- "internalType": "uint256",
- "name": "operationalMin",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "bifrostParaId",
- "outputs": [
- {
- "internalType": "uint32",
- "name": "",
- "type": "uint32"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "assetAddress",
- "type": "address"
- },
- {
- "internalType": "uint128",
- "name": "amount",
- "type": "uint128"
- },
- {
- "internalType": "uint64",
- "name": "dest_chain_id",
- "type": "uint64"
- },
- {
- "internalType": "bytes",
- "name": "receiver",
- "type": "bytes"
- },
- {
- "internalType": "string",
- "name": "remark",
- "type": "string"
- },
- {
- "internalType": "uint32",
- "name": "channel_id",
- "type": "uint32"
- }
- ],
- "name": "create_order",
- "outputs": [],
- "stateMutability": "payable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint64",
- "name": "",
- "type": "uint64"
- }
- ],
- "name": "destChainInfo",
- "outputs": [
- {
- "internalType": "bool",
- "name": "is_evm",
- "type": "bool"
- },
- {
- "internalType": "bool",
- "name": "is_substrate",
- "type": "bool"
- },
- {
- "internalType": "bytes1",
- "name": "raw_chain_index",
- "type": "bytes1"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "_BNCAddress",
- "type": "address"
- },
- {
- "internalType": "uint32",
- "name": "_bifrostParaId",
- "type": "uint32"
- },
- {
- "internalType": "bytes2",
- "name": "_nativeCurrencyId",
- "type": "bytes2"
- }
- ],
- "name": "initialize",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "assetAddress",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- },
- {
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- },
- {
- "internalType": "string",
- "name": "remark",
- "type": "string"
- }
- ],
- "name": "mintVAsset",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "assetAddress",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- },
- {
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- },
- {
- "internalType": "string",
- "name": "remark",
- "type": "string"
- },
- {
- "internalType": "uint32",
- "name": "channel_id",
- "type": "uint32"
- }
- ],
- "name": "mintVAssetWithChannelId",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- },
- {
- "internalType": "string",
- "name": "remark",
- "type": "string"
- }
- ],
- "name": "mintVNativeAsset",
- "outputs": [],
- "stateMutability": "payable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- },
- {
- "internalType": "string",
- "name": "remark",
- "type": "string"
- },
- {
- "internalType": "uint32",
- "name": "channel_id",
- "type": "uint32"
- }
- ],
- "name": "mintVNativeAssetWithChannelId",
- "outputs": [],
- "stateMutability": "payable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "enum MoonbeamSlpx.Operation",
- "name": "",
- "type": "uint8"
- }
- ],
- "name": "operationToFeeInfo",
- "outputs": [
- {
- "internalType": "uint64",
- "name": "transactRequiredWeightAtMost",
- "type": "uint64"
- },
- {
- "internalType": "uint256",
- "name": "feeAmount",
- "type": "uint256"
- },
- {
- "internalType": "uint64",
- "name": "overallWeight",
- "type": "uint64"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "owner",
- "outputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "pause",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "paused",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "vAssetAddress",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- },
- {
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- }
- ],
- "name": "redeemAsset",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "renounceOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "assetAddress",
- "type": "address"
- },
- {
- "internalType": "bytes2",
- "name": "currencyId",
- "type": "bytes2"
- },
- {
- "internalType": "uint256",
- "name": "minimumValue",
- "type": "uint256"
- }
- ],
- "name": "setAssetAddressInfo",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint64",
- "name": "dest_chain_id",
- "type": "uint64"
- },
- {
- "internalType": "bool",
- "name": "is_evm",
- "type": "bool"
- },
- {
- "internalType": "bool",
- "name": "is_substrate",
- "type": "bool"
- },
- {
- "internalType": "bytes1",
- "name": "raw_chain_index",
- "type": "bytes1"
- }
- ],
- "name": "setDestChainInfo",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "enum MoonbeamSlpx.Operation",
- "name": "_operation",
- "type": "uint8"
- },
- {
- "internalType": "uint64",
- "name": "_transactRequiredWeightAtMost",
- "type": "uint64"
- },
- {
- "internalType": "uint64",
- "name": "_overallWeight",
- "type": "uint64"
- },
- {
- "internalType": "uint256",
- "name": "_feeAmount",
- "type": "uint256"
- }
- ],
- "name": "setOperationToFeeInfo",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "transferOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "unpause",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "_logic",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "admin_",
- "type": "address"
- },
- {
- "internalType": "bytes",
- "name": "_data",
- "type": "bytes"
- }
- ],
- "stateMutability": "payable",
- "type": "constructor"
- }
-];
\ No newline at end of file
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "previousAdmin",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "newAdmin",
+ "type": "address"
+ }
+ ],
+ "name": "AdminChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "beacon",
+ "type": "address"
+ }
+ ],
+ "name": "BeaconUpgraded",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "implementation",
+ "type": "address"
+ }
+ ],
+ "name": "Upgraded",
+ "type": "event"
+ },
+ {
+ "stateMutability": "payable",
+ "type": "fallback"
+ },
+ {
+ "inputs": [],
+ "name": "admin",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "admin_",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newAdmin",
+ "type": "address"
+ }
+ ],
+ "name": "changeAdmin",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "implementation",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "implementation_",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ }
+ ],
+ "name": "upgradeTo",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ }
+ ],
+ "name": "upgradeToAndCall",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "stateMutability": "payable",
+ "type": "receive"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "assetAddress",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint128",
+ "name": "amount",
+ "type": "uint128"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint64",
+ "name": "dest_chain_id",
+ "type": "uint64"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes",
+ "name": "receiver",
+ "type": "bytes"
+ },
+ {
+ "indexed": false,
+ "internalType": "string",
+ "name": "remark",
+ "type": "string"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint32",
+ "name": "channel_id",
+ "type": "uint32"
+ }
+ ],
+ "name": "CreateOrder",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint8",
+ "name": "version",
+ "type": "uint8"
+ }
+ ],
+ "name": "Initialized",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "minter",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "assetAddress",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "receiver",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes",
+ "name": "callcode",
+ "type": "bytes"
+ },
+ {
+ "indexed": false,
+ "internalType": "string",
+ "name": "remark",
+ "type": "string"
+ }
+ ],
+ "name": "Mint",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "previousOwner",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "OwnershipTransferred",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Paused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "redeemer",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "assetAddress",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "receiver",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes",
+ "name": "callcode",
+ "type": "bytes"
+ }
+ ],
+ "name": "Redeem",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Unpaused",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "BNCAddress",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "addressToAssetInfo",
+ "outputs": [
+ {
+ "internalType": "bytes2",
+ "name": "currencyId",
+ "type": "bytes2"
+ },
+ {
+ "internalType": "uint256",
+ "name": "operationalMin",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "bifrostParaId",
+ "outputs": [
+ {
+ "internalType": "uint32",
+ "name": "",
+ "type": "uint32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "assetAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "uint128",
+ "name": "amount",
+ "type": "uint128"
+ },
+ {
+ "internalType": "uint64",
+ "name": "dest_chain_id",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bytes",
+ "name": "receiver",
+ "type": "bytes"
+ },
+ {
+ "internalType": "string",
+ "name": "remark",
+ "type": "string"
+ },
+ {
+ "internalType": "uint32",
+ "name": "channel_id",
+ "type": "uint32"
+ }
+ ],
+ "name": "create_order",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "",
+ "type": "uint64"
+ }
+ ],
+ "name": "destChainInfo",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "is_evm",
+ "type": "bool"
+ },
+ {
+ "internalType": "bool",
+ "name": "is_substrate",
+ "type": "bool"
+ },
+ {
+ "internalType": "bytes1",
+ "name": "raw_chain_index",
+ "type": "bytes1"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_BNCAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "uint32",
+ "name": "_bifrostParaId",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes2",
+ "name": "_nativeCurrencyId",
+ "type": "bytes2"
+ }
+ ],
+ "name": "initialize",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "assetAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address",
+ "name": "receiver",
+ "type": "address"
+ },
+ {
+ "internalType": "string",
+ "name": "remark",
+ "type": "string"
+ }
+ ],
+ "name": "mintVAsset",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "assetAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address",
+ "name": "receiver",
+ "type": "address"
+ },
+ {
+ "internalType": "string",
+ "name": "remark",
+ "type": "string"
+ },
+ {
+ "internalType": "uint32",
+ "name": "channel_id",
+ "type": "uint32"
+ }
+ ],
+ "name": "mintVAssetWithChannelId",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "receiver",
+ "type": "address"
+ },
+ {
+ "internalType": "string",
+ "name": "remark",
+ "type": "string"
+ }
+ ],
+ "name": "mintVNativeAsset",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "receiver",
+ "type": "address"
+ },
+ {
+ "internalType": "string",
+ "name": "remark",
+ "type": "string"
+ },
+ {
+ "internalType": "uint32",
+ "name": "channel_id",
+ "type": "uint32"
+ }
+ ],
+ "name": "mintVNativeAssetWithChannelId",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "enum MoonbeamSlpx.Operation",
+ "name": "",
+ "type": "uint8"
+ }
+ ],
+ "name": "operationToFeeInfo",
+ "outputs": [
+ {
+ "internalType": "uint64",
+ "name": "transactRequiredWeightAtMost",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint256",
+ "name": "feeAmount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint64",
+ "name": "overallWeight",
+ "type": "uint64"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "owner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "pause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "paused",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "vAssetAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address",
+ "name": "receiver",
+ "type": "address"
+ }
+ ],
+ "name": "redeemAsset",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "renounceOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "assetAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes2",
+ "name": "currencyId",
+ "type": "bytes2"
+ },
+ {
+ "internalType": "uint256",
+ "name": "minimumValue",
+ "type": "uint256"
+ }
+ ],
+ "name": "setAssetAddressInfo",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "dest_chain_id",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bool",
+ "name": "is_evm",
+ "type": "bool"
+ },
+ {
+ "internalType": "bool",
+ "name": "is_substrate",
+ "type": "bool"
+ },
+ {
+ "internalType": "bytes1",
+ "name": "raw_chain_index",
+ "type": "bytes1"
+ }
+ ],
+ "name": "setDestChainInfo",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "enum MoonbeamSlpx.Operation",
+ "name": "_operation",
+ "type": "uint8"
+ },
+ {
+ "internalType": "uint64",
+ "name": "_transactRequiredWeightAtMost",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "_overallWeight",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint256",
+ "name": "_feeAmount",
+ "type": "uint256"
+ }
+ ],
+ "name": "setOperationToFeeInfo",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "transferOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "unpause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_logic",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "admin_",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "_data",
+ "type": "bytes"
+ }
+ ],
+ "stateMutability": "payable",
+ "type": "constructor"
+ }
+];
+
+
+export const mockErc20Abi = [
+ {
+ "inputs": [
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "allowance",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "needed",
+ "type": "uint256"
+ }
+ ],
+ "name": "ERC20InsufficientAllowance",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "sender",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "balance",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "needed",
+ "type": "uint256"
+ }
+ ],
+ "name": "ERC20InsufficientBalance",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "approver",
+ "type": "address"
+ }
+ ],
+ "name": "ERC20InvalidApprover",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "receiver",
+ "type": "address"
+ }
+ ],
+ "name": "ERC20InvalidReceiver",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "sender",
+ "type": "address"
+ }
+ ],
+ "name": "ERC20InvalidSender",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ }
+ ],
+ "name": "ERC20InvalidSpender",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ }
+ ],
+ "name": "OwnableInvalidOwner",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "OwnableUnauthorizedAccount",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "Approval",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "previousOwner",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "OwnershipTransferred",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "Transfer",
+ "type": "event"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ }
+ ],
+ "name": "allowance",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "approve",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "balanceOf",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "decimals",
+ "outputs": [
+ {
+ "internalType": "uint8",
+ "name": "",
+ "type": "uint8"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "mint",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "name",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "owner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "renounceOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "symbol",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "totalSupply",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "transfer",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "transferFrom",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "transferOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ }
+];
+
+export const tokenVestingAbi = [
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "tokenAddress",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ },
+ {
+ "inputs": [],
+ "name": "EnforcedPause",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "ExpectedPause",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ }
+ ],
+ "name": "OwnableInvalidOwner",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "OwnableUnauthorizedAccount",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "ReentrancyGuardReentrantCall",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "beneficiary",
+ "type": "address"
+ }
+ ],
+ "name": "BeneficiaryRemovedFromWhitelist",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "beneficiary",
+ "type": "address"
+ }
+ ],
+ "name": "BeneficiaryWhitelisted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "previousOwner",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "OwnershipTransferred",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Paused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "beneficiary",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "TokensClaimed",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Unpaused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "beneficiary",
+ "type": "address"
+ }
+ ],
+ "name": "VestingRevoked",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "beneficiary",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "VestingScheduleCreated",
+ "type": "event"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "beneficiary",
+ "type": "address"
+ }
+ ],
+ "name": "addToWhitelist",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "beneficiary",
+ "type": "address"
+ }
+ ],
+ "name": "calculateVestedAmount",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "claimVestedTokens",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "beneficiary",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "cliffDuration",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "vestingDuration",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "startTime",
+ "type": "uint256"
+ }
+ ],
+ "name": "createVestingSchedule",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "owner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "pause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "paused",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "beneficiary",
+ "type": "address"
+ }
+ ],
+ "name": "removeFromWhitelist",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "renounceOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "beneficiary",
+ "type": "address"
+ }
+ ],
+ "name": "revokeVesting",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "token",
+ "outputs": [
+ {
+ "internalType": "contract IERC20",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "transferOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "unpause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "vestingSchedules",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "totalAmount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "startTime",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "cliffDuration",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "vestingDuration",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amountClaimed",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bool",
+ "name": "revoked",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "whitelist",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ }
+];
+
+export const yieldFarmingAbi = [
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_lpToken",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_rewardToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "_rewardRate",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ }
+ ],
+ "name": "OwnableInvalidOwner",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "OwnableUnauthorizedAccount",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "ReentrancyGuardReentrantCall",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "user",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "EmergencyWithdrawn",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "previousOwner",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "OwnershipTransferred",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "user",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "RewardsClaimed",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "user",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "Staked",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "user",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "Withdrawn",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "BOOST_THRESHOLD_1",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "BOOST_THRESHOLD_2",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "BOOST_THRESHOLD_3",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_user",
+ "type": "address"
+ }
+ ],
+ "name": "calculateBoostMultiplier",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "claimRewards",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_user",
+ "type": "address"
+ }
+ ],
+ "name": "earned",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "emergencyWithdraw",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "lastUpdateTime",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "lpToken",
+ "outputs": [
+ {
+ "internalType": "contract IERC20",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "owner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_user",
+ "type": "address"
+ }
+ ],
+ "name": "pendingRewards",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "renounceOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "rewardPerToken",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "rewardPerTokenStored",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "rewardRate",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "rewardToken",
+ "outputs": [
+ {
+ "internalType": "contract IERC20",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "_amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "stake",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "totalStaked",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "transferOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "_newRate",
+ "type": "uint256"
+ }
+ ],
+ "name": "updateRewardRate",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "userInfo",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "startTime",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "rewardDebt",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "pendingRewards",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "_amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "withdraw",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ }
+];
diff --git a/challenge-3-frontend/lib/atoms.ts b/challenge-3-frontend/lib/atoms.ts
new file mode 100644
index 0000000..275369c
--- /dev/null
+++ b/challenge-3-frontend/lib/atoms.ts
@@ -0,0 +1,7 @@
+import { atom } from "jotai";
+
+/**
+ * Global open-state for the "Create Wallet” modal.
+ * Any component can toggle this to show / hide the dialog.
+ */
+export const createWalletDialogOpenAtom = atom(false);
\ No newline at end of file
diff --git a/challenge-3-frontend/lib/config.ts b/challenge-3-frontend/lib/config.ts
new file mode 100644
index 0000000..a03963d
--- /dev/null
+++ b/challenge-3-frontend/lib/config.ts
@@ -0,0 +1,8 @@
+export const LIQUIDITY_POOL_TOKEN_CONTRACT_ADDRESS =
+ "0xaa085d3505c097c0a5e0cd97ab0f52114cca9967";
+export const REWARD_TOKEN_CONTRACT_ADDRESS =
+ "0xdd665d880f44daa5b3d18b8a8085def1aa3a9180";
+export const YIELD_FARMING_CONTRACT_ADDRESS =
+ "0x5b8595975e688e84536c1c5ac0c164345ea7e352";
+export const TOKEN_VESTING_CONTRACT_ADDRESS =
+ "0xa8bf41815aa87f9c67cbd6792a27a5451511b85e";
diff --git a/challenge-3-frontend/package-lock.json b/challenge-3-frontend/package-lock.json
index dec4c63..2a88eb1 100644
--- a/challenge-3-frontend/package-lock.json
+++ b/challenge-3-frontend/package-lock.json
@@ -10,6 +10,7 @@
"dependencies": {
"@hookform/resolvers": "^3.9.1",
"@radix-ui/react-dialog": "^1.1.3",
+ "@radix-ui/react-dropdown-menu": "^2.1.12",
"@radix-ui/react-label": "^2.1.1",
"@radix-ui/react-select": "^2.1.4",
"@radix-ui/react-separator": "^1.1.1",
@@ -1274,6 +1275,164 @@
}
}
},
+ "node_modules/@radix-ui/react-dropdown-menu": {
+ "version": "2.1.12",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.12.tgz",
+ "integrity": "sha512-VJoMs+BWWE7YhzEQyVwvF9n22Eiyr83HotCVrMQzla/OwRovXCgah7AcaEr4hMNj4gJxSdtIbcHGvmJXOoJVHA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-menu": "2.1.12",
+ "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-use-controllable-state": "1.2.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/primitive": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.2.tgz",
+ "integrity": "sha512-XnbHrrprsNqZKQhStrSwgRUQzoCI1glLzdw79xiZPoofhGICeZRSQ3dIxAKH1gb3OHfNf4d6f+vAv3kil2eggA==",
+ "license": "MIT"
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-compose-refs": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz",
+ "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-context": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.2.tgz",
+ "integrity": "sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-id": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.1.tgz",
+ "integrity": "sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.0.tgz",
+ "integrity": "sha512-/J/FhLdK0zVcILOwt5g+dH4KnkonCtkVJsa2G6JmvbbtZfBEI1gMsO3QMjseL4F/SwfAMt1Vc/0XKYKq+xJ1sw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-slot": "1.2.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-slot": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.0.tgz",
+ "integrity": "sha512-ujc+V6r0HNDviYqIK3rW4ffgYiZ8g5DEHrGJVk4x7kTlLXRDILnKX9vAUYeIsLOoDpDJ0ujpqMkjH4w2ofuo6w==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.2.tgz",
+ "integrity": "sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-effect-event": "0.0.2",
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz",
+ "integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-focus-guards": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.1.tgz",
@@ -1355,6 +1514,517 @@
}
}
},
+ "node_modules/@radix-ui/react-menu": {
+ "version": "2.1.12",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.1.12.tgz",
+ "integrity": "sha512-+qYq6LfbiGo97Zz9fioX83HCiIYYFNs8zAsVCMQrIakoNYylIzWuoD/anAD3UzvvR6cnswmfRFJFq/zYYq/k7Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/react-collection": "1.1.4",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-dismissable-layer": "1.1.7",
+ "@radix-ui/react-focus-guards": "1.1.2",
+ "@radix-ui/react-focus-scope": "1.1.4",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-popper": "1.2.4",
+ "@radix-ui/react-portal": "1.1.6",
+ "@radix-ui/react-presence": "1.1.4",
+ "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-roving-focus": "1.1.7",
+ "@radix-ui/react-slot": "1.2.0",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "aria-hidden": "^1.2.4",
+ "react-remove-scroll": "^2.6.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/primitive": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.2.tgz",
+ "integrity": "sha512-XnbHrrprsNqZKQhStrSwgRUQzoCI1glLzdw79xiZPoofhGICeZRSQ3dIxAKH1gb3OHfNf4d6f+vAv3kil2eggA==",
+ "license": "MIT"
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-arrow": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.4.tgz",
+ "integrity": "sha512-qz+fxrqgNxG0dYew5l7qR3c7wdgRu1XVUHGnGYX7rg5HM4p9SWaRmJwfgR3J0SgyUKayLmzQIun+N6rWRgiRKw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-collection": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.4.tgz",
+ "integrity": "sha512-cv4vSf7HttqXilDnAnvINd53OTl1/bjUYVZrkFnA7nwmY9Ob2POUy0WY0sfqBAe1s5FyKsyceQlqiEGPYNTadg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-slot": "1.2.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-compose-refs": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz",
+ "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-context": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.2.tgz",
+ "integrity": "sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-direction": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.1.tgz",
+ "integrity": "sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-dismissable-layer": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.7.tgz",
+ "integrity": "sha512-j5+WBUdhccJsmH5/H0K6RncjDtoALSEr6jbkaZu+bjw6hOPOhHycr6vEUujl+HBK8kjUfWcoCJXxP6e4lUlMZw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-escape-keydown": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-focus-guards": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.2.tgz",
+ "integrity": "sha512-fyjAACV62oPV925xFCrH8DR5xWhg9KYtJT4s3u54jxp+L/hbpTY2kIeEFFbFe+a/HCE94zGQMZLIpVTPVZDhaA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-focus-scope": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.4.tgz",
+ "integrity": "sha512-r2annK27lIW5w9Ho5NyQgqs0MmgZSTIKXWpVCJaLC1q2kZrZkcqnmHkCHMEmv8XLvsLlurKMPT+kbKkRkm/xVA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-use-callback-ref": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-id": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.1.tgz",
+ "integrity": "sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.4.tgz",
+ "integrity": "sha512-3p2Rgm/a1cK0r/UVkx5F/K9v/EplfjAeIFCGOPYPO4lZ0jtg4iSQXt/YGTSLWaf4x7NG6Z4+uKFcylcTZjeqDA==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/react-dom": "^2.0.0",
+ "@radix-ui/react-arrow": "1.1.4",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-layout-effect": "1.1.1",
+ "@radix-ui/react-use-rect": "1.1.1",
+ "@radix-ui/react-use-size": "1.1.1",
+ "@radix-ui/rect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-portal": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.6.tgz",
+ "integrity": "sha512-XmsIl2z1n/TsYFLIdYam2rmFwf9OC/Sh2avkbmVMDuBZIe7hSpM0cYnWPAo7nHOVx8zTuwDZGByfcqLdnzp3Vw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-presence": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.4.tgz",
+ "integrity": "sha512-ueDqRbdc4/bkaQT3GIpLQssRlFgWaL/U2z/S31qRwwLWoxHLgry3SIfCwhxeQNbirEUXFa+lq3RL3oBYXtcmIA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-primitive": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.0.tgz",
+ "integrity": "sha512-/J/FhLdK0zVcILOwt5g+dH4KnkonCtkVJsa2G6JmvbbtZfBEI1gMsO3QMjseL4F/SwfAMt1Vc/0XKYKq+xJ1sw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-slot": "1.2.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-roving-focus": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.7.tgz",
+ "integrity": "sha512-C6oAg451/fQT3EGbWHbCQjYTtbyjNO1uzQgMzwyivcHT3GKNEmu1q3UuREhN+HzHAVtv3ivMVK08QlC+PkYw9Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/react-collection": "1.1.4",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-controllable-state": "1.2.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.0.tgz",
+ "integrity": "sha512-ujc+V6r0HNDviYqIK3rW4ffgYiZ8g5DEHrGJVk4x7kTlLXRDILnKX9vAUYeIsLOoDpDJ0ujpqMkjH4w2ofuo6w==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-callback-ref": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.1.tgz",
+ "integrity": "sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-controllable-state": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.2.tgz",
+ "integrity": "sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-effect-event": "0.0.2",
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-escape-keydown": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.1.tgz",
+ "integrity": "sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-callback-ref": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz",
+ "integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-rect": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.1.tgz",
+ "integrity": "sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/rect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-size": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.1.tgz",
+ "integrity": "sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/rect": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.1.tgz",
+ "integrity": "sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==",
+ "license": "MIT"
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/react-remove-scroll": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz",
+ "integrity": "sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ==",
+ "license": "MIT",
+ "dependencies": {
+ "react-remove-scroll-bar": "^2.3.7",
+ "react-style-singleton": "^2.2.3",
+ "tslib": "^2.1.0",
+ "use-callback-ref": "^1.3.3",
+ "use-sidecar": "^1.1.3"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-popper": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.1.tgz",
@@ -1670,6 +2340,39 @@
}
}
},
+ "node_modules/@radix-ui/react-use-effect-event": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz",
+ "integrity": "sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-effect-event/node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz",
+ "integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-use-escape-keydown": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz",
diff --git a/challenge-3-frontend/package.json b/challenge-3-frontend/package.json
index f4b780e..3594373 100644
--- a/challenge-3-frontend/package.json
+++ b/challenge-3-frontend/package.json
@@ -11,6 +11,7 @@
"dependencies": {
"@hookform/resolvers": "^3.9.1",
"@radix-ui/react-dialog": "^1.1.3",
+ "@radix-ui/react-dropdown-menu": "^2.1.12",
"@radix-ui/react-label": "^2.1.1",
"@radix-ui/react-select": "^2.1.4",
"@radix-ui/react-separator": "^1.1.1",