Skip to content

RealTicket is a non-fungible ticket. It’s paperless, unique and fully owned by the end user. 
Each ticket has its own artsy image generated by a given prompt.

License

Notifications You must be signed in to change notification settings

LokaHQ/labs-realticket-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RealTicket Smart Contracts

ERC-721 EIP-721 OpenZeppelin

RealTicket is the NFT ticketing platform to replace all others

The tickets live on the Polygon network, a decentralised Ethereum scaling platform

This smart contract extend the ones provided by the openzeppelin library

They were developed using the npm package Truffle for nodejs

Overview

Each event launches its own RealTicket.sol smart contract with the following variables:

  • price: ticket pricing
  • fee: transaction fee
  • capacity: event capacity
  • manager role: which is able to modify the event settings (price, fee, capacity, pause sales) and mint new tickets
  • bouncer role: which is able to change the status of a given ticket

It extends the base ERC721 standard with:

  • ERC721Enumerable: enumerate tokens owned by a given account
  • ERC721Burnable: a ticket may be burnt by its rightful owner
  • ERC721Pausable: a manager role may pause ticket sales
  • ERC721Status: a ticket has one of the following status: READY, BOUNDED, USED, BLOCKED

Contribute

There is still a lot of work ahead and we invite the community to contribute and take this vision a step further. A few things that we would like to pursue as next steps are:

  • We must accept any token as payment method, specially stable coins which can be used to provide a steady pricing
  • An event should include several ticket types with different prices and permissions
  • A bouncer may only change the ticket status with a signature given by the tickets rightful owner

License

RealTicket Contracts are released under the MIT License.

Learn More

Setup

Install npm on MacOS

brew install nvm
nvm install 14
nvm use 14
brew install npm

Install npm packages

npm install -g truffle
npm install -g ganache-cli
npm install -g solc
npm install truffle-flattener -g
npm install @openzeppelin/contracts
npm install @truffle/hdwallet-provider

Add secrets

echo MNEMONIC > .secret
echo INFURA_HEY > .infuraId
echo ALCHEMY_HEY > .alchemyId

Truffle Steps

Useful commads

truffle init
truffle create contract RealTicket
truffle create contract ERC721Status
truffle compile

truffle create test RealTicket
truffle test

truffle create migration RealTicket
ganache-cli
truffle migrate

Deploy smart contracts

truffle migrate --network mumbai --reset

Verify on etherscan

truffle-flattener contracts/RealTicket.sol > merged.sol
echo "// SPDX-License-Identifier: MIT" > compiled.sol
grep -v -w SPDX-License-Identifier merged.sol >> compiled.sol
rm merged.sol
https://ropsten.etherscan.io/verifyContract

Useful Links

About

RealTicket is a non-fungible ticket. It’s paperless, unique and fully owned by the end user. 
Each ticket has its own artsy image generated by a given prompt.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published