Skip to content

Instantly share code, notes, and snippets.

@Harry154git
Harry154git / .deps...npm....resolution-index.json
Created May 24, 2026 09:34
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.24+commit.e11b9ed9.js&optimize=undefined&runs=200&gist=
{
"SportTicketing.sol": {
"__sources__": {
"SportTicketing.sol": {
"content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.24;\r\n\r\ncontract SportTicketing {\r\n address public organizer;\r\n uint public matchCount;\r\n uint public ticketCount;\r\n\r\n struct MatchEvent {\r\n string name;\r\n uint price;\r\n uint maxTickets;\r\n uint soldTickets;\r\n bool active;\r\n }\r\n\r\n struct Ticket {\r\n uint matchId;\r\n address owner;\r\n bool used;\r\n uint purchasedAt;\r\n }\r\n\r\n mapping(uint => MatchEvent) public matches;\r\n mapping(uint => Ticket) public tickets;\r\n mapping(uint => mapping(address => bool)) public hasBought;\r\n\r\n event MatchCreated(uint indexed matchId, string name, uint price, uint maxTickets);\r\n event TicketPurchased(uint indexed ticketId, uint indexed matchId, address indexed buyer);\r\n event TicketValidated(uint indexed ticketId, address indexed