Skip to content

Commit 405ac00

Browse files
committed
Production ready version of TEC Swap
0 parents  commit 405ac00

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2130
-0
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NEXT_PUBLIC_REOWN_PROJECT_ID=<REOWN_PROJECT_ID>
2+
NEXT_PUBLIC_ALCHEMY_API_KEY=<ALCHEMY_API_KEY>

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
/coverage
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
20+
# production
21+
/build
22+
23+
# misc
24+
.DS_Store
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env
35+
36+
# vercel
37+
.vercel
38+
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts
42+
43+
# lock files
44+
yarn.lock
45+
package-lock.json
46+
pnpm-lock.yaml

app/globals.css

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
@layer base {
6+
:root {
7+
--background: 222.2 84% 4.9%;
8+
--foreground: 210 40% 98%;
9+
10+
--card: 222.2 84% 4.9%;
11+
--card-foreground: 210 40% 98%;
12+
13+
--popover: 222.2 84% 4.9%;
14+
--popover-foreground: 210 40% 98%;
15+
16+
--primary: 217.2 91.2% 59.8%;
17+
--primary-foreground: 222.2 47.4% 11.2%;
18+
19+
--secondary: 217.2 32.6% 17.5%;
20+
--secondary-foreground: 210 40% 98%;
21+
22+
--muted: 217.2 32.6% 17.5%;
23+
--muted-foreground: 215 20.2% 65.1%;
24+
25+
--accent: 217.2 32.6% 17.5%;
26+
--accent-foreground: 210 40% 98%;
27+
28+
--destructive: 0 62.8% 30.6%;
29+
--destructive-foreground: 210 40% 98%;
30+
31+
--border: 217.2 32.6% 17.5%;
32+
--input: 217.2 32.6% 17.5%;
33+
--ring: 224.3 76.3% 48%;
34+
35+
--radius: 0.5rem;
36+
}
37+
}
38+
39+
@layer base {
40+
* {
41+
@apply border-border;
42+
}
43+
body {
44+
@apply bg-background text-foreground;
45+
}
46+
47+
@font-face {
48+
font-family: "BaiJamjuree";
49+
src: url("/fonts/BaiJamjuree-Regular.ttf") format("truetype");
50+
font-weight: 400;
51+
}
52+
53+
@font-face {
54+
font-family: "BaiJamjuree";
55+
src: url("/fonts/BaiJamjuree-Bold.ttf") format("truetype");
56+
font-weight: 700;
57+
}
58+
}
59+
60+
input::-webkit-outer-spin-button,
61+
input::-webkit-inner-spin-button {
62+
/* display: none; <- Crashes Chrome on hover */
63+
-webkit-appearance: none;
64+
margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
65+
}
66+
67+
input[type=number] {
68+
-moz-appearance:textfield; /* Firefox */
69+
font-size: 22px;
70+
}
71+

app/layout.tsx

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import Providers from "@/app/providers";
2+
import type { Metadata } from "next";
3+
import { Bai_Jamjuree, Chakra_Petch, Inter } from "next/font/google";
4+
import "./globals.css";
5+
import { Toaster } from "@/components/ui/toaster";
6+
7+
const inter = Inter({
8+
subsets: ["latin"],
9+
variable: "--font-inter",
10+
});
11+
12+
const bayJamjuree = Bai_Jamjuree({
13+
subsets: ["latin"],
14+
variable: "--font-bay-jamjuree",
15+
weight: ["200", "300", "400", "500", "600", "700"],
16+
});
17+
18+
const chackra = Chakra_Petch({
19+
subsets: ["latin"],
20+
variable: "--font-chakra-petch",
21+
weight: ["300", "400", "500", "600", "700"],
22+
});
23+
24+
export const metadata: Metadata = {
25+
title: "TEC Swap",
26+
description:
27+
"Mint and burn $TEC while supporting the ecosystem with every swap.",
28+
icons: {
29+
icon: [
30+
{ rel: "icon", url: "/favicon.ico", sizes: "any" },
31+
{
32+
rel: "icon",
33+
url: "/favicon-32x32.png",
34+
sizes: "32x32",
35+
type: "image/png",
36+
},
37+
{
38+
rel: "icon",
39+
url: "/favicon-16x16.png",
40+
sizes: "16x16",
41+
type: "image/png",
42+
},
43+
],
44+
apple: "/apple-touch-icon.png",
45+
other: [{ rel: "manifest", url: "/site.webmanifest" }],
46+
},
47+
};
48+
49+
export default function RootLayout({
50+
children,
51+
}: Readonly<{
52+
children: React.ReactNode;
53+
}>) {
54+
return (
55+
<html lang="en">
56+
<body
57+
className={`${inter.variable} ${bayJamjuree.variable} ${chackra.variable} antialiased`}
58+
>
59+
<Providers>{children}</Providers>
60+
<Toaster />
61+
</body>
62+
</html>
63+
);
64+
}

app/page.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import Footer from "@/components/footer";
2+
import Header from "@/components/header";
3+
import Swap from "@/components/swap";
4+
import BackgroundGradiend from "@/public/media/bg-image.png";
5+
import Image from "next/image";
6+
7+
export default function Home() {
8+
return (
9+
<main className="min-h-screen bg-black text-white relative overflow-hidden flex flex-col justify-between ga">
10+
<div className="w-full bg-transparent z-0 absolute bottom-0 left-0 select-none">
11+
<Image
12+
src={BackgroundGradiend}
13+
alt="TEC background gradient"
14+
draggable={false}
15+
/>
16+
</div>
17+
<Header />
18+
<div className="max-w-2xl w-full mx-auto min-h-[80vh] h-full pt-24 px-4 gap-8 flex flex-col">
19+
<p className="text-center text-2xl font-bold font-bay">
20+
TEC Swap is a new interface to interact with the TEC Augmented Bonding
21+
Curve (ABC), allowing you to seamlessly mint or burn TEC using rETH
22+
</p>
23+
<p className="text-center text-lg font-bay">
24+
A percentage of each transaction (tribute) flows into the TEC Common
25+
Pool, supporting the community and its mission as a sustainable
26+
funding stream.
27+
</p>
28+
<Swap />
29+
</div>
30+
<Footer />
31+
</main>
32+
);
33+
}

app/providers.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"use client";
2+
3+
import "@rainbow-me/rainbowkit/styles.css";
4+
5+
import { RainbowKitProvider } from "@rainbow-me/rainbowkit";
6+
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
7+
import { wagmiConfig } from "@/lib/wagmi";
8+
import { WagmiProvider } from "wagmi";
9+
10+
const queryClient = new QueryClient();
11+
12+
export default function Providers({ children }: { children: React.ReactNode }) {
13+
return (
14+
<WagmiProvider config={wagmiConfig}>
15+
<QueryClientProvider client={queryClient}>
16+
<RainbowKitProvider>{children}</RainbowKitProvider>
17+
</QueryClientProvider>
18+
</WagmiProvider>
19+
);
20+
}

components.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.ts",
8+
"css": "app/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
},
20+
"iconLibrary": "lucide"
21+
}

0 commit comments

Comments
 (0)