SlideShare a Scribd company logo
1 of 20
Muhammad Awais UW-19-CS-BS-086
Usman Khan UW-19-CS-BS-070
Ramish Ayaz Khan UW-19-CS-BS-026
Group Members:
Event Organization
Project title :
We use Remix Etherem IDE to built our
solidity project
IDE:
A blockchain is a distributed database or
ledger shared among a computer network's
nodes. They are best known for their
crucial role in cryptocurrency systems for
maintaining a secure and decentralized
record of transactions, but they are not
limited to cryptocurrency uses.
Blockchains can be used to make data in
any industry immutable—the term used to
describe the inability to be altered.
Block Chain
Event organization on the blockchain! In this
Solidity project, we will be exploring how to use
smart contracts to create a decentralized event
platform that allows for secure and transparent
event organization.
In this project, we will be designing and
implementing a smart contract system that can
handle various aspects of event organization, such
as ticket sales, create new event and transferring
ticket.
In this project there is an organizer and attendee
Organizer cant create new event attendee can buy
tickets and can transfer his/her to some other
attendee
Introduction :
Organizer can create new Event by
adding following data:
• Name
• Price
• Date
• Total ticket count
Organizer
Attendee can buy ticket by providing
following data:
• ID of an event
• Ticket quantity
Attendee can transfer ticket by:
• ID
• Quantity
• Address
Attendee
Implementation
Interface
Organizer
Attendee (Buy Ticket)
Attendee (Transfer Ticket)
Check Tickets
Check Event
Code
//SPDX-License-Identifier: Unlicense
pragma solidity >=0.5 <0.9.0;
contract EventContract {
struct Event{
address organizer;
string name;
uint date;
uint price;
uint ticketCount;
uint ticketRemain;
}
mapping (uint=>Event) public events;
mapping (address=>mapping (uint=>uint)) public tickets;
uint public nextId;
function CreateEvent(string memory name, uint date,uint price, uint ticketCount)
external {
require(date>block.timestamp, "Organize event for future date!");
require(ticketCount>0 , "Generate ticket for event");
events[nextId] = Event (msg.sender,name,date,price,ticketCount,ticketCount);
nextId++;
}
Code
function BuyTicket(uint id, uint quantity) external payable
{
require(events[id].date!=0,"Events does not exis");
require(events[id].date>block.timestamp,"event has already occur");
Event storage _event = events[id];
require(msg.value==(_event.price*quantity),"Ether is not enough");
require(_event.ticketRemain>=quantity,"Not enough tickets");
_event.ticketRemain-=quantity;
tickets[msg.sender][id]+=quantity;
}
Code
function TransferTicket(uint id, uint quantity, address to ) external
{
require(events[id].date!=0,"Events does not exis");
require(events[id].date>block.timestamp,"event has already occur");
require(tickets[msg.sender][id]>=quantity,"Not enough tickets");
tickets[msg.sender][id]-=quantity;
tickets[to][id]+=quantity;
}
}
Any Questions:
Thanks

More Related Content

Similar to Blockchain ppt1.pptx

Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez SacristánEvent Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez SacristánJuan Ignacio Pérez Sacristán
 
Session 3 introduction blockchain by franco 22 januari
Session 3   introduction blockchain by franco 22 januariSession 3   introduction blockchain by franco 22 januari
Session 3 introduction blockchain by franco 22 januariArthur Janse
 
AN IDENTITY MANAGEMENT SYSTEM USING BLOCKCHAIN
AN IDENTITY MANAGEMENT SYSTEM USING BLOCKCHAINAN IDENTITY MANAGEMENT SYSTEM USING BLOCKCHAIN
AN IDENTITY MANAGEMENT SYSTEM USING BLOCKCHAINIRJET Journal
 
Hyperledger Composer
Hyperledger ComposerHyperledger Composer
Hyperledger ComposerRihusoft
 
Ecommerce 27-1.pptx
Ecommerce 27-1.pptxEcommerce 27-1.pptx
Ecommerce 27-1.pptxAkash588342
 
Mind My Value: A decentralised infrastructure for fair and trusted IoT data ...
Mind My Value:  A decentralised infrastructure for fair and trusted IoT data ...Mind My Value:  A decentralised infrastructure for fair and trusted IoT data ...
Mind My Value: A decentralised infrastructure for fair and trusted IoT data ...Paolo Missier
 
Payment card security By Hitesh Asnani SVIT
Payment card security By Hitesh Asnani SVITPayment card security By Hitesh Asnani SVIT
Payment card security By Hitesh Asnani SVIThiteshasnani94
 
Blockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on AzureBlockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on AzureNuri Cankaya
 
OpenID 4 Verifiable Credentials + HAIP (Update)
OpenID 4 Verifiable Credentials + HAIP (Update)OpenID 4 Verifiable Credentials + HAIP (Update)
OpenID 4 Verifiable Credentials + HAIP (Update)Torsten Lodderstedt
 
IRJET - Bit-Contracts: Smart Contracts for Cars
IRJET - Bit-Contracts: Smart Contracts for CarsIRJET - Bit-Contracts: Smart Contracts for Cars
IRJET - Bit-Contracts: Smart Contracts for CarsIRJET Journal
 
How blockchain is changing finance
How blockchain is changing financeHow blockchain is changing finance
How blockchain is changing financeEY
 
Online Voting System Using Blockchain Technology
Online Voting System Using Blockchain TechnologyOnline Voting System Using Blockchain Technology
Online Voting System Using Blockchain TechnologyIRJET Journal
 
OVERVIEW OF SMART CONTRACT & ADOPTION
OVERVIEW OF SMART CONTRACT  &  ADOPTIONOVERVIEW OF SMART CONTRACT  &  ADOPTION
OVERVIEW OF SMART CONTRACT & ADOPTIONLokesh Gupta
 

Similar to Blockchain ppt1.pptx (20)

Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez SacristánEvent Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
 
Blockchain Smartcontracts.pptx
Blockchain Smartcontracts.pptxBlockchain Smartcontracts.pptx
Blockchain Smartcontracts.pptx
 
How to design, code, deploy and execute a smart contract
How to design, code, deploy and execute a smart contractHow to design, code, deploy and execute a smart contract
How to design, code, deploy and execute a smart contract
 
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
 
Session 3 introduction blockchain by franco 22 januari
Session 3   introduction blockchain by franco 22 januariSession 3   introduction blockchain by franco 22 januari
Session 3 introduction blockchain by franco 22 januari
 
AN IDENTITY MANAGEMENT SYSTEM USING BLOCKCHAIN
AN IDENTITY MANAGEMENT SYSTEM USING BLOCKCHAINAN IDENTITY MANAGEMENT SYSTEM USING BLOCKCHAIN
AN IDENTITY MANAGEMENT SYSTEM USING BLOCKCHAIN
 
Crypto box - crypto casino
Crypto box - crypto casinoCrypto box - crypto casino
Crypto box - crypto casino
 
Hyperledger Composer
Hyperledger ComposerHyperledger Composer
Hyperledger Composer
 
Ecommerce 27-1.pptx
Ecommerce 27-1.pptxEcommerce 27-1.pptx
Ecommerce 27-1.pptx
 
Mind My Value: A decentralised infrastructure for fair and trusted IoT data ...
Mind My Value:  A decentralised infrastructure for fair and trusted IoT data ...Mind My Value:  A decentralised infrastructure for fair and trusted IoT data ...
Mind My Value: A decentralised infrastructure for fair and trusted IoT data ...
 
Bringing blockchain to retail
Bringing blockchain to retailBringing blockchain to retail
Bringing blockchain to retail
 
Payment card security By Hitesh Asnani SVIT
Payment card security By Hitesh Asnani SVITPayment card security By Hitesh Asnani SVIT
Payment card security By Hitesh Asnani SVIT
 
Blockchain spreads
Blockchain spreadsBlockchain spreads
Blockchain spreads
 
Blockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on AzureBlockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on Azure
 
OpenID 4 Verifiable Credentials + HAIP (Update)
OpenID 4 Verifiable Credentials + HAIP (Update)OpenID 4 Verifiable Credentials + HAIP (Update)
OpenID 4 Verifiable Credentials + HAIP (Update)
 
IRJET - Bit-Contracts: Smart Contracts for Cars
IRJET - Bit-Contracts: Smart Contracts for CarsIRJET - Bit-Contracts: Smart Contracts for Cars
IRJET - Bit-Contracts: Smart Contracts for Cars
 
Blockchain & microsoft
Blockchain & microsoftBlockchain & microsoft
Blockchain & microsoft
 
How blockchain is changing finance
How blockchain is changing financeHow blockchain is changing finance
How blockchain is changing finance
 
Online Voting System Using Blockchain Technology
Online Voting System Using Blockchain TechnologyOnline Voting System Using Blockchain Technology
Online Voting System Using Blockchain Technology
 
OVERVIEW OF SMART CONTRACT & ADOPTION
OVERVIEW OF SMART CONTRACT  &  ADOPTIONOVERVIEW OF SMART CONTRACT  &  ADOPTION
OVERVIEW OF SMART CONTRACT & ADOPTION
 

Recently uploaded

Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...OnePlan Solutions
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...Neo4j
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)Roberto Bettazzoni
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jNeo4j
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AIAGATSoftware
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfICS
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...drm1699
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Eraconfluent
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAShane Coughlan
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletAndrea Goulet
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConNatan Silnitsky
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfSrushith Repakula
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringPrakhyath Rai
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaNeo4j
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Maxim Salnikov
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckMarc Lester
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksJinanKordab
 

Recently uploaded (20)

Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea Goulet
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements Engineering
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 

Blockchain ppt1.pptx

  • 1.
  • 2. Muhammad Awais UW-19-CS-BS-086 Usman Khan UW-19-CS-BS-070 Ramish Ayaz Khan UW-19-CS-BS-026 Group Members:
  • 4. We use Remix Etherem IDE to built our solidity project IDE:
  • 5. A blockchain is a distributed database or ledger shared among a computer network's nodes. They are best known for their crucial role in cryptocurrency systems for maintaining a secure and decentralized record of transactions, but they are not limited to cryptocurrency uses. Blockchains can be used to make data in any industry immutable—the term used to describe the inability to be altered. Block Chain
  • 6. Event organization on the blockchain! In this Solidity project, we will be exploring how to use smart contracts to create a decentralized event platform that allows for secure and transparent event organization. In this project, we will be designing and implementing a smart contract system that can handle various aspects of event organization, such as ticket sales, create new event and transferring ticket. In this project there is an organizer and attendee Organizer cant create new event attendee can buy tickets and can transfer his/her to some other attendee Introduction :
  • 7. Organizer can create new Event by adding following data: • Name • Price • Date • Total ticket count Organizer
  • 8. Attendee can buy ticket by providing following data: • ID of an event • Ticket quantity Attendee can transfer ticket by: • ID • Quantity • Address Attendee
  • 16. Code //SPDX-License-Identifier: Unlicense pragma solidity >=0.5 <0.9.0; contract EventContract { struct Event{ address organizer; string name; uint date; uint price; uint ticketCount; uint ticketRemain; } mapping (uint=>Event) public events; mapping (address=>mapping (uint=>uint)) public tickets; uint public nextId; function CreateEvent(string memory name, uint date,uint price, uint ticketCount) external { require(date>block.timestamp, "Organize event for future date!"); require(ticketCount>0 , "Generate ticket for event"); events[nextId] = Event (msg.sender,name,date,price,ticketCount,ticketCount); nextId++; }
  • 17. Code function BuyTicket(uint id, uint quantity) external payable { require(events[id].date!=0,"Events does not exis"); require(events[id].date>block.timestamp,"event has already occur"); Event storage _event = events[id]; require(msg.value==(_event.price*quantity),"Ether is not enough"); require(_event.ticketRemain>=quantity,"Not enough tickets"); _event.ticketRemain-=quantity; tickets[msg.sender][id]+=quantity; }
  • 18. Code function TransferTicket(uint id, uint quantity, address to ) external { require(events[id].date!=0,"Events does not exis"); require(events[id].date>block.timestamp,"event has already occur"); require(tickets[msg.sender][id]>=quantity,"Not enough tickets"); tickets[msg.sender][id]-=quantity; tickets[to][id]+=quantity; } }