Merge pull request #50 from Ayush272002/get-user-tickets-ct

Updated bytecode and added getUserTickets function
This commit is contained in:
Ayush Acharjya
2024-10-27 09:19:10 +00:00
committed by GitHub
2 changed files with 85 additions and 62 deletions

View File

@@ -194,4 +194,8 @@ contract EventManager {
transferTicketForce(_ticketId, _to);
}
function getUserTickets(address _user) public view returns (uint256[] memory _ticketIds) {
return userTickets[_user];
}
}

View File

@@ -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": [
{