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
Each event launches its own RealTicket.sol smart contract with the following variables:
price
: ticket pricingfee
: transaction feecapacity
: event capacitymanager role
: which is able to modify the event settings (price, fee, capacity, pause sales) and mint new ticketsbouncer 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 accountERC721Burnable
: a ticket may be burnt by its rightful ownerERC721Pausable
: a manager role may pause ticket salesERC721Status
: a ticket has one of the following status: READY, BOUNDED, USED, BLOCKED
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
RealTicket Contracts are released under the MIT License.
brew install nvm
nvm install 14
nvm use 14
brew install npm
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
echo MNEMONIC > .secret
echo INFURA_HEY > .infuraId
echo ALCHEMY_HEY > .alchemyId
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
truffle migrate --network mumbai --reset
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