A FA2 contract with nft, single asset & multi asset contracts

Built by ligoLANG <https://ligolang.org/>License MIT0 download


ligo install @ligo/fa  


LIGO-FA (tokens)

ligo-fa is a collection of FA2 (TZIP-12) implementations written in LIGO

It provides 3 types of asset contracts:

  1. NFT: This contract implements the FA2 interface for NFT(non-fungible-token) where a token can belong to only one address at a time (1:1)
  2. Single Asset./lib/fa2/asset/single_asset.mligo): This is an implementation of Single Asset Token where a different amount of single token can belong to multiple addresses at a time (1:n)
  3. Multi Asset: This is an implementation of Multi Asset Token where there are many tokens (available in different amounts) and they can belong to multiple addresses (m:n)


To compile the contracts to Michelson , run

make compile


A makefile is provided to launch tests.

$ make test

The tests are available in ./test/fa2 directory, there is also an example of mutation testing


A TypeScript program for deployment is provided to originate the smart contract. This deployment script relies on .env file which provides the RPC node url and the deployer public and private key. (example .env file)

$ make test


  1. To install this package, run ligo install ligo-fa.
  2. In order originate the FA2 contracts from another contract you can use the CREATE_CONTRACT Michelcon instruction like this
    let create_my_contract : lambda_create_contract =
        [%Michelson ( {| { 
                UNPAIR ;
                UNPAIR ;
    #include \"@ligo/fa/compiled/fa2/nft/NFT_mligo.tz\"
                PAIR } |})] in

Enquired audits

fetching audit