This tutorial shows you how to create a web application that interacts with the Tezos blockchain to mint non-fungible tokens (NFTs). NFTs are unique digital assets that can represent art, collectibles, or virtually any kind of digital content on the blockchain. Specifically, this application will be the user-facing web front end for a smart contract that performs operations such as mint.
You will learn:
- How to call a smart contract from a web application
- How to connect to a user's wallet
- How to mint NFTs on behalf of a user
Before start creating this dApp, we will need a wallet and some ghostnet tez(ꜩ).
The smart contract
The backbone of this application is the smart contract deployed on the Tezos blockchain. The contract we'll be using is already deployed and is written in SmartPy. It defines the rules and processes for interactions with the Tezos blockchain, such as minting NFTs. All you need to do is integrate it into your web app.
The tutorial application
In this tutorial, you build a web application that allows users to mint NFTs via the smart contract. The interface of the application will look like this:
The application can perform many individual actions, including:
- Connecting and disconnecting users' wallets
- Displaying users' information, including their wallet address and tez balance
- Allowing users to mint NFTs on the Tezos blockchain
- Vite (pronounced like veet) to bundle the application and provide the libraries to the user's browser
Also, to access the user's wallet and run transactions on Tezos, the application uses these libraries:
You can see the completed tutorial application here: https://github.com/trilitech/tutorial-applications/simple-nft-svelte
When you're ready, move to the next section to begin setting up the application.