diff --git a/packages/interface/src/features/rounds/components/RoundsList.tsx b/packages/interface/src/features/rounds/components/RoundsList.tsx
index 4d4b35a8..4b37d3b7 100644
--- a/packages/interface/src/features/rounds/components/RoundsList.tsx
+++ b/packages/interface/src/features/rounds/components/RoundsList.tsx
@@ -7,10 +7,8 @@ export const RoundsList = (): JSX.Element => {
const { rounds } = useRound();
return (
-
- {rounds.map((round) => (
-
- ))}
+
+ {rounds?.map((round) => )}
);
};
diff --git a/packages/interface/src/features/rounds/types/index.ts b/packages/interface/src/features/rounds/types/index.ts
index 25a13431..f99324bc 100644
--- a/packages/interface/src/features/rounds/types/index.ts
+++ b/packages/interface/src/features/rounds/types/index.ts
@@ -1,12 +1,59 @@
import { z } from "zod";
+import { reverseKeys } from "~/utils/reverseKeys";
+
+export const votingStrategyTypes = {
+ SIMPLE: "non-qv",
+ QUADRATIC_VOTING: "qv",
+ RANKED: "ranked",
+} as const;
+
+export const chainTypes = {
+ ethereum: "ethereum",
+ optimism: "optimism",
+ optimismSepolia: "optimismSepolia",
+ scroll: "scroll",
+ scrollSepolia: "scrollSepolia",
+ arbitrum: "arbitrum",
+ linea: "linea",
+ sepolia: "sepolia",
+ base: "base",
+ baseSepolia: "baseSepolia",
+ localhost: "localhost",
+} as const;
+
+export const gatingStrategyTypes = {
+ ZUPASS: "zupass",
+ FREEFORALL: "freeforall",
+ EAS: "eas",
+ SEMAPHORE: "semaphore",
+} as const;
+
+export const creditStrategyTypes = {
+ CONSTANT: "constant",
+ QF: "qf",
+ TOKEN: "token",
+} as const;
+
export const RoundSchema = z.object({
roundId: z.string(),
+ roundLogo: z.string().optional(),
description: z.string(),
- startsAt: z.number(),
- registrationEndsAt: z.number(),
- votingEndsAt: z.number(),
+ startsAt: z.string(),
+ registrationEndsAt: z.string(),
+ votingStartsAt: z.string(),
+ votingEndsAt: z.string(),
+ votingStrategy: z.nativeEnum(reverseKeys(votingStrategyTypes)),
tallyURL: z.string().optional(),
});
export type Round = z.infer
;
+
+export const DeploymentSchema = z.object({
+ chain: z.nativeEnum(chainTypes),
+ gatingStrategy: z.nativeEnum(gatingStrategyTypes),
+ creditStrategy: z.nativeEnum(creditStrategyTypes),
+ creditAmount: z.number(),
+});
+
+export type Deployment = z.infer;
diff --git a/packages/interface/src/layouts/DefaultLayout.tsx b/packages/interface/src/layouts/DefaultLayout.tsx
index 871d39f0..0af1f4a1 100644
--- a/packages/interface/src/layouts/DefaultLayout.tsx
+++ b/packages/interface/src/layouts/DefaultLayout.tsx
@@ -72,8 +72,8 @@ export const Layout = ({ children = null, ...props }: ILayoutProps): JSX.Element
links.push(
...[
{
- href: "/applications",
- children: "Applications",
+ href: "/admin",
+ children: "Admin",
},
],
);
@@ -86,10 +86,6 @@ export const Layout = ({ children = null, ...props }: ILayoutProps): JSX.Element
href: "/voters",
children: "Voters",
},
- {
- href: "/coordinator",
- children: "Coordinator",
- },
],
);
}
diff --git a/packages/interface/src/pages/admin/index.tsx b/packages/interface/src/pages/admin/index.tsx
new file mode 100644
index 00000000..4c519008
--- /dev/null
+++ b/packages/interface/src/pages/admin/index.tsx
@@ -0,0 +1,18 @@
+import { useRound } from "~/contexts/Round";
+import { DeployContracts } from "~/features/admin/components/DeployContracts";
+import { DeployRounds } from "~/features/admin/components/DeployRounds";
+import { Layout } from "~/layouts/DefaultLayout";
+
+const AdminPage = (): JSX.Element => {
+ const { isContractsDeployed } = useRound();
+
+ return (
+
+
+
{isContractsDeployed ? : }
+
+
+ );
+};
+
+export default AdminPage;
diff --git a/packages/interface/src/pages/coordinator/index.tsx b/packages/interface/src/pages/coordinator/index.tsx
deleted file mode 100644
index 0a3995d8..00000000
--- a/packages/interface/src/pages/coordinator/index.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { Layout } from "~/layouts/DefaultLayout";
-
-const CoordinatorPage = (): JSX.Element => This is the coordinator page.;
-
-export default CoordinatorPage;
diff --git a/packages/interface/src/pages/index.tsx b/packages/interface/src/pages/index.tsx
index b0ec4ca8..28f7d6f3 100644
--- a/packages/interface/src/pages/index.tsx
+++ b/packages/interface/src/pages/index.tsx
@@ -37,16 +37,14 @@ const HomePage = (): JSX.Element => {
Configure and deploy your contracts to get started.
)}
- {isConnected && !isAdmin && rounds.length === 0 && (
-
There are no rounds deployed.
There are no rounds deployed.