1.0.4 • Published 2 years ago

tezos-ligo-fa2 v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

LIGO-FA (tokens) DEPRECATED This package has been moved to LIGO registry

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)

Development

To compile the contracts to Michelson , run

make compile

Tests

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

Deploy

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

Usage

  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 ;
                CREATE_CONTRACT 
    #include "ligo-fa/compiled/fa2/nft/NFT_mligo.tz"  
                ;
                PAIR } |})] in
    ...
1.0.4

2 years ago

1.0.2

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago