diff --git a/contracts/EventManager.sol b/contracts/EventManager.sol index b19b5ba..63c0122 100644 --- a/contracts/EventManager.sol +++ b/contracts/EventManager.sol @@ -194,4 +194,8 @@ contract EventManager { transferTicketForce(_ticketId, _to); } + function getUserTickets(address _user) public view returns (uint256[] memory _ticketIds) { + return userTickets[_user]; + } + } diff --git a/contracts/EventManagerABI.json b/contracts/EventManagerABI.json index d22a78d..d69ecfa 100644 --- a/contracts/EventManagerABI.json +++ b/contracts/EventManagerABI.json @@ -1,9 +1,4 @@ [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, { "anonymous": false, "inputs": [ @@ -152,25 +147,6 @@ "stateMutability": "payable", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_cents", - "type": "uint256" - } - ], - "name": "centsToFlare", - "outputs": [ - { - "internalType": "uint256", - "name": "_flr", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -225,6 +201,66 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_ticketId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + } + ], + "name": "transferTicket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_ticketId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + } + ], + "name": "transferTicketFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_cents", + "type": "uint256" + } + ], + "name": "centsToFlare", + "outputs": [ + { + "internalType": "uint256", + "name": "_flr", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "eventCounter", @@ -269,9 +305,9 @@ "type": "uint64" }, { - "internalType": "uint256", + "internalType": "uint64", "name": "ticketsSold", - "type": "uint256" + "type": "uint64" }, { "internalType": "uint64", @@ -419,6 +455,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getUserTickets", + "outputs": [ + { + "internalType": "uint256[]", + "name": "_ticketIds", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "ticketCounter", @@ -461,42 +516,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_ticketId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - } - ], - "name": "transferTicket", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_ticketId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - } - ], - "name": "transferTicketFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ {