From c8c7d1e78f18034a6310460763347a43ac34c1dd Mon Sep 17 00:00:00 2001 From: yawn <69970183+yawn-c111@users.noreply.github.com> Date: Mon, 2 Dec 2024 19:55:00 +0900 Subject: [PATCH 1/4] add: Container for Layout --- pkgs/frontend/app/components/Header.tsx | 3 + pkgs/frontend/app/root.tsx | 95 +++++++++++++------------ pkgs/frontend/app/routes/_index.tsx | 38 +++++----- 3 files changed, 73 insertions(+), 63 deletions(-) create mode 100644 pkgs/frontend/app/components/Header.tsx diff --git a/pkgs/frontend/app/components/Header.tsx b/pkgs/frontend/app/components/Header.tsx new file mode 100644 index 0000000..ed27af8 --- /dev/null +++ b/pkgs/frontend/app/components/Header.tsx @@ -0,0 +1,3 @@ +export const Header = () => { + return
Header
; +}; diff --git a/pkgs/frontend/app/root.tsx b/pkgs/frontend/app/root.tsx index 4f78fe7..189e165 100644 --- a/pkgs/frontend/app/root.tsx +++ b/pkgs/frontend/app/root.tsx @@ -1,59 +1,66 @@ import { withEmotionCache } from "@emotion/react"; import { - Links, - Meta, - Outlet, - Scripts, - ScrollRestoration, + Links, + Meta, + Outlet, + Scripts, + ScrollRestoration, } from "@remix-run/react"; -import { ThemeProvider } from "next-themes"; +// import { ThemeProvider } from "next-themes"; // DarkMode 切り替えの実装の可能性に備え、ThemeProvider を残しておいてあります import { ChakraProvider } from "./components/chakra-provider"; import { useInjectStyles } from "./emotion/emotion-client"; import { PrivyProvider } from "@privy-io/react-auth"; - +import { Box, Container } from "@chakra-ui/react"; +import { Header } from "./components/Header"; interface LayoutProps extends React.PropsWithChildren {} export const Layout = withEmotionCache((props: LayoutProps, cache) => { - const { children } = props; + const { children } = props; - useInjectStyles(cache); + useInjectStyles(cache); - return ( - - - - - - - - - - {children} - - - - - ); + return ( + + + + + + + + + + + +
+ {children} + + + + + + + ); }); export default function App() { - return ( - - - - - - - - ); + return ( + + + {/* DarkMode 切り替えの実装の可能性に備え、ThemeProvider を残しておいてあります */} + {/* */} + + {/* */} + + + ); } diff --git a/pkgs/frontend/app/routes/_index.tsx b/pkgs/frontend/app/routes/_index.tsx index cdcf4ba..bee43b9 100644 --- a/pkgs/frontend/app/routes/_index.tsx +++ b/pkgs/frontend/app/routes/_index.tsx @@ -11,26 +11,26 @@ export const meta: MetaFunction = () => { }; export default function Index() { - const { bigbang, isLoading } = useBigBang(); + const { bigbang, isLoading } = useBigBang(); - const handleBigBang = async () => { - const res = await bigbang({ - owner: "0xdCb93093424447bF4FE9Df869750950922F1E30B", - topHatDetails: "Top Hat Details", - topHatImageURI: "https://example.com/top-hat.png", - hatterHatDetails: "Hatter Hat Details", - hatterHatImageURI: "https://example.com/hatter-hat.png", - trustedForwarder: "0x1234567890123456789012345678901234567890", - }); + const handleBigBang = async () => { + const res = await bigbang({ + owner: "0xdCb93093424447bF4FE9Df869750950922F1E30B", + topHatDetails: "Top Hat Details", + topHatImageURI: "https://example.com/top-hat.png", + hatterHatDetails: "Hatter Hat Details", + hatterHatImageURI: "https://example.com/hatter-hat.png", + trustedForwarder: "0x1234567890123456789012345678901234567890", + }); - console.log(res); - }; + console.log(res); + }; - return ( - - - BigBang - - - ); + return ( + + + BigBang + + + ); } From e9ca1d96b258ae2f048a4396600bcf28960ec8d6 Mon Sep 17 00:00:00 2001 From: yawn <69970183+yawn-c111@users.noreply.github.com> Date: Tue, 3 Dec 2024 02:03:25 +0900 Subject: [PATCH 2/4] add: Header --- pkgs/frontend/app/components/CommonIcon.tsx | 45 +++++++++ pkgs/frontend/app/components/Header.tsx | 95 ++++++++++++++++++- pkgs/frontend/app/components/UserIcon.tsx | 21 ++++ .../frontend/app/components/WorkspaceIcon.tsx | 28 ++++++ pkgs/frontend/app/root.tsx | 2 +- pkgs/frontend/app/routes/_index.tsx | 2 +- 6 files changed, 190 insertions(+), 3 deletions(-) create mode 100644 pkgs/frontend/app/components/CommonIcon.tsx create mode 100644 pkgs/frontend/app/components/UserIcon.tsx create mode 100644 pkgs/frontend/app/components/WorkspaceIcon.tsx diff --git a/pkgs/frontend/app/components/CommonIcon.tsx b/pkgs/frontend/app/components/CommonIcon.tsx new file mode 100644 index 0000000..2a94a5c --- /dev/null +++ b/pkgs/frontend/app/components/CommonIcon.tsx @@ -0,0 +1,45 @@ +import { useState, useEffect, ReactNode } from "react"; +import { Box, Image } from "@chakra-ui/react"; + +interface CommonIconProps { + imageUrl: string | undefined; + size: number; + fallbackIconComponent?: ReactNode; +} + +export const CommonIcon = ({ + size, + imageUrl, + fallbackIconComponent, +}: CommonIconProps) => { + const [showFallbackIcon, setShowFallbackIcon] = useState(!imageUrl); + + useEffect(() => { + setShowFallbackIcon(!imageUrl); + }, [imageUrl]); + + return ( + + {!showFallbackIcon ? ( + setShowFallbackIcon(true)} + /> + ) : ( + fallbackIconComponent || null + )} + + ); +}; diff --git a/pkgs/frontend/app/components/Header.tsx b/pkgs/frontend/app/components/Header.tsx index ed27af8..f3f3314 100644 --- a/pkgs/frontend/app/components/Header.tsx +++ b/pkgs/frontend/app/components/Header.tsx @@ -1,3 +1,96 @@ +import { useState, useEffect } from "react"; +import { Box, Text } from "@chakra-ui/react"; +import { WorkspaceIcon } from "./WorkspaceIcon"; +import { UserIcon } from "./UserIcon"; +import { useLocation } from "@remix-run/react"; + +const NO_HEADER_PATHS: string[] = ["/login"]; // 適宜ヘッダーが不要なページのパスを追加 +const HEADER_SIZE: number = 12; // 偶数のnumberだとアイコンが対応しているため望ましい + +const headerTextStyle = { + my: "auto", + wordBreak: "break-word", + flex: "1", +}; + +enum HeaderType { + NonHeader = "NonHeader", + UserIconOnly = "UserIconOnly", + WorkspaceAndUserIcons = "WorkspaceAndUserIcons", +} + export const Header = () => { - return
Header
; + const [headerType, setHeaderType] = useState( + HeaderType.NonHeader + ); + + const { pathname } = useLocation(); + + // ToDo: ページのパスや hooks で柔軟にロジックを実装する(切り替えてテストできます) + const isWalletConnected = true; + const isUserTobanEnsFound = true; + const isWorkspaceSelected = true; + + // ToDo: ユーザーやワークスペースごとの各種データを取得するロジックを実装する + const userImageUrl: string | undefined = undefined; + const workspaceName: string | undefined = "Workspace Name"; + const workspaceImageUrl: string | undefined = undefined; + + useEffect(() => { + const determineHeaderType = () => { + if ( + !NO_HEADER_PATHS.includes(pathname) && + isWalletConnected && + isUserTobanEnsFound + ) { + return isWorkspaceSelected && workspaceName + ? HeaderType.WorkspaceAndUserIcons + : HeaderType.UserIconOnly; + } + return HeaderType.NonHeader; + }; + + setHeaderType(determineHeaderType()); + }, [ + pathname, + isWalletConnected, + isUserTobanEnsFound, + isWorkspaceSelected, + workspaceName, + ]); + + return ( + + {headerType !== HeaderType.NonHeader && ( + <> + + {headerType === HeaderType.UserIconOnly && ( + + Workspaces + + )} + {headerType === HeaderType.WorkspaceAndUserIcons && ( + <> + + + {workspaceName} + + + )} + + + + )} + + ); }; diff --git a/pkgs/frontend/app/components/UserIcon.tsx b/pkgs/frontend/app/components/UserIcon.tsx new file mode 100644 index 0000000..01aa3b9 --- /dev/null +++ b/pkgs/frontend/app/components/UserIcon.tsx @@ -0,0 +1,21 @@ +import { FaCircleUser } from "react-icons/fa6"; +import { CommonIcon } from "./CommonIcon"; + +interface UserIconProps { + userImageUrl: string | undefined; + size: number; +} + +export const UserIcon = ({ userImageUrl, size }: UserIconProps) => { + return ( + + } + /> + ); +}; diff --git a/pkgs/frontend/app/components/WorkspaceIcon.tsx b/pkgs/frontend/app/components/WorkspaceIcon.tsx new file mode 100644 index 0000000..7ac9db2 --- /dev/null +++ b/pkgs/frontend/app/components/WorkspaceIcon.tsx @@ -0,0 +1,28 @@ +import { FaPeopleGroup } from "react-icons/fa6"; +import { CommonIcon } from "./CommonIcon"; + +interface WorkspaceIconProps { + workspaceImageUrl?: string; + size: number; +} + +export const WorkspaceIcon = ({ + workspaceImageUrl, + size, +}: WorkspaceIconProps) => { + return ( + + } + /> + ); +}; diff --git a/pkgs/frontend/app/root.tsx b/pkgs/frontend/app/root.tsx index 189e165..10f4b9b 100644 --- a/pkgs/frontend/app/root.tsx +++ b/pkgs/frontend/app/root.tsx @@ -33,7 +33,7 @@ export const Layout = withEmotionCache((props: LayoutProps, cache) => { - +
{children} diff --git a/pkgs/frontend/app/routes/_index.tsx b/pkgs/frontend/app/routes/_index.tsx index bee43b9..78a1933 100644 --- a/pkgs/frontend/app/routes/_index.tsx +++ b/pkgs/frontend/app/routes/_index.tsx @@ -27,7 +27,7 @@ export default function Index() { }; return ( - + BigBang From 41b7cdcf97de881ddc2fae9575fa7b736247b24f Mon Sep 17 00:00:00 2001 From: yawn <69970183+yawn-c111@users.noreply.github.com> Date: Tue, 3 Dec 2024 02:05:10 +0900 Subject: [PATCH 3/4] refactor: move common components to components/common --- pkgs/frontend/app/components/UserIcon.tsx | 2 +- .../frontend/app/components/WorkspaceIcon.tsx | 2 +- .../components/{ => common}/CommonButton.tsx | 0 .../components/{ => common}/CommonDialog.tsx | 0 .../components/{ => common}/CommonIcon.tsx | 0 .../components/{ => common}/CommonInput.tsx | 0 .../{ => common}/CommonTextarea.tsx | 0 pkgs/frontend/app/routes/_index.tsx | 2 +- pkgs/frontend/app/routes/login.tsx | 50 +++++++++---------- 9 files changed, 28 insertions(+), 28 deletions(-) rename pkgs/frontend/app/components/{ => common}/CommonButton.tsx (100%) rename pkgs/frontend/app/components/{ => common}/CommonDialog.tsx (100%) rename pkgs/frontend/app/components/{ => common}/CommonIcon.tsx (100%) rename pkgs/frontend/app/components/{ => common}/CommonInput.tsx (100%) rename pkgs/frontend/app/components/{ => common}/CommonTextarea.tsx (100%) diff --git a/pkgs/frontend/app/components/UserIcon.tsx b/pkgs/frontend/app/components/UserIcon.tsx index 01aa3b9..d6472a2 100644 --- a/pkgs/frontend/app/components/UserIcon.tsx +++ b/pkgs/frontend/app/components/UserIcon.tsx @@ -1,5 +1,5 @@ import { FaCircleUser } from "react-icons/fa6"; -import { CommonIcon } from "./CommonIcon"; +import { CommonIcon } from "./common/CommonIcon"; interface UserIconProps { userImageUrl: string | undefined; diff --git a/pkgs/frontend/app/components/WorkspaceIcon.tsx b/pkgs/frontend/app/components/WorkspaceIcon.tsx index 7ac9db2..2fa32fa 100644 --- a/pkgs/frontend/app/components/WorkspaceIcon.tsx +++ b/pkgs/frontend/app/components/WorkspaceIcon.tsx @@ -1,5 +1,5 @@ import { FaPeopleGroup } from "react-icons/fa6"; -import { CommonIcon } from "./CommonIcon"; +import { CommonIcon } from "./common/CommonIcon"; interface WorkspaceIconProps { workspaceImageUrl?: string; diff --git a/pkgs/frontend/app/components/CommonButton.tsx b/pkgs/frontend/app/components/common/CommonButton.tsx similarity index 100% rename from pkgs/frontend/app/components/CommonButton.tsx rename to pkgs/frontend/app/components/common/CommonButton.tsx diff --git a/pkgs/frontend/app/components/CommonDialog.tsx b/pkgs/frontend/app/components/common/CommonDialog.tsx similarity index 100% rename from pkgs/frontend/app/components/CommonDialog.tsx rename to pkgs/frontend/app/components/common/CommonDialog.tsx diff --git a/pkgs/frontend/app/components/CommonIcon.tsx b/pkgs/frontend/app/components/common/CommonIcon.tsx similarity index 100% rename from pkgs/frontend/app/components/CommonIcon.tsx rename to pkgs/frontend/app/components/common/CommonIcon.tsx diff --git a/pkgs/frontend/app/components/CommonInput.tsx b/pkgs/frontend/app/components/common/CommonInput.tsx similarity index 100% rename from pkgs/frontend/app/components/CommonInput.tsx rename to pkgs/frontend/app/components/common/CommonInput.tsx diff --git a/pkgs/frontend/app/components/CommonTextarea.tsx b/pkgs/frontend/app/components/common/CommonTextarea.tsx similarity index 100% rename from pkgs/frontend/app/components/CommonTextarea.tsx rename to pkgs/frontend/app/components/common/CommonTextarea.tsx diff --git a/pkgs/frontend/app/routes/_index.tsx b/pkgs/frontend/app/routes/_index.tsx index 78a1933..1bf028f 100644 --- a/pkgs/frontend/app/routes/_index.tsx +++ b/pkgs/frontend/app/routes/_index.tsx @@ -1,6 +1,6 @@ import { Box } from "@chakra-ui/react"; import type { MetaFunction } from "@remix-run/node"; -import { CommonButton } from "~/components/CommonButton"; +import { CommonButton } from "~/components/common/CommonButton"; import { useBigBang } from "hooks/useBigBang"; export const meta: MetaFunction = () => { diff --git a/pkgs/frontend/app/routes/login.tsx b/pkgs/frontend/app/routes/login.tsx index 92bc6d1..65ec864 100644 --- a/pkgs/frontend/app/routes/login.tsx +++ b/pkgs/frontend/app/routes/login.tsx @@ -1,35 +1,35 @@ import { usePrivy, useWallets } from "@privy-io/react-auth"; import { FC, useCallback } from "react"; -import CommonButton from "~/components/CommonButton"; +import CommonButton from "~/components/common/CommonButton"; const Login: FC = () => { - const { connectOrCreateWallet, user, logout } = usePrivy(); - const { wallets } = useWallets(); + const { connectOrCreateWallet, user, logout } = usePrivy(); + const { wallets } = useWallets(); - const disconnectWallets = useCallback(async () => { - await Promise.all(wallets.map((wallet) => wallet.disconnect())); - }, [wallets]); + const disconnectWallets = useCallback(async () => { + await Promise.all(wallets.map((wallet) => wallet.disconnect())); + }, [wallets]); - return ( - <> - - login - + return ( + <> + + login + - {wallets.length > 0 && ( - - disconnect - - )} - {user ? ( - - logout - - ) : ( - <> - )} - - ); + {wallets.length > 0 && ( + + disconnect + + )} + {user ? ( + + logout + + ) : ( + <> + )} + + ); }; export default Login; From 3922fd61cd5f5dfbd40ad9f44f67f0b2021f0d19 Mon Sep 17 00:00:00 2001 From: yawn <69970183+yawn-c111@users.noreply.github.com> Date: Tue, 3 Dec 2024 02:05:37 +0900 Subject: [PATCH 4/4] prettier --- pkgs/frontend/abi/bigbang.ts | 452 ++-- pkgs/frontend/abi/fractiontoken.ts | 1264 +++++------ pkgs/frontend/abi/hats.ts | 1844 ++++++++--------- pkgs/frontend/abi/hatsTimeFrameModule.ts | 430 ++-- .../app/components/common/CommonDialog.tsx | 26 +- .../app/components/common/CommonInput.tsx | 6 +- .../app/components/common/CommonTextarea.tsx | 6 +- 7 files changed, 2014 insertions(+), 2014 deletions(-) diff --git a/pkgs/frontend/abi/bigbang.ts b/pkgs/frontend/abi/bigbang.ts index 8db4a89..96fde08 100644 --- a/pkgs/frontend/abi/bigbang.ts +++ b/pkgs/frontend/abi/bigbang.ts @@ -1,228 +1,228 @@ export const BIGBANG_ABI = [ - { - inputs: [ - { - internalType: "address", - name: "_trustedForwarder", - type: "address", - }, - { - internalType: "address", - name: "_hatsAddress", - type: "address", - }, - { - internalType: "address", - name: "_hatsModuleFactory", - type: "address", - }, - { - internalType: "address", - name: "_hatsTimeFrameModule_IMPL", - type: "address", - }, - { - internalType: "address", - name: "_splitsCreatorFactory", - type: "address", - }, - { - internalType: "address", - name: "_splitFactoryV2", - type: "address", - }, - { - internalType: "address", - name: "_fractionToken", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "topHatId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "hatsTimeFrameModule", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "splitCreator", - type: "address", - }, - ], - name: "Executed", - type: "event", - }, - { - inputs: [], - name: "Hats", - outputs: [ - { - internalType: "contract IHats", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "HatsModuleFactory", - outputs: [ - { - internalType: "contract IHatsModuleFactory", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "HatsTimeFrameModule_IMPL", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "SplitsCreatorFactory", - outputs: [ - { - internalType: "contract ISplitsCreatorFactory", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_owner", - type: "address", - }, - { - internalType: "string", - name: "_topHatDetails", - type: "string", - }, - { - internalType: "string", - name: "_topHatImageURI", - type: "string", - }, - { - internalType: "string", - name: "_hatterHatDetails", - type: "string", - }, - { - internalType: "string", - name: "_hatterHatImageURI", - type: "string", - }, - { - internalType: "address", - name: "_trustedForwarder", - type: "address", - }, - ], - name: "bigbang", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "fractionToken", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "forwarder", - type: "address", - }, - ], - name: "isTrustedForwarder", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "splitFactoryV2", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "trustedForwarder", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, + { + inputs: [ + { + internalType: "address", + name: "_trustedForwarder", + type: "address", + }, + { + internalType: "address", + name: "_hatsAddress", + type: "address", + }, + { + internalType: "address", + name: "_hatsModuleFactory", + type: "address", + }, + { + internalType: "address", + name: "_hatsTimeFrameModule_IMPL", + type: "address", + }, + { + internalType: "address", + name: "_splitsCreatorFactory", + type: "address", + }, + { + internalType: "address", + name: "_splitFactoryV2", + type: "address", + }, + { + internalType: "address", + name: "_fractionToken", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "topHatId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "hatsTimeFrameModule", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "splitCreator", + type: "address", + }, + ], + name: "Executed", + type: "event", + }, + { + inputs: [], + name: "Hats", + outputs: [ + { + internalType: "contract IHats", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "HatsModuleFactory", + outputs: [ + { + internalType: "contract IHatsModuleFactory", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "HatsTimeFrameModule_IMPL", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "SplitsCreatorFactory", + outputs: [ + { + internalType: "contract ISplitsCreatorFactory", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + { + internalType: "string", + name: "_topHatDetails", + type: "string", + }, + { + internalType: "string", + name: "_topHatImageURI", + type: "string", + }, + { + internalType: "string", + name: "_hatterHatDetails", + type: "string", + }, + { + internalType: "string", + name: "_hatterHatImageURI", + type: "string", + }, + { + internalType: "address", + name: "_trustedForwarder", + type: "address", + }, + ], + name: "bigbang", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "fractionToken", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "forwarder", + type: "address", + }, + ], + name: "isTrustedForwarder", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "splitFactoryV2", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "trustedForwarder", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, ] as const; diff --git a/pkgs/frontend/abi/fractiontoken.ts b/pkgs/frontend/abi/fractiontoken.ts index a88416f..c404c86 100644 --- a/pkgs/frontend/abi/fractiontoken.ts +++ b/pkgs/frontend/abi/fractiontoken.ts @@ -1,634 +1,634 @@ export const FRACTION_TOKEN_ABI = [ - { - inputs: [ - { - internalType: "string", - name: "_uri", - type: "string", - }, - { - internalType: "uint256", - name: "_tokenSupply", - type: "uint256", - }, - { - internalType: "address", - name: "_hatsAddress", - type: "address", - }, - { - internalType: "address", - name: "_trustedForwarderAddress", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "uint256", - name: "balance", - type: "uint256", - }, - { - internalType: "uint256", - name: "needed", - type: "uint256", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "ERC1155InsufficientBalance", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "approver", - type: "address", - }, - ], - name: "ERC1155InvalidApprover", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "idsLength", - type: "uint256", - }, - { - internalType: "uint256", - name: "valuesLength", - type: "uint256", - }, - ], - name: "ERC1155InvalidArrayLength", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "operator", - type: "address", - }, - ], - name: "ERC1155InvalidOperator", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "receiver", - type: "address", - }, - ], - name: "ERC1155InvalidReceiver", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - ], - name: "ERC1155InvalidSender", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "operator", - type: "address", - }, - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "ERC1155MissingApprovalForAll", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "operator", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "approved", - type: "bool", - }, - ], - name: "ApprovalForAll", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "operator", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256[]", - name: "ids", - type: "uint256[]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "values", - type: "uint256[]", - }, - ], - name: "TransferBatch", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "operator", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "id", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "TransferSingle", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "string", - name: "value", - type: "string", - }, - { - indexed: true, - internalType: "uint256", - name: "id", - type: "uint256", - }, - ], - name: "URI", - type: "event", - }, - { - inputs: [], - name: "TOKEN_SUPPLY", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "address", - name: "wearer", - type: "address", - }, - { - internalType: "uint256", - name: "hatId", - type: "uint256", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "accounts", - type: "address[]", - }, - { - internalType: "address[]", - name: "wearers", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "hatIds", - type: "uint256[]", - }, - ], - name: "balanceOfBatch", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "accounts", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "ids", - type: "uint256[]", - }, - ], - name: "balanceOfBatch", - outputs: [ - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "wearer", - type: "address", - }, - { - internalType: "uint256", - name: "hatId", - type: "uint256", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "burn", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "hatId", - type: "uint256", - }, - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "getTokenId", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "getTokenRecipients", - outputs: [ - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "address", - name: "operator", - type: "address", - }, - ], - name: "isApprovedForAll", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "forwarder", - type: "address", - }, - ], - name: "isTrustedForwarder", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "hatId", - type: "uint256", - }, - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "mint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256[]", - name: "tokenIds", - type: "uint256[]", - }, - { - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "safeBatchTransferFrom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "operator", - type: "address", - }, - { - internalType: "bool", - name: "approved", - type: "bool", - }, - ], - name: "setApprovalForAll", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "trustedForwarder", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "uri", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, + { + inputs: [ + { + internalType: "string", + name: "_uri", + type: "string", + }, + { + internalType: "uint256", + name: "_tokenSupply", + type: "uint256", + }, + { + internalType: "address", + name: "_hatsAddress", + type: "address", + }, + { + internalType: "address", + name: "_trustedForwarderAddress", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + { + internalType: "uint256", + name: "needed", + type: "uint256", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "ERC1155InsufficientBalance", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "approver", + type: "address", + }, + ], + name: "ERC1155InvalidApprover", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "idsLength", + type: "uint256", + }, + { + internalType: "uint256", + name: "valuesLength", + type: "uint256", + }, + ], + name: "ERC1155InvalidArrayLength", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "ERC1155InvalidOperator", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + ], + name: "ERC1155InvalidReceiver", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "ERC1155InvalidSender", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "ERC1155MissingApprovalForAll", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "ApprovalForAll", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256[]", + name: "ids", + type: "uint256[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + ], + name: "TransferBatch", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "TransferSingle", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "string", + name: "value", + type: "string", + }, + { + indexed: true, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "URI", + type: "event", + }, + { + inputs: [], + name: "TOKEN_SUPPLY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "wearer", + type: "address", + }, + { + internalType: "uint256", + name: "hatId", + type: "uint256", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "accounts", + type: "address[]", + }, + { + internalType: "address[]", + name: "wearers", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "hatIds", + type: "uint256[]", + }, + ], + name: "balanceOfBatch", + outputs: [ + { + internalType: "uint256[]", + name: "", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "accounts", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "ids", + type: "uint256[]", + }, + ], + name: "balanceOfBatch", + outputs: [ + { + internalType: "uint256[]", + name: "", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "wearer", + type: "address", + }, + { + internalType: "uint256", + name: "hatId", + type: "uint256", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "burn", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "hatId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "getTokenId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "getTokenRecipients", + outputs: [ + { + internalType: "address[]", + name: "", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "isApprovedForAll", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "forwarder", + type: "address", + }, + ], + name: "isTrustedForwarder", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "hatId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256[]", + name: "tokenIds", + type: "uint256[]", + }, + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "safeBatchTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "setApprovalForAll", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "trustedForwarder", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "uri", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, ] as const; diff --git a/pkgs/frontend/abi/hats.ts b/pkgs/frontend/abi/hats.ts index f7faf1a..37fd1d7 100644 --- a/pkgs/frontend/abi/hats.ts +++ b/pkgs/frontend/abi/hats.ts @@ -1,924 +1,924 @@ export const HATS_ABI = [ - { - inputs: [ - { internalType: "string", name: "_name", type: "string" }, - { internalType: "string", name: "_baseImageURI", type: "string" }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [{ internalType: "uint256", name: "hatId", type: "uint256" }], - name: "AllHatsWorn", - type: "error", - }, - { - inputs: [ - { internalType: "address", name: "wearer", type: "address" }, - { internalType: "uint256", name: "hatId", type: "uint256" }, - ], - name: "AlreadyWearingHat", - type: "error", - }, - { inputs: [], name: "BatchArrayLengthMismatch", type: "error" }, - { inputs: [], name: "CircularLinkage", type: "error" }, - { inputs: [], name: "CrossTreeLinkage", type: "error" }, - { - inputs: [{ internalType: "uint256", name: "hatId", type: "uint256" }], - name: "HatDoesNotExist", - type: "error", - }, - { inputs: [], name: "HatNotActive", type: "error" }, - { inputs: [], name: "Immutable", type: "error" }, - { inputs: [], name: "InvalidHatId", type: "error" }, - { inputs: [], name: "InvalidUnlink", type: "error" }, - { inputs: [], name: "LinkageNotRequested", type: "error" }, - { inputs: [], name: "MaxLevelsReached", type: "error" }, - { inputs: [], name: "MaxLevelsReached", type: "error" }, - { inputs: [], name: "NewMaxSupplyTooLow", type: "error" }, - { - inputs: [ - { internalType: "address", name: "user", type: "address" }, - { internalType: "uint256", name: "hatId", type: "uint256" }, - ], - name: "NotAdmin", - type: "error", - }, - { inputs: [], name: "NotAdminOrWearer", type: "error" }, - { inputs: [], name: "NotEligible", type: "error" }, - { inputs: [], name: "NotHatWearer", type: "error" }, - { inputs: [], name: "NotHatsEligibility", type: "error" }, - { inputs: [], name: "NotHatsToggle", type: "error" }, - { inputs: [], name: "StringTooLong", type: "error" }, - { inputs: [], name: "ZeroAddress", type: "error" }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "operator", - type: "address", - }, - { indexed: false, internalType: "bool", name: "approved", type: "bool" }, - ], - name: "ApprovalForAll", - type: "event", - }, - { - anonymous: false, - inputs: [ - { indexed: false, internalType: "uint256", name: "id", type: "uint256" }, - { - indexed: false, - internalType: "string", - name: "details", - type: "string", - }, - { - indexed: false, - internalType: "uint32", - name: "maxSupply", - type: "uint32", - }, - { - indexed: false, - internalType: "address", - name: "eligibility", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "toggle", - type: "address", - }, - { indexed: false, internalType: "bool", name: "mutable_", type: "bool" }, - { - indexed: false, - internalType: "string", - name: "imageURI", - type: "string", - }, - ], - name: "HatCreated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "hatId", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "newDetails", - type: "string", - }, - ], - name: "HatDetailsChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "hatId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "newEligibility", - type: "address", - }, - ], - name: "HatEligibilityChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "hatId", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "newImageURI", - type: "string", - }, - ], - name: "HatImageURIChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "hatId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint32", - name: "newMaxSupply", - type: "uint32", - }, - ], - name: "HatMaxSupplyChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "hatId", - type: "uint256", - }, - ], - name: "HatMutabilityChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "hatId", - type: "uint256", - }, - { indexed: false, internalType: "bool", name: "newStatus", type: "bool" }, - ], - name: "HatStatusChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "hatId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "newToggle", - type: "address", - }, - ], - name: "HatToggleChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint32", - name: "domain", - type: "uint32", - }, - { - indexed: false, - internalType: "uint256", - name: "newAdmin", - type: "uint256", - }, - ], - name: "TopHatLinkRequested", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint32", - name: "domain", - type: "uint32", - }, - { - indexed: false, - internalType: "uint256", - name: "newAdmin", - type: "uint256", - }, - ], - name: "TopHatLinked", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "operator", - type: "address", - }, - { indexed: true, internalType: "address", name: "from", type: "address" }, - { indexed: true, internalType: "address", name: "to", type: "address" }, - { - indexed: false, - internalType: "uint256[]", - name: "ids", - type: "uint256[]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - ], - name: "TransferBatch", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "operator", - type: "address", - }, - { indexed: true, internalType: "address", name: "from", type: "address" }, - { indexed: true, internalType: "address", name: "to", type: "address" }, - { indexed: false, internalType: "uint256", name: "id", type: "uint256" }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "TransferSingle", - type: "event", - }, - { - anonymous: false, - inputs: [ - { indexed: false, internalType: "string", name: "value", type: "string" }, - { indexed: true, internalType: "uint256", name: "id", type: "uint256" }, - ], - name: "URI", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "hatId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "wearer", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "wearerStanding", - type: "bool", - }, - ], - name: "WearerStandingChanged", - type: "event", - }, - { - inputs: [ - { internalType: "uint32", name: "_topHatDomain", type: "uint32" }, - { internalType: "uint256", name: "_newAdminHat", type: "uint256" }, - { internalType: "address", name: "_eligibility", type: "address" }, - { internalType: "address", name: "_toggle", type: "address" }, - { internalType: "string", name: "_details", type: "string" }, - { internalType: "string", name: "_imageURI", type: "string" }, - ], - name: "approveLinkTopHatToTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "", type: "uint256" }, - { internalType: "address", name: "", type: "address" }, - ], - name: "badStandings", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "_wearer", type: "address" }, - { internalType: "uint256", name: "_hatId", type: "uint256" }, - ], - name: "balanceOf", - outputs: [{ internalType: "uint256", name: "balance", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address[]", name: "_wearers", type: "address[]" }, - { internalType: "uint256[]", name: "_hatIds", type: "uint256[]" }, - ], - name: "balanceOfBatch", - outputs: [ - { internalType: "uint256[]", name: "balances", type: "uint256[]" }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "baseImageURI", - outputs: [{ internalType: "string", name: "", type: "string" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "uint256[]", name: "_admins", type: "uint256[]" }, - { internalType: "string[]", name: "_details", type: "string[]" }, - { internalType: "uint32[]", name: "_maxSupplies", type: "uint32[]" }, - { - internalType: "address[]", - name: "_eligibilityModules", - type: "address[]", - }, - { internalType: "address[]", name: "_toggleModules", type: "address[]" }, - { internalType: "bool[]", name: "_mutables", type: "bool[]" }, - { internalType: "string[]", name: "_imageURIs", type: "string[]" }, - ], - name: "batchCreateHats", - outputs: [{ internalType: "bool", name: "success", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint256[]", name: "_hatIds", type: "uint256[]" }, - { internalType: "address[]", name: "_wearers", type: "address[]" }, - ], - name: "batchMintHats", - outputs: [{ internalType: "bool", name: "success", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_admin", type: "uint256" }, - { internalType: "uint16", name: "_newHat", type: "uint16" }, - ], - name: "buildHatId", - outputs: [{ internalType: "uint256", name: "id", type: "uint256" }], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_hatId", type: "uint256" }, - { internalType: "string", name: "_newDetails", type: "string" }, - ], - name: "changeHatDetails", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_hatId", type: "uint256" }, - { internalType: "address", name: "_newEligibility", type: "address" }, - ], - name: "changeHatEligibility", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_hatId", type: "uint256" }, - { internalType: "string", name: "_newImageURI", type: "string" }, - ], - name: "changeHatImageURI", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_hatId", type: "uint256" }, - { internalType: "uint32", name: "_newMaxSupply", type: "uint32" }, - ], - name: "changeHatMaxSupply", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_hatId", type: "uint256" }, - { internalType: "address", name: "_newToggle", type: "address" }, - ], - name: "changeHatToggle", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "checkHatStatus", - outputs: [{ internalType: "bool", name: "toggled", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_hatId", type: "uint256" }, - { internalType: "address", name: "_wearer", type: "address" }, - ], - name: "checkHatWearerStatus", - outputs: [{ internalType: "bool", name: "updated", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_admin", type: "uint256" }, - { internalType: "string", name: "_details", type: "string" }, - { internalType: "uint32", name: "_maxSupply", type: "uint32" }, - { internalType: "address", name: "_eligibility", type: "address" }, - { internalType: "address", name: "_toggle", type: "address" }, - { internalType: "bool", name: "_mutable", type: "bool" }, - { internalType: "string", name: "_imageURI", type: "string" }, - ], - name: "createHat", - outputs: [{ internalType: "uint256", name: "newHatId", type: "uint256" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_hatId", type: "uint256" }, - { internalType: "uint32", name: "_level", type: "uint32" }, - ], - name: "getAdminAtLevel", - outputs: [{ internalType: "uint256", name: "admin", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_hatId", type: "uint256" }, - { internalType: "uint32", name: "_level", type: "uint32" }, - ], - name: "getAdminAtLocalLevel", - outputs: [{ internalType: "uint256", name: "admin", type: "uint256" }], - stateMutability: "pure", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "getHatEligibilityModule", - outputs: [ - { internalType: "address", name: "eligibility", type: "address" }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "getHatLevel", - outputs: [{ internalType: "uint32", name: "level", type: "uint32" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "getHatMaxSupply", - outputs: [{ internalType: "uint32", name: "maxSupply", type: "uint32" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "getHatToggleModule", - outputs: [{ internalType: "address", name: "toggle", type: "address" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "getImageURIForHat", - outputs: [{ internalType: "string", name: "_uri", type: "string" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "getLocalHatLevel", - outputs: [{ internalType: "uint32", name: "level", type: "uint32" }], - stateMutability: "pure", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_admin", type: "uint256" }], - name: "getNextId", - outputs: [{ internalType: "uint256", name: "nextId", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint32", name: "_topHatDomain", type: "uint32" }], - name: "getTippyTopHatDomain", - outputs: [{ internalType: "uint32", name: "domain", type: "uint32" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "getTopHatDomain", - outputs: [{ internalType: "uint32", name: "domain", type: "uint32" }], - stateMutability: "pure", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "hatSupply", - outputs: [{ internalType: "uint32", name: "supply", type: "uint32" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "isActive", - outputs: [{ internalType: "bool", name: "active", type: "bool" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "_user", type: "address" }, - { internalType: "uint256", name: "_hatId", type: "uint256" }, - ], - name: "isAdminOfHat", - outputs: [{ internalType: "bool", name: "isAdmin", type: "bool" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "", type: "address" }, - { internalType: "address", name: "", type: "address" }, - ], - name: "isApprovedForAll", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "_wearer", type: "address" }, - { internalType: "uint256", name: "_hatId", type: "uint256" }, - ], - name: "isEligible", - outputs: [{ internalType: "bool", name: "eligible", type: "bool" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "_wearer", type: "address" }, - { internalType: "uint256", name: "_hatId", type: "uint256" }, - ], - name: "isInGoodStanding", - outputs: [{ internalType: "bool", name: "standing", type: "bool" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "isLocalTopHat", - outputs: [{ internalType: "bool", name: "_isLocalTopHat", type: "bool" }], - stateMutability: "pure", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "isTopHat", - outputs: [{ internalType: "bool", name: "_isTopHat", type: "bool" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "isValidHatId", - outputs: [{ internalType: "bool", name: "validHatId", type: "bool" }], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "_user", type: "address" }, - { internalType: "uint256", name: "_hatId", type: "uint256" }, - ], - name: "isWearerOfHat", - outputs: [{ internalType: "bool", name: "isWearer", type: "bool" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "lastTopHatId", - outputs: [{ internalType: "uint32", name: "", type: "uint32" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint32", name: "", type: "uint32" }], - name: "linkedTreeAdmins", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint32", name: "", type: "uint32" }], - name: "linkedTreeRequests", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "makeHatImmutable", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_hatId", type: "uint256" }, - { internalType: "address", name: "_wearer", type: "address" }, - ], - name: "mintHat", - outputs: [{ internalType: "bool", name: "success", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "_target", type: "address" }, - { internalType: "string", name: "_details", type: "string" }, - { internalType: "string", name: "_imageURI", type: "string" }, - ], - name: "mintTopHat", - outputs: [{ internalType: "uint256", name: "topHatId", type: "uint256" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [{ internalType: "bytes[]", name: "data", type: "bytes[]" }], - name: "multicall", - outputs: [{ internalType: "bytes[]", name: "", type: "bytes[]" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [{ internalType: "string", name: "", type: "string" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "uint32", name: "_topHatDomain", type: "uint32" }, - { internalType: "uint256", name: "_linkedAdmin", type: "uint256" }, - ], - name: "noCircularLinkage", - outputs: [{ internalType: "bool", name: "notCircular", type: "bool" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "uint32", name: "_topHatDomain", type: "uint32" }, - { internalType: "uint256", name: "_newAdminHat", type: "uint256" }, - { internalType: "address", name: "_eligibility", type: "address" }, - { internalType: "address", name: "_toggle", type: "address" }, - { internalType: "string", name: "_details", type: "string" }, - { internalType: "string", name: "_imageURI", type: "string" }, - ], - name: "relinkTopHatWithinTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "renounceHat", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint32", name: "_topHatDomain", type: "uint32" }, - { internalType: "uint256", name: "_requestedAdminHat", type: "uint256" }, - ], - name: "requestLinkTopHatToTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "", type: "address" }, - { internalType: "address", name: "", type: "address" }, - { internalType: "uint256[]", name: "", type: "uint256[]" }, - { internalType: "uint256[]", name: "", type: "uint256[]" }, - { internalType: "bytes", name: "", type: "bytes" }, - ], - name: "safeBatchTransferFrom", - outputs: [], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "", type: "address" }, - { internalType: "address", name: "", type: "address" }, - { internalType: "uint256", name: "", type: "uint256" }, - { internalType: "uint256", name: "", type: "uint256" }, - { internalType: "bytes", name: "", type: "bytes" }, - ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { internalType: "uint32", name: "_topHatDomain", type: "uint32" }, - { internalType: "uint256", name: "_newAdminHat", type: "uint256" }, - ], - name: "sameTippyTopHatDomain", - outputs: [{ internalType: "bool", name: "sameDomain", type: "bool" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "", type: "address" }, - { internalType: "bool", name: "", type: "bool" }, - ], - name: "setApprovalForAll", - outputs: [], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_hatId", type: "uint256" }, - { internalType: "bool", name: "_newStatus", type: "bool" }, - ], - name: "setHatStatus", - outputs: [{ internalType: "bool", name: "toggled", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_hatId", type: "uint256" }, - { internalType: "address", name: "_wearer", type: "address" }, - { internalType: "bool", name: "_eligible", type: "bool" }, - { internalType: "bool", name: "_standing", type: "bool" }, - ], - name: "setHatWearerStatus", - outputs: [{ internalType: "bool", name: "updated", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }], - name: "supportsInterface", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_hatId", type: "uint256" }, - { internalType: "address", name: "_from", type: "address" }, - { internalType: "address", name: "_to", type: "address" }, - ], - name: "transferHat", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint32", name: "_topHatDomain", type: "uint32" }, - { internalType: "address", name: "_wearer", type: "address" }, - ], - name: "unlinkTopHatFromTree", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "id", type: "uint256" }], - name: "uri", - outputs: [{ internalType: "string", name: "_uri", type: "string" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], - name: "viewHat", - outputs: [ - { internalType: "string", name: "details", type: "string" }, - { internalType: "uint32", name: "maxSupply", type: "uint32" }, - { internalType: "uint32", name: "supply", type: "uint32" }, - { internalType: "address", name: "eligibility", type: "address" }, - { internalType: "address", name: "toggle", type: "address" }, - { internalType: "string", name: "imageURI", type: "string" }, - { internalType: "uint16", name: "lastHatId", type: "uint16" }, - { internalType: "bool", name: "mutable_", type: "bool" }, - { internalType: "bool", name: "active", type: "bool" }, - ], - stateMutability: "view", - type: "function", - }, + { + inputs: [ + { internalType: "string", name: "_name", type: "string" }, + { internalType: "string", name: "_baseImageURI", type: "string" }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [{ internalType: "uint256", name: "hatId", type: "uint256" }], + name: "AllHatsWorn", + type: "error", + }, + { + inputs: [ + { internalType: "address", name: "wearer", type: "address" }, + { internalType: "uint256", name: "hatId", type: "uint256" }, + ], + name: "AlreadyWearingHat", + type: "error", + }, + { inputs: [], name: "BatchArrayLengthMismatch", type: "error" }, + { inputs: [], name: "CircularLinkage", type: "error" }, + { inputs: [], name: "CrossTreeLinkage", type: "error" }, + { + inputs: [{ internalType: "uint256", name: "hatId", type: "uint256" }], + name: "HatDoesNotExist", + type: "error", + }, + { inputs: [], name: "HatNotActive", type: "error" }, + { inputs: [], name: "Immutable", type: "error" }, + { inputs: [], name: "InvalidHatId", type: "error" }, + { inputs: [], name: "InvalidUnlink", type: "error" }, + { inputs: [], name: "LinkageNotRequested", type: "error" }, + { inputs: [], name: "MaxLevelsReached", type: "error" }, + { inputs: [], name: "MaxLevelsReached", type: "error" }, + { inputs: [], name: "NewMaxSupplyTooLow", type: "error" }, + { + inputs: [ + { internalType: "address", name: "user", type: "address" }, + { internalType: "uint256", name: "hatId", type: "uint256" }, + ], + name: "NotAdmin", + type: "error", + }, + { inputs: [], name: "NotAdminOrWearer", type: "error" }, + { inputs: [], name: "NotEligible", type: "error" }, + { inputs: [], name: "NotHatWearer", type: "error" }, + { inputs: [], name: "NotHatsEligibility", type: "error" }, + { inputs: [], name: "NotHatsToggle", type: "error" }, + { inputs: [], name: "StringTooLong", type: "error" }, + { inputs: [], name: "ZeroAddress", type: "error" }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { indexed: false, internalType: "bool", name: "approved", type: "bool" }, + ], + name: "ApprovalForAll", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: false, internalType: "uint256", name: "id", type: "uint256" }, + { + indexed: false, + internalType: "string", + name: "details", + type: "string", + }, + { + indexed: false, + internalType: "uint32", + name: "maxSupply", + type: "uint32", + }, + { + indexed: false, + internalType: "address", + name: "eligibility", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "toggle", + type: "address", + }, + { indexed: false, internalType: "bool", name: "mutable_", type: "bool" }, + { + indexed: false, + internalType: "string", + name: "imageURI", + type: "string", + }, + ], + name: "HatCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "hatId", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "newDetails", + type: "string", + }, + ], + name: "HatDetailsChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "hatId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "newEligibility", + type: "address", + }, + ], + name: "HatEligibilityChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "hatId", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "newImageURI", + type: "string", + }, + ], + name: "HatImageURIChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "hatId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint32", + name: "newMaxSupply", + type: "uint32", + }, + ], + name: "HatMaxSupplyChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "hatId", + type: "uint256", + }, + ], + name: "HatMutabilityChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "hatId", + type: "uint256", + }, + { indexed: false, internalType: "bool", name: "newStatus", type: "bool" }, + ], + name: "HatStatusChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "hatId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "newToggle", + type: "address", + }, + ], + name: "HatToggleChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint32", + name: "domain", + type: "uint32", + }, + { + indexed: false, + internalType: "uint256", + name: "newAdmin", + type: "uint256", + }, + ], + name: "TopHatLinkRequested", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint32", + name: "domain", + type: "uint32", + }, + { + indexed: false, + internalType: "uint256", + name: "newAdmin", + type: "uint256", + }, + ], + name: "TopHatLinked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { indexed: true, internalType: "address", name: "from", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, + { + indexed: false, + internalType: "uint256[]", + name: "ids", + type: "uint256[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + name: "TransferBatch", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { indexed: true, internalType: "address", name: "from", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, + { indexed: false, internalType: "uint256", name: "id", type: "uint256" }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "TransferSingle", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: false, internalType: "string", name: "value", type: "string" }, + { indexed: true, internalType: "uint256", name: "id", type: "uint256" }, + ], + name: "URI", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "hatId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "wearer", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "wearerStanding", + type: "bool", + }, + ], + name: "WearerStandingChanged", + type: "event", + }, + { + inputs: [ + { internalType: "uint32", name: "_topHatDomain", type: "uint32" }, + { internalType: "uint256", name: "_newAdminHat", type: "uint256" }, + { internalType: "address", name: "_eligibility", type: "address" }, + { internalType: "address", name: "_toggle", type: "address" }, + { internalType: "string", name: "_details", type: "string" }, + { internalType: "string", name: "_imageURI", type: "string" }, + ], + name: "approveLinkTopHatToTree", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "", type: "uint256" }, + { internalType: "address", name: "", type: "address" }, + ], + name: "badStandings", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_wearer", type: "address" }, + { internalType: "uint256", name: "_hatId", type: "uint256" }, + ], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "balance", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address[]", name: "_wearers", type: "address[]" }, + { internalType: "uint256[]", name: "_hatIds", type: "uint256[]" }, + ], + name: "balanceOfBatch", + outputs: [ + { internalType: "uint256[]", name: "balances", type: "uint256[]" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "baseImageURI", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256[]", name: "_admins", type: "uint256[]" }, + { internalType: "string[]", name: "_details", type: "string[]" }, + { internalType: "uint32[]", name: "_maxSupplies", type: "uint32[]" }, + { + internalType: "address[]", + name: "_eligibilityModules", + type: "address[]", + }, + { internalType: "address[]", name: "_toggleModules", type: "address[]" }, + { internalType: "bool[]", name: "_mutables", type: "bool[]" }, + { internalType: "string[]", name: "_imageURIs", type: "string[]" }, + ], + name: "batchCreateHats", + outputs: [{ internalType: "bool", name: "success", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256[]", name: "_hatIds", type: "uint256[]" }, + { internalType: "address[]", name: "_wearers", type: "address[]" }, + ], + name: "batchMintHats", + outputs: [{ internalType: "bool", name: "success", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_admin", type: "uint256" }, + { internalType: "uint16", name: "_newHat", type: "uint16" }, + ], + name: "buildHatId", + outputs: [{ internalType: "uint256", name: "id", type: "uint256" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_hatId", type: "uint256" }, + { internalType: "string", name: "_newDetails", type: "string" }, + ], + name: "changeHatDetails", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_hatId", type: "uint256" }, + { internalType: "address", name: "_newEligibility", type: "address" }, + ], + name: "changeHatEligibility", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_hatId", type: "uint256" }, + { internalType: "string", name: "_newImageURI", type: "string" }, + ], + name: "changeHatImageURI", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_hatId", type: "uint256" }, + { internalType: "uint32", name: "_newMaxSupply", type: "uint32" }, + ], + name: "changeHatMaxSupply", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_hatId", type: "uint256" }, + { internalType: "address", name: "_newToggle", type: "address" }, + ], + name: "changeHatToggle", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "checkHatStatus", + outputs: [{ internalType: "bool", name: "toggled", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_hatId", type: "uint256" }, + { internalType: "address", name: "_wearer", type: "address" }, + ], + name: "checkHatWearerStatus", + outputs: [{ internalType: "bool", name: "updated", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_admin", type: "uint256" }, + { internalType: "string", name: "_details", type: "string" }, + { internalType: "uint32", name: "_maxSupply", type: "uint32" }, + { internalType: "address", name: "_eligibility", type: "address" }, + { internalType: "address", name: "_toggle", type: "address" }, + { internalType: "bool", name: "_mutable", type: "bool" }, + { internalType: "string", name: "_imageURI", type: "string" }, + ], + name: "createHat", + outputs: [{ internalType: "uint256", name: "newHatId", type: "uint256" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_hatId", type: "uint256" }, + { internalType: "uint32", name: "_level", type: "uint32" }, + ], + name: "getAdminAtLevel", + outputs: [{ internalType: "uint256", name: "admin", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_hatId", type: "uint256" }, + { internalType: "uint32", name: "_level", type: "uint32" }, + ], + name: "getAdminAtLocalLevel", + outputs: [{ internalType: "uint256", name: "admin", type: "uint256" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "getHatEligibilityModule", + outputs: [ + { internalType: "address", name: "eligibility", type: "address" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "getHatLevel", + outputs: [{ internalType: "uint32", name: "level", type: "uint32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "getHatMaxSupply", + outputs: [{ internalType: "uint32", name: "maxSupply", type: "uint32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "getHatToggleModule", + outputs: [{ internalType: "address", name: "toggle", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "getImageURIForHat", + outputs: [{ internalType: "string", name: "_uri", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "getLocalHatLevel", + outputs: [{ internalType: "uint32", name: "level", type: "uint32" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_admin", type: "uint256" }], + name: "getNextId", + outputs: [{ internalType: "uint256", name: "nextId", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint32", name: "_topHatDomain", type: "uint32" }], + name: "getTippyTopHatDomain", + outputs: [{ internalType: "uint32", name: "domain", type: "uint32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "getTopHatDomain", + outputs: [{ internalType: "uint32", name: "domain", type: "uint32" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "hatSupply", + outputs: [{ internalType: "uint32", name: "supply", type: "uint32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "isActive", + outputs: [{ internalType: "bool", name: "active", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_user", type: "address" }, + { internalType: "uint256", name: "_hatId", type: "uint256" }, + ], + name: "isAdminOfHat", + outputs: [{ internalType: "bool", name: "isAdmin", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "", type: "address" }, + { internalType: "address", name: "", type: "address" }, + ], + name: "isApprovedForAll", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_wearer", type: "address" }, + { internalType: "uint256", name: "_hatId", type: "uint256" }, + ], + name: "isEligible", + outputs: [{ internalType: "bool", name: "eligible", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_wearer", type: "address" }, + { internalType: "uint256", name: "_hatId", type: "uint256" }, + ], + name: "isInGoodStanding", + outputs: [{ internalType: "bool", name: "standing", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "isLocalTopHat", + outputs: [{ internalType: "bool", name: "_isLocalTopHat", type: "bool" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "isTopHat", + outputs: [{ internalType: "bool", name: "_isTopHat", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "isValidHatId", + outputs: [{ internalType: "bool", name: "validHatId", type: "bool" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_user", type: "address" }, + { internalType: "uint256", name: "_hatId", type: "uint256" }, + ], + name: "isWearerOfHat", + outputs: [{ internalType: "bool", name: "isWearer", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "lastTopHatId", + outputs: [{ internalType: "uint32", name: "", type: "uint32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint32", name: "", type: "uint32" }], + name: "linkedTreeAdmins", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint32", name: "", type: "uint32" }], + name: "linkedTreeRequests", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "makeHatImmutable", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_hatId", type: "uint256" }, + { internalType: "address", name: "_wearer", type: "address" }, + ], + name: "mintHat", + outputs: [{ internalType: "bool", name: "success", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_target", type: "address" }, + { internalType: "string", name: "_details", type: "string" }, + { internalType: "string", name: "_imageURI", type: "string" }, + ], + name: "mintTopHat", + outputs: [{ internalType: "uint256", name: "topHatId", type: "uint256" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "bytes[]", name: "data", type: "bytes[]" }], + name: "multicall", + outputs: [{ internalType: "bytes[]", name: "", type: "bytes[]" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint32", name: "_topHatDomain", type: "uint32" }, + { internalType: "uint256", name: "_linkedAdmin", type: "uint256" }, + ], + name: "noCircularLinkage", + outputs: [{ internalType: "bool", name: "notCircular", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint32", name: "_topHatDomain", type: "uint32" }, + { internalType: "uint256", name: "_newAdminHat", type: "uint256" }, + { internalType: "address", name: "_eligibility", type: "address" }, + { internalType: "address", name: "_toggle", type: "address" }, + { internalType: "string", name: "_details", type: "string" }, + { internalType: "string", name: "_imageURI", type: "string" }, + ], + name: "relinkTopHatWithinTree", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "renounceHat", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint32", name: "_topHatDomain", type: "uint32" }, + { internalType: "uint256", name: "_requestedAdminHat", type: "uint256" }, + ], + name: "requestLinkTopHatToTree", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "", type: "address" }, + { internalType: "address", name: "", type: "address" }, + { internalType: "uint256[]", name: "", type: "uint256[]" }, + { internalType: "uint256[]", name: "", type: "uint256[]" }, + { internalType: "bytes", name: "", type: "bytes" }, + ], + name: "safeBatchTransferFrom", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "", type: "address" }, + { internalType: "address", name: "", type: "address" }, + { internalType: "uint256", name: "", type: "uint256" }, + { internalType: "uint256", name: "", type: "uint256" }, + { internalType: "bytes", name: "", type: "bytes" }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { internalType: "uint32", name: "_topHatDomain", type: "uint32" }, + { internalType: "uint256", name: "_newAdminHat", type: "uint256" }, + ], + name: "sameTippyTopHatDomain", + outputs: [{ internalType: "bool", name: "sameDomain", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "", type: "address" }, + { internalType: "bool", name: "", type: "bool" }, + ], + name: "setApprovalForAll", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_hatId", type: "uint256" }, + { internalType: "bool", name: "_newStatus", type: "bool" }, + ], + name: "setHatStatus", + outputs: [{ internalType: "bool", name: "toggled", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_hatId", type: "uint256" }, + { internalType: "address", name: "_wearer", type: "address" }, + { internalType: "bool", name: "_eligible", type: "bool" }, + { internalType: "bool", name: "_standing", type: "bool" }, + ], + name: "setHatWearerStatus", + outputs: [{ internalType: "bool", name: "updated", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }], + name: "supportsInterface", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_hatId", type: "uint256" }, + { internalType: "address", name: "_from", type: "address" }, + { internalType: "address", name: "_to", type: "address" }, + ], + name: "transferHat", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint32", name: "_topHatDomain", type: "uint32" }, + { internalType: "address", name: "_wearer", type: "address" }, + ], + name: "unlinkTopHatFromTree", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "id", type: "uint256" }], + name: "uri", + outputs: [{ internalType: "string", name: "_uri", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_hatId", type: "uint256" }], + name: "viewHat", + outputs: [ + { internalType: "string", name: "details", type: "string" }, + { internalType: "uint32", name: "maxSupply", type: "uint32" }, + { internalType: "uint32", name: "supply", type: "uint32" }, + { internalType: "address", name: "eligibility", type: "address" }, + { internalType: "address", name: "toggle", type: "address" }, + { internalType: "string", name: "imageURI", type: "string" }, + { internalType: "uint16", name: "lastHatId", type: "uint16" }, + { internalType: "bool", name: "mutable_", type: "bool" }, + { internalType: "bool", name: "active", type: "bool" }, + ], + stateMutability: "view", + type: "function", + }, ] as const; diff --git a/pkgs/frontend/abi/hatsTimeFrameModule.ts b/pkgs/frontend/abi/hatsTimeFrameModule.ts index 4a842b2..ef99157 100644 --- a/pkgs/frontend/abi/hatsTimeFrameModule.ts +++ b/pkgs/frontend/abi/hatsTimeFrameModule.ts @@ -1,217 +1,217 @@ export const HATS_TIME_FRAME_MODULE_ABI = [ - { - inputs: [ - { - internalType: "address", - name: "_trustedForwarder", - type: "address", - }, - { - internalType: "string", - name: "_version", - type: "string", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "InvalidInitialization", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - inputs: [], - name: "HATS", - outputs: [ - { - internalType: "contract IHats", - name: "", - type: "address", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [], - name: "IMPLEMENTATION", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "wearer", - type: "address", - }, - { - internalType: "uint256", - name: "hatId", - type: "uint256", - }, - ], - name: "getWearingElapsedTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "wearer", - type: "address", - }, - { - internalType: "uint256", - name: "hatId", - type: "uint256", - }, - ], - name: "getWoreTime", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "hatId", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "forwarder", - type: "address", - }, - ], - name: "isTrustedForwarder", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "hatId", - type: "uint256", - }, - { - internalType: "address", - name: "wearer", - type: "address", - }, - ], - name: "mintHat", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "_initData", - type: "bytes", - }, - ], - name: "setUp", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "trustedForwarder", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "version", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "version_", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, + { + inputs: [ + { + internalType: "address", + name: "_trustedForwarder", + type: "address", + }, + { + internalType: "string", + name: "_version", + type: "string", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "InvalidInitialization", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", + }, + ], + name: "Initialized", + type: "event", + }, + { + inputs: [], + name: "HATS", + outputs: [ + { + internalType: "contract IHats", + name: "", + type: "address", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "IMPLEMENTATION", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "wearer", + type: "address", + }, + { + internalType: "uint256", + name: "hatId", + type: "uint256", + }, + ], + name: "getWearingElapsedTime", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "wearer", + type: "address", + }, + { + internalType: "uint256", + name: "hatId", + type: "uint256", + }, + ], + name: "getWoreTime", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "hatId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "forwarder", + type: "address", + }, + ], + name: "isTrustedForwarder", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "hatId", + type: "uint256", + }, + { + internalType: "address", + name: "wearer", + type: "address", + }, + ], + name: "mintHat", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "_initData", + type: "bytes", + }, + ], + name: "setUp", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "trustedForwarder", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version_", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, ] as const; diff --git a/pkgs/frontend/app/components/common/CommonDialog.tsx b/pkgs/frontend/app/components/common/CommonDialog.tsx index b1d2730..4e31b63 100644 --- a/pkgs/frontend/app/components/common/CommonDialog.tsx +++ b/pkgs/frontend/app/components/common/CommonDialog.tsx @@ -1,22 +1,22 @@ import { - DialogContent, - DialogRoot, - DialogTrigger, + DialogContent, + DialogRoot, + DialogTrigger, } from "~/components/ui/dialog"; interface CommonDialogProps { - dialogTriggerReactNode?: React.ReactNode; - children?: React.ReactNode; + dialogTriggerReactNode?: React.ReactNode; + children?: React.ReactNode; } export const CommonDialog = ({ - dialogTriggerReactNode, - children, + dialogTriggerReactNode, + children, }: CommonDialogProps) => { - return ( - - {dialogTriggerReactNode} - {children} - - ); + return ( + + {dialogTriggerReactNode} + {children} + + ); }; diff --git a/pkgs/frontend/app/components/common/CommonInput.tsx b/pkgs/frontend/app/components/common/CommonInput.tsx index df992c5..7ed24d7 100644 --- a/pkgs/frontend/app/components/common/CommonInput.tsx +++ b/pkgs/frontend/app/components/common/CommonInput.tsx @@ -1,10 +1,10 @@ import { Input, InputProps } from "@chakra-ui/react"; interface CommonInputProps extends Omit { - value: string | number; - onChange: (event: React.ChangeEvent) => void; + value: string | number; + onChange: (event: React.ChangeEvent) => void; } export const CommonInput = ({ value, onChange }: CommonInputProps) => { - return ; + return ; }; diff --git a/pkgs/frontend/app/components/common/CommonTextarea.tsx b/pkgs/frontend/app/components/common/CommonTextarea.tsx index 5704cad..6691c6c 100644 --- a/pkgs/frontend/app/components/common/CommonTextarea.tsx +++ b/pkgs/frontend/app/components/common/CommonTextarea.tsx @@ -1,10 +1,10 @@ import { Textarea, TextareaProps } from "@chakra-ui/react"; interface CommonTextAreaProps extends Omit { - value: string; - onChange: (event: React.ChangeEvent) => void; + value: string; + onChange: (event: React.ChangeEvent) => void; } export const CommonTextArea = ({ value, onChange }: CommonTextAreaProps) => { - return