Inspiration

Been a part-time full-stack dev and involved in a couple of other blockchain projects that support Rust smart contracts. And most of them involved NFT projects. Therefore, I’ve been looking for what other real-world use cases could NFT be besides just art.

Attended one of the NEAR spaces on Twitter during this hackathon period and got the idea of how NFT could be used for ticketing. Yes, that is very true, NFT is genuinely owned by the buyer once it’s purchased or minted into their wallet and the image of the NFT can be stored on decentralised storage such as Arweave permanently.

NFT ticketing will help solve a number of issues faced by traditional event ticketing, just to name a few, such as bulk buyers buy in bulk and sell in secondary market for much higher price and buyers are unable to identify what they’ve purchased are genuine tickets.

The genuineness and uniqueness of NFT ticket can have many use cases such as event tickets, member passes, for lucky draw & jackpot, just to name a few.

My experiences with other blockchain NFT projects tell me that launching NFT project will involve some technical or dev works such as configuring some GitHub repos for generating images and deploying the NFT smart contracts etc.

Therefore, I came out with this idea - to develop an online tool that allows event organisers to easily create their events and launch their branded ticket sales landing page in just few minutes.

What it does

TicketMaker is an easy-to-use online no-code tool which lets any event organisers or businesses to create their events and the collection of NFT tickets and start selling them in just minutes.

Event organisers will just need to sign in with their NEAR wallet, setup profile and create their own-branded events by providing information such as name, logo, dates, venue etc and choose from one of the ticket templates for the ticket’s appearance. And also choose from the templates how their sales landing page is going to look like.

Terms & conditions such as total number of tickets, max ticket per wallet, the ticket starting number and the status if it’s ready for sales etc can be set and be controlled by the smart contracts automatically.

Once a ticket is purchased or minted by a buyer into their wallet, the image will be generated and stored permanently on Arweave. Below is the architecture overview:

The architecture overview of TicketMaker

Other features include allowing event organisers to view their sales of tickets in the Dashboard and the customers in the Customer section.

How I built it

The early phase when I just joined this hackathon was having some research, deploying, testing and experimenting with NFT on the NEAR blockchain based on one of the NFT smart contract examples and also learned and experimented with the cross-contract calls on NEAR.

For this project,

I developed the web3 front-end based on React/TypeScript, Ant Design UI components, NEAR Api JS, Near Wallet Selector. I chose TypeScript instead of JavaScript as I’m more used to developing with TypeScript with my past experiences.

And also developed the front-end component for handling HTML 5 canvas image generation for ticket templates and developed and experimented with components for uploading images to IPFS and Arweave. Finally, Arweave is chosen due to it allows image to be stored permanently.

I developed a few Rust smart contracts which break down as follows:

  1. The users contract (test_tm_users_contract.testnet) - which is the main contract that handles the user signup and profile management, verifications, payment and refund handling, the deployment of the NFT minting contract for an event’s ticket collection and make cross-contract calls to other functionalities of the system.
  2. The collection contract (test_tm_collections_contract.testnet) - which stores the information and parameters of the event and its ticket collection and check against some constraints or parameters based on what have been defined in the collection's smart contract when a ticket is minted.
  3. The NFT minting contract - an NFT contract which implements all the required NFT traits (approval, core and enumeration, metadata) to be deployed by the users contract when each event/ticket collection is created by the event organiser.
  4. The ticket mints contract (test_tm_ticket_mints_contract.testnet) - a contract to record the minted tickets and who minted them on chain, cross-contract called by collection contract. This will be expanded to provide cross-contract call or API call in the future for a ticket to be used for checking in or to mark the ticket as used etc.

Although NEAR allows the development of smart contracts by the use of JavaScript only, but I chose to use Rust due to the experiences in Rust on other blockchains such as Solana and CosmWasm and it’s an opportunity to learn more in-depth about it on the NEAR blockchain.

And I love the composability with cross-contract calls on the NEAR blockchain.

And NEAR provides a great CLI tool making it easier to deploy and test the smart contracts which you can ensure the smart contracts work the right way before integrating with the web front end.

I developed a simple API based on Node/ExpressJS for mapping the long URL to a short one for a more meaningful and shorter url for each ticket sales landing page.

Challenges I ran into

The NEAR blockchain was completely new to me but my experiences with Solana & CosmWasm and also some of the helpful Pagoda docs do help a lot to kickstart.

Time management is the main challenge as I developed this as a part time while having to handle my daytime works.

And when I dive more into NEAR echo system, more ideas to come into mind but having to settle down what to be included in just an MVP version of it.

Having to handle both the front-end UI/UX, design and backend coding isn’t an easy task.

Accomplishments that I’m proud of

Having built an MVP version of the TicketMaker which a live demo is available on https://ticketmaker.xyz on the NEAR Testnet.

What I learned

I learned a lot with the NEAR blockchain including developing, deploying smart contracts, making cross-contract calls and the NEAR CLI, the NEAR API JS, storage staking etc but still a lot to learn.

What's next for TicketMaker

Roadmap :

  • Improvement of the UI/UX of the front-end and a launch of the MVP version on the main net and marketing
  • Develop more ticket and sales page templates
  • Add features or tools for custom ticket and sales page template designs etc
  • Develop features for allowing event organisers to airdrop tickets to customers.
  • Allow the sales of tickets in stable coin such as USDT
  • Develop a ticket marketplace
  • Develop a system allowing the minted tickets to be consumed by other systems or applications by API or cross contract calls etc.
  • Develop the mobile version
Share this project:

Updates