Skip to content

Tezket v1 -- "Tezos Ticket", Backend operator -- Mint NFT ticket (Tezos Smartcontract).

License

Notifications You must be signed in to change notification settings

ubinix-warun/nft-tezket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NFT-Tezket v1

Tezket -- "Tezos Ticket", Backend operator -- Mint NFT ticket (Tezos Smartcontract)., MIT LICENSE

System Architecture

Version 2 -- Revision by TezKet

Version 1

  1. rn-tezket -- ReactNative app, Buy NFT ticket and use QR to control admittance at the gate.
  2. nft-tezket -- Backend operator, Mint NFT ticket (Tezos Smartcontract).

Demo

Setup Smartcontract & Config Backend

1. Deploy "NTFS_contract" (FA2) on Ithacanet.

nvm use v16.14.0
npm install
node ./script/build.js     # pls, install ligo compiler.
node ./script/deploy.js

node ./script/activateAccounts.js # (optional) use faucet1.json for deployer.

2. Config Pinata's ApiKey on backends/PinataKeys.ts

export default {
  apiKey: "XXXXXXXXXXXXXXXX",
  apiSecret: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
};

3. Run Backend operators

npm run start
npm run dev      # dev mode!

Add New Ticket and Customize Template.

  • New file on ticket folder.
- ticket/*
   \ New Ticket Type (json) 
- image
- mint/qr
  • Edit ticket/new-ticket-type.json.
{
    "name": "The Garden City",
    "baseimg": "image/1234_SQ1",
    "tag": "1 DAY PASS",
    "keyword": "The Silicon Valley of India.",
    "description": "Bengaluru (also called Bangalore) is the center of India's high-tech\nindustry. The city is also known for its parks and nightlife.",
    "timepref": "Vaild in 22/07/2022",
    "render": "SQ1QR"
}
  • Patch API '/mint' with new-render-type or use defaults "SQ1QR".
    else if(mintTicket.render == "new-ticket-type") {

  • (optional) Customize ticket-template with SVG.
      const svgImage = `
        <svg width="${width}" height="${height}">
          <style>
          .ticketName { fill: #001; font-size: 25px; font-weight: bold;}
          .ticketMeta { fill: #001; font-size: 15px; font-weight: bold;}
          </style>
          <rect width="100%" height="100%" fill="white" />
                ...
                
          <text x="22" y="608" text-anchor="left" class="ticketMeta">MINT DATE: ${timestamp}</text>
       </svg>
       `;
  • Edit new ticket type on src/screens/Tickets.tsx. rn-tezket
export const TicketList: TicketInfo[] = [
  ...
];

Credit

About

Tezket v1 -- "Tezos Ticket", Backend operator -- Mint NFT ticket (Tezos Smartcontract).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published