From d56bc64f4522f49bda6b608f873c4aca817bda09 Mon Sep 17 00:00:00 2001 From: Ayush Acharjya Date: Sun, 27 Oct 2024 03:23:44 +0000 Subject: [PATCH] add location and end date --- contracts/EventManagerABI.json | 26 +++++++++++++++++++++++--- lib/createEvent.ts | 2 ++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/contracts/EventManagerABI.json b/contracts/EventManagerABI.json index 4d7c5b0..73e85db 100644 --- a/contracts/EventManagerABI.json +++ b/contracts/EventManagerABI.json @@ -53,6 +53,11 @@ "name": "_description", "type": "string" }, + { + "internalType": "string", + "name": "_location", + "type": "string" + }, { "internalType": "uint256", "name": "_capacity", @@ -65,7 +70,12 @@ }, { "internalType": "uint256", - "name": "_eventDate", + "name": "_eventStartDate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_eventEndDate", "type": "uint256" }, { @@ -108,7 +118,7 @@ { "indexed": false, "internalType": "uint256", - "name": "eventDate", + "name": "eventStartDate", "type": "uint256" } ], @@ -284,6 +294,11 @@ "name": "description", "type": "string" }, + { + "internalType": "string", + "name": "location", + "type": "string" + }, { "internalType": "uint256", "name": "capacity", @@ -301,7 +316,12 @@ }, { "internalType": "uint256", - "name": "eventDate", + "name": "eventStartDate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "eventEndDate", "type": "uint256" }, { diff --git a/lib/createEvent.ts b/lib/createEvent.ts index 31a6f5b..7bfca92 100644 --- a/lib/createEvent.ts +++ b/lib/createEvent.ts @@ -58,9 +58,11 @@ export const createEvent = async ({ const tx = await contract.createEvent( name, description, + location, capacity, ethers.utils.parseEther(ticketPrice.toString()), Math.floor(startDate.getTime() / 1000), + Math.floor(endDate.getTime() / 1000), images );