Introduction
One of the main features of blockchains is the decentralization: each transaction sent is verified by multiple nodes and its validation process does not rely on a single trusted third party.
In the beginning, the idea of decentralization by using Blockchains only applied to currency transfers. Over time, the scope of decentralization extended beyond just the currency transfers, through innovation in smart contracts: applications could run directly on blockchains, opening the way for more use cases: making the decentralization of applications a reality.
Such applications are called Dapps for Decentralized applications.
They solve the same issues for applications that blockchains solved about banks:
- decentralization: the Dapp logic runs on a distributed computing system (using smart contracts), as opposed to the overwhelming majority of applications that run on centralized private servers (or backend).
- transparency: Dapps are usually open source, meaning that everyone can read and check the source code of the app. Every action performed by its admins can be checked by anyone. Thus, users can more easily trust those applications. In the case of Tezos, everyone can read the Michelson code deployed onto the network.
- history: everyone can read the history of all the transactions.
Dapps are usually composed of two parts:
- Smart contracts deployed onto the Tezos network, containing the Dapp logic (acting as backend). They are the decentralized part of the application.
- An off-chain part: most of the time, it is a UI interacting with the deployed smart contracts. This UI can be a web application, a desktop application, a mobile application, a CLI, etc. The UI can be served from a private server or from a decentralized hosting service like IPFS.
Dapps are first and foremost applications, and should to this end be designed with great care regarding the user experience, performance and scalability. These are the cornerstones necessary for the massive adoption of Dapps.
In other modules, the interactions with deployed smart contracts have been performed with CLIs (Mavkit client for instance) or libraries (PyMavryk). However, these tools are meant for developers and not for the users, who need more user-friendly interfaces. Thus, for each smart contract, a frontend and possibly a backend (containing parts of the business logic) has to be developed to display information from the contract, make contract calls and to interact with off-chain services.
In the Archetype, Ligo and Smartpy modules, we have developed a Raffle smart contract. In this module, we will use the LIGO version of this smart contract to create a Dapp. To do so, we will:
- Interact with a Tezos network using a Javascript library called Taquito. This library interacts with a node, and thus can fetch all kind of information about the network, can make transactions and call smart contracts.
- Discover an in-browser Tezos wallet; Mavryk Wallet; that allows users to manage Mavryk addresses and interact with the Mavryk blockchain safely.
- Learn how to make deployments easier during the Dapp development phase using Taquito.
- Build the UI of the Dapp with React, a Javascript frontend development framework.