CSC2125 Solidity

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;

import {IERC20} from
import {Math} from
import “hardhat/console.sol”;

interface ITicketMarketplace {
event EventCreated(uint128 eventId, uint128 maxTickets, uint256 pricePerTicket, uint256 pricePerTicketERC20);
event PriceUpdate(uint128 eventId, uint256 newPrice, string priceType);
event MaxTicketsUpdate(uint128 eventId, uint128 newMaxTickets);
event TicketsBought(uint128 eventId, uint128 numberOfTickets, string boughtWith);
event ERC20AddressUpdate(address newERC20Address);

function createEvent(uint128 maxTickets, uint256 pricePerTicket, uint256 pricePerTicketERC20) external;

function setMaxTicketsForEvent(uint128 eventId, uint128 newMaxTickets) external;

function setPriceForTicketETH(uint128 eventId, uint256 price) external;

function setPriceForTicketERC20(uint128 eventId, uint256 price) external;

function buyTickets(uint128 eventId, uint128 ticketCount) payable external;

function buyTicketsERC20(uint128 eventId, uint128 ticketCount) external;

function setERC20Address(address newERC20Address) external;
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;

import {IERC1155} from

interface ITicketNFT {
function mintFromMarketPlace(address to, uint256 nftId) external;
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;

import {ERC20} from
// Uncomment this line to use console.log
// import “hardhat/console.sol”;

contract SampleCoin is ERC20 {
// your code goes here (you can do it!)
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;

import {ITicketNFT} from “./interfaces/ITicketNFT.sol”;
import {IERC20} from
import {TicketNFT} from “./TicketNFT.sol”;
import {Math} from
import {ITicketMarketplace} from “./interfaces/ITicketMarketplace.sol”;
import “hardhat/console.sol”;

contract TicketMarketplace is ITicketMarketplace {
// your code goes here (you can do it!)
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;

import {ERC1155} from
import {ITicketNFT} from “./interfaces/ITicketNFT.sol”;

// Uncomment this line to use console.log
// import “hardhat/console.sol”;

contract TicketNFT is ERC1155, ITicketNFT {
// your code goes here (you can do it!)