From 02893578f9a85c184389a9b203a7efd4f69b81f6 Mon Sep 17 00:00:00 2001 From: Ayush Acharjya Date: Sat, 26 Oct 2024 18:15:55 +0100 Subject: [PATCH 1/3] update buy handler --- .env | 2 + app/events/[...eventId]/page.tsx | 2 +- app/layout.tsx | 6 +- components/custom/EventDescription.tsx | 11 +- components/ui/toast.tsx | 129 ++++++ components/ui/toaster.tsx | 35 ++ hooks/use-toast.ts | 191 +++++++++ lib/buyHandler.ts | 65 ++++ lib/ethers.ts | 520 +++++++++++++++++++++++++ package-lock.json | 144 ++----- package.json | 2 +- 11 files changed, 995 insertions(+), 112 deletions(-) create mode 100644 .env create mode 100644 components/ui/toast.tsx create mode 100644 components/ui/toaster.tsx create mode 100644 hooks/use-toast.ts create mode 100644 lib/buyHandler.ts create mode 100644 lib/ethers.ts diff --git a/.env b/.env new file mode 100644 index 0000000..5f53ba8 --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +NEXT_PUBLIC_RPC_URL=https://coston2.enosys.global/ext/C/rpc +NEXT_PUBLIC_CONTRACT_ADDRESS=0xa12B3168e8FC621493c9db2dc1Db31e75cCA00bb \ No newline at end of file diff --git a/app/events/[...eventId]/page.tsx b/app/events/[...eventId]/page.tsx index c44afbb..60ad8d6 100644 --- a/app/events/[...eventId]/page.tsx +++ b/app/events/[...eventId]/page.tsx @@ -40,7 +40,7 @@ const ListingPage: React.FC = () => { return ( <>
- +