This is a Web3 Distributed Application (DApp) that implements a simple ticketing system. It uses the Ethereum Sepolia Testnet for Solidity smart contract deployment and Typescript React for the frontend.
Contract: 0xef7798343c8d5e4cc4c2b2cf3d1a59267710ebce
Contract Creator Wallet: 0x9c78dC59550c046aDEE06DdD713CBd37FB4448CE
Venue / Doorman Wallet: 0xB978924429A32b4c6A4f294305e6205AEFd058fC
Ticket Purchaser Wallet: 0x2C8c7631d4f599feA6071276ba4f32c511772e37
To run this application, follow these steps:
- Clone the repository to your local machine.
- Navigate to the project directory.
- Install the project dependencies by running
npm install
. - Start the application by running
npm run dev
.
The application will start and can be accessed at http://localhost:5173/
.
Tests are located in the test
directory.
To run the tests, stay in the root directory and run the command npx hardhat test
.
The smart contract Tickets.sol
inherits from OpenZeppelin's ERC-20 implementation to allow for purchasing and transfering of tickets.
The contract was deployed using Hardhat, a development environment for Ethereum.
Here are the steps that were followed:
- Install Hardhat by running
npm install --save-dev hardhat
. - Create a Hardhat project by running
npx hardhat
. - Write the contract in Solidity and save it in the
contracts
directory. - Compile the contract by running
npx hardhat compile
. - Write a deployment script in the
scripts
directory. - Run the deployment script by running
npx hardhat run scripts/deploy.js
. - The ABI will be generated in the
src/artifacts
directoryabi.json
.