This is an application for creating events, buy and sell tickets on the Ethereum blockchain. This prototype was developed as part of the "Blockchain" Seminar at QUEST Nawabshah University.
This project was bootstrapped with Truffle.
npm install -g truffle
truffle unbox react- (Optional) Create a new issue and add it to the To Do column of Ticketing dApp project
- Assign yourself an issue from the To Do column of the Ticketing dApp project and move it to the In Progress column
- Pull the latest changes from
origin/master - Create a new local branch beginning with the issue number (e.g.,
4-feature). - Commit to this branch mentioning the issue number in the commit message (e.g.
add functionality xyz (#4) - Finish your implementation on the branch
- Pull and merge the latest changes from
origin/masterinto your local branch - Verify that your changes still work as expected
- Merge your branch into
masterand push the changes - Close the issue and move it to the Done column of the Ticketing dApp project
- Git command line interface
- Node.js command line interface
- Metamask Extension for your browser (including wallet)
- Ganache-CLI to spin up a blockchain with instant mining
We don't use Ganache at the moment, as it fails somehow. Everything works though with Ganache-CLI. If at some point we switch back, the README should be updated.
onetime setup
git clone https://github.com/abdulbaqi02/Event-Ticketing-DApp.git
# or
git git@github.com:abdulbaqi02/Event-Ticketing-DApp.gitcd Event Ticketing DApp/client
npm installDetailed information can be found here: README.
npm install -g truffle
# or
sudo npm install -g truffleInstall with @beta to get the latest updates which fixes a bug that caused wrong gas estimations (more details).
npm install -g ganache-cli@beta
# or
sudo npm install -g ganache-cli@beta- Start a local blockchain with
ganache-cliin a terminal - which will most likely be running on:http://127.0.0.1:8545). - Open
Metamaskin your browser and login with your wallet. - Click on the network dropdown and select Custom RPC.
- Scroll down and enter the copied
RPC Serverofganache-cliinto the New RPC URL field. - Hit Save.
- Switch to your
ganache-clian copy one of the private keys. - Back in
Metamask, click on the colored circle on the top right and select Import Account. - Paste the private key from
ganache-cliand hit Import. You should now be logged in with an Account from theganache-clinetwork with a balance of 100 ETH.
everytime to run the environment
- Pull the latest commits:
# Terminal Tab #1 cd /path/to/Event-Ticketing-DApp git pull
- Start local blockchain with
ganache-cli. - Compile the
Smart Contracts:# Terminal Tab #1 truffle compile - Deploy the
Smart Contractson theGanachenetwork:# Terminal Tab #1 truffle migrate --reset - Start the
Truffleconsole:# Terminal Tab #1 truffle console - Start the
Reactclient:# Terminal Tab #2 cd /path/to/Event-Ticketing-DApp/client npm install npm start
localhost:3000should be opened automatically in your browser