From 9f9b61fe338b50b653c3f5f7d2b04fd4bd673811 Mon Sep 17 00:00:00 2001 From: SIDHARTH20K4 <91970588+SIDHARTH20K4@users.noreply.github.com> Date: Fri, 2 Feb 2024 00:11:37 +0530 Subject: [PATCH] getting the events from the events array --- web3/contracts/Nft.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web3/contracts/Nft.sol b/web3/contracts/Nft.sol index 8d14e7e..b795255 100644 --- a/web3/contracts/Nft.sol +++ b/web3/contracts/Nft.sol @@ -62,6 +62,10 @@ contract Nft is ERC721,Ownable { events.push(newEvent); } + function getEvent() public view returns (Event[] memory) { + return events; + } + function endEvents() private { uint256 i = 0; while (i < events.length) {