In the realm of blockchain, the term “token” denotes a type of digital asset. Tokens can represent a plethora of assets or utilities within a particular ecosystem, ranging from native currencies of a blockchain to ownership rights in a digital or physical asset.
Fungible tokens are interchangeable with each other. Consider them as identical items in a blockchain network, each having the same value. This feature closely aligns with traditional currencies where every unit holds an identical value to any other unit. Cryptocurrencies like Bitcoin (BTC), Ether (ETH), and even Tezos (XTZ) are all examples of fungible tokens. You can freely exchange one Bitcoin for another without any loss of value or difference in utility.
Semi-Fungible tokens are a hybrid, offering the best of both fungible and non-fungible tokens. They’re fungible within their class (like tickets for a specific concert) but non-fungible when compared across classes (a concert ticket is not interchangeable with a football match ticket). They provide the flexibility needed in many real-world scenarios, like ticketing and certain types of games.
Non-Fungible Tokens (NFTs), on the other hand, represent unique assets. Unlike fungible tokens, NFTs are distinguishable from each other, with each token holding a unique value. They’re akin to collectibles, where each item has a unique characteristic, and hence, non-replaceable. This uniqueness has led to the rise of NFTs in areas like digital art, music, and virtual real estate, where each piece, song, or property is unique and holds individual significance. Read more: What are NFTs?
In the Tezos blockchain platform, tokens standards are primarily classified into three categories: FA1, FA1.2, and FA2. These standards are part of the Tezos Interoperability Proposal (TZIP) documents here.
Tezos Interoperability Proposals (TZIPs)
TZIP (pronounced "tee-zip") stands for Tezos Interoperability Proposal, which are explanations of how the Tezos blockchain can be enhanced with new and modern standards and ideas, such smart contract requirements.
FA1 was the initial Tezos token standard, essentially serving as a minimal version of a ledger. It aimed to map identities to balances, providing a mechanism for interacting with fungible assets for contract developers, libraries, client tools, and others. However, there is no mandatory inheritance among Tezos token standards, and as such, all subsequent standards don’t need to maintain compatibility with FA1. This standard has since been deprecated.
The FA1.2 standard combines elements of the FA1 standard and the EIP-20 standard utilized in Ethereum. Its defining feature is the ability to approve the spending of tokens from other accounts, though it exclusively applies to fungible tokens. When implementing a token using the FA1.2 standard, you need to include the following entry points in its interface:
While the FA1.2 standard does not restrict developers from incorporating additional functionalities into the token contract. For instance, the SmartPy template of FA1.2 includes supplementary entry points for activities such as minting and burning tokens, and governance management.
The FA2 standard, the most recent Tezos token standard, provides more flexibility and supports multiple types of assets, accommodating both fungible and non-fungible tokens. It’s crucial to understand that FA2 is not a direct successor to FA1.2, given the following distinctions:
Now that we’ve delved deeper into these Tezos token standards, we are ready to move on to the practical part of the course. As the FA1 standard is already obsolete, we will center our focus on the FA1.2 and FA2 standards moving forward. In the next lessons, we will learn how to write a smart contract that can interact with both FA1.2 and FA2 standards.
In this course, we’ll primarily focus on the FA1.2 token standard. We will guide you through the creation of an FA1.2 token contract, allowing you to mint your token, add administrative controls, and extend the contract with custom functionalities.
As we proceed, we will delve into the specifics of the FA1.2 contract and expand it with minting, burning, pausing, and other features. By the end of this course, you’ll have a comprehensive understanding of the process and mechanics behind creating a fungible token on the Tezos blockchain.
Keep in mind, tokenization on Tezos and, indeed, blockchain as a whole can seem challenging at first. But with time and practice, you’ll start to unravel the intricacies and see the potential in these digital assets. So, let’s buckle up and delve deeper into the fascinating world of tokenization on Tezos!
As we did for the first course, we are going to use SmartPy and below here you can find a quick intro on it and how it works!
To create smart contracts on Tezos, we use a language called SmartPy. SmartPy is a Python library to develop smart contracts for the Tezos blockchain. It is an intuitive and effective language for expressing contracts and their associated test scenarios.
The most notable feature of SmartPy is its integration with Python, which is one of the world’s most popular and fastest-growing programming languages. If you’re already familiar with Python, you will find SmartPy quite easy to pick up.
SmartPy includes a full-featured Integrated Development Environment (IDE) accessible from your web browser. Go to the SmartPy IDE to start writing your first smart contract.
In the realm of blockchain, the term “token” denotes a type of digital asset. Tokens can represent a plethora of assets or utilities within a particular ecosystem, ranging from native currencies of a blockchain to ownership rights in a digital or physical asset.
Fungible tokens are interchangeable with each other. Consider them as identical items in a blockchain network, each having the same value. This feature closely aligns with traditional currencies where every unit holds an identical value to any other unit. Cryptocurrencies like Bitcoin (BTC), Ether (ETH), and even Tezos (XTZ) are all examples of fungible tokens. You can freely exchange one Bitcoin for another without any loss of value or difference in utility.
Semi-Fungible tokens are a hybrid, offering the best of both fungible and non-fungible tokens. They’re fungible within their class (like tickets for a specific concert) but non-fungible when compared across classes (a concert ticket is not interchangeable with a football match ticket). They provide the flexibility needed in many real-world scenarios, like ticketing and certain types of games.
Non-Fungible Tokens (NFTs), on the other hand, represent unique assets. Unlike fungible tokens, NFTs are distinguishable from each other, with each token holding a unique value. They’re akin to collectibles, where each item has a unique characteristic, and hence, non-replaceable. This uniqueness has led to the rise of NFTs in areas like digital art, music, and virtual real estate, where each piece, song, or property is unique and holds individual significance. Read more: What are NFTs?
In the Tezos blockchain platform, tokens standards are primarily classified into three categories: FA1, FA1.2, and FA2. These standards are part of the Tezos Interoperability Proposal (TZIP) documents here.
Tezos Interoperability Proposals (TZIPs)
TZIP (pronounced "tee-zip") stands for Tezos Interoperability Proposal, which are explanations of how the Tezos blockchain can be enhanced with new and modern standards and ideas, such smart contract requirements.
FA1 was the initial Tezos token standard, essentially serving as a minimal version of a ledger. It aimed to map identities to balances, providing a mechanism for interacting with fungible assets for contract developers, libraries, client tools, and others. However, there is no mandatory inheritance among Tezos token standards, and as such, all subsequent standards don’t need to maintain compatibility with FA1. This standard has since been deprecated.
The FA1.2 standard combines elements of the FA1 standard and the EIP-20 standard utilized in Ethereum. Its defining feature is the ability to approve the spending of tokens from other accounts, though it exclusively applies to fungible tokens. When implementing a token using the FA1.2 standard, you need to include the following entry points in its interface:
While the FA1.2 standard does not restrict developers from incorporating additional functionalities into the token contract. For instance, the SmartPy template of FA1.2 includes supplementary entry points for activities such as minting and burning tokens, and governance management.
The FA2 standard, the most recent Tezos token standard, provides more flexibility and supports multiple types of assets, accommodating both fungible and non-fungible tokens. It’s crucial to understand that FA2 is not a direct successor to FA1.2, given the following distinctions:
Now that we’ve delved deeper into these Tezos token standards, we are ready to move on to the practical part of the course. As the FA1 standard is already obsolete, we will center our focus on the FA1.2 and FA2 standards moving forward. In the next lessons, we will learn how to write a smart contract that can interact with both FA1.2 and FA2 standards.
In this course, we’ll primarily focus on the FA1.2 token standard. We will guide you through the creation of an FA1.2 token contract, allowing you to mint your token, add administrative controls, and extend the contract with custom functionalities.
As we proceed, we will delve into the specifics of the FA1.2 contract and expand it with minting, burning, pausing, and other features. By the end of this course, you’ll have a comprehensive understanding of the process and mechanics behind creating a fungible token on the Tezos blockchain.
Keep in mind, tokenization on Tezos and, indeed, blockchain as a whole can seem challenging at first. But with time and practice, you’ll start to unravel the intricacies and see the potential in these digital assets. So, let’s buckle up and delve deeper into the fascinating world of tokenization on Tezos!
As we did for the first course, we are going to use SmartPy and below here you can find a quick intro on it and how it works!
To create smart contracts on Tezos, we use a language called SmartPy. SmartPy is a Python library to develop smart contracts for the Tezos blockchain. It is an intuitive and effective language for expressing contracts and their associated test scenarios.
The most notable feature of SmartPy is its integration with Python, which is one of the world’s most popular and fastest-growing programming languages. If you’re already familiar with Python, you will find SmartPy quite easy to pick up.
SmartPy includes a full-featured Integrated Development Environment (IDE) accessible from your web browser. Go to the SmartPy IDE to start writing your first smart contract.