Skip to content

chainlink-hack/DigiPassContract

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DigiPass-MVP

Welcome to the DigiPass MVP repository

site

Table of contents

Overview

DigiPass is a pioneering platform that reimagines event ticketing through decentralization, offering users a novel and versatile approach to ticket ownership and event access. Powered by cutting-edge blockchain technology and leveraging the capabilities of Chainlink, DigiPass aims to redefine the traditional concept of event tickets, transforming them into multifaceted assets with extensive utility.

Core Features Implemented

Deployment on Polygon chain Soulbond Nft contract which will be issued as tickets tied to the different events

Note: The Proof-of-Attendance-Protocol (POAP) NFTs are given to attendees at events. Ticketing, as we know, is a popular application of NFTs. Given all the limitations that NFTs have, SBTs provide a more secure tokenization solution. They are non-transferable and could eliminate ticket scalping, selling in black and forging.

To put it simply, just holding a ticket won’t prove that the user attended an event. Building non-transferable POAPs proves that the original owner of the ticket attended the event.

Event Creation and Management:

  • Smart contract allows for the creation of events, capturing essential details such as event name, venue, location, image URL, available tickets, start and end dates, ticket prices, categories, and organizing entity information. Ticketing System:

  • Manages ticket sales and distribution with different ticket types (regular, VIP, VVIP), associating each ticket with its owner, event ID, ticket number, price, QR code, and verification status. Entities and Roles:

-Defines entities as users or organizations within the ecosystem, capturing their names, addresses, proofs (polygon ID), verification status, and roles (organization or participant). Cross-Chain Ticket Purchases:

  • Facilitates ticket purchases across different blockchain networks through the purchaseTicketCrossChain function, enabling users to acquire tickets using tokens from other chains. IPFS and Decentralized Storage:

Event and Ticket Management Functions:

  • Offers functions to create events, purchase tickets, verify ticket authenticity, manage event participants, check event validity, and handle event remittance for ticket sales.

Test Coverage

  • Unit testing ensures that all the codes meet the quality standards and the functions return the expected output.
  • Test coverage shows us the extent of how much of our codes are covered by tests. We ideally aim for 100% coverage.

Natspec commenting

  • This documentation provides information about the codebase and their implementation for both technical and non technical people.

Technologies

Stack Usage
Solidity Smart contract
React JS Frontend

Repo Setup

To setup the repo, first fork the chainlink-hack Repo, then clone the forked repository to create a copy on the local machine.

$ git clone https://github.com/chainlink-hack/DigiPassContract.git

Change directory to the cloned repo and set the original chainlink-hack repository as the "upstream" and your forked repository as the "origin" using gitbash. and make sure to switch to dev branch

$ git remote add upstream  https://github.com/chainlink-hack/DigiPassContract.git

Requirements

  • Hardhat
  • Polygon key
  • Metamask key
  • Node JS

Setup the Project

*Note:

This project was setup on a windows 10 system using the gitbash terminal. Some of the commands used may not work with the VScode terminal, command prompt or powershell.

The steps involved are outlined below:-

Install Hardhat

The first step involves cloning and installing hardhat.

$ cd core

$ npm i -D hardhat

$ npm install

$ npm install --save-dev "@nomiclabs/hardhat-waffle" "ethereum-waffle" "chai" "@nomiclabs/hardhat-ethers" "ethers" "web3" "@nomiclabs/hardhat-web3" "@nomiclabs/hardhat-etherscan" "@openzeppelin/contracts" "dotenv" "@tenderly/hardhat-tenderly" "hardhat-gas-reporter" "hardhat-deploy"

Env Setup

Next create a .env file by using the sample.env. Retrieve your information from the relevant sites and input the information where needed in the .env file.

Setup the Frontend

  • First run the frontend on your local server to ensure it's fully functional before building for production.

Install Dependencies

  • Setup and install dependencies
$ cd digipass_frontend

$ npm install

$ npm run dev

Testing the Smartcontract

  • Coverage is used to view the percentage of the code required by tests and unittests were implemented to ensure that the code functions as expected

Coverage Test

  • To test the smartcontract, first open a terminal and run the following command:

  • First install Solidity Coverage

  $ npm i solidity-coverage
  • Add require('solidity-coverage') to hardhat.config.json

  • Install Ganache

  $ npm i ganache-cli
  • Run coverage
$ npx hardhat coverage --network localhost

# if you get errors and you want to trace the error in the terminal
$ npx hardhat coverage --network localhost --show-stack-traces

digipass contractt Address/ Available 2 transaction hash

Tx:

  • 0x1d3d1b3156528b009f9e21b7a0577eddf8e4a73340093ac2aaeb50a652fdb9ab

  • 0x706dbbd31ebbef21b5aedbd044477e23f90e830b9401d6abe590ce8bb9057609

the transaction hashes

source ticket purchaser contract address: sepolia/ Available 2 transanction hash

the transaction hashes

Useful links

View attribution files here

Explainer video (User POV)

WhatsApp.Video.2023-12-10.at.11.36.48.PM.mp4

Demo Video (Clients POV)

firstpart-zculinoq-resized-first.mp4

Contributors

This Project was created by these awesome dedicated members

DigiPass

Contributing to the project

If you find something worth contributing, please fork the repo, make a pull request and add valid and well-reasoned explanations about your changes or comments.

Before adding a pull request, please note:

  • This is an open source project.
  • Your contributions should be inviting and clear.
  • Any additions should be relevant.
  • New features should be easy to contribute to.

All suggestions are welcome!

README Created by Enebeli Emmanuel for DigiPass

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors