Try โ€‚โ€‰HackMD

Knowlege - Learning about Token standards

Standard tokens in Tezos

FA1.2 and FA2 are standards token in Tezos. Token standards are a set of rules that ensure smooth interactions between different contracts operating with tokens.

Token standards in Tezos are described in the Tezos Interoperability Proposal (TZIP) documents.

Among other TZIPs, token standards are identified as Financial Applications (FA).
There are 3 version of FA Tezos token standards:

  • FA1 (TZIP 5 Abstract Ledger), this is already deprecated.
  • FA1.2 (TZIP 7 Approvable Ledger)
  • FA2 (TZIP 012 Multi-Asset Interface)

FA1 - Abstract Ledger

Main purpose was to:

  • map identities to balances
  • provide interactions with fungible assets for contract developers, libraries, client tools, etc.

For FA1, parameter should contain the following leaves:

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More โ†’

So this standard has views: getBalance, getTotalSupply

Example:

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More โ†’

NOTE: the view terminology here is a callback views, it is different than an on-chain views.

FA1.2 - Approvable Ledger

FA1.2 refers to an ERC20-like fungible[1].

The key of this standard is:

  • the ability to approve the spending of tokens from other accounts.
  • This standard can only be used for fungible tokens

Implementation:

  • You must include all the following entry points in its interface.
    2 regular methods and 3 views methods:
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More โ†’

FA1.2 allow developers extending the token contract with additional functionality. For example, this SmartPy template contract has additional entry point for: minting, burning tokens, governance management, etc.

Limitations (mentions only views, a full list can be found at this article):

  • View methods are just the methods that return operations (fake views: views are methods with callback)

FA2 - Multi-Asset Interface

It is not a direct heir of FA1.2.

Specification:

  • FA2 supports multiple assets.
  • Token transfer permissions in FA2:
    • permission can be granted using the update_operators entry point.
    • an operator is an address that can create transactions on behalf of the owner (whose address already stores tokens).
  • The interface includes the following necessary entry points:
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More โ†’

Limitations:

  • View methods are just the methods that return operations (fake views: views are methods with callback).
  • There are no views for supply metrics

Question:

  • Then what is the true views? (True views is integrate it in a new token standard but integrating it into the existing infrastructure seems to be too tricky)

Summary

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More โ†’

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More โ†’


  1. 3 common types: Fungible (equal to each other, can be used as currency). Semi-fungible (unique, although they might seem to be similar and even have the same cost0, non-fungible (NFT, completely unique and non-interchangable tokenized objects) โ†ฉ๏ธŽ