Home

Awesome

FA2 Contracts Implementation

This repository contains multiple sub-projects implementing different flavors of the FA2 token standard.

Shared LIGO code

shared directory contains common code shared by all sub-project. The FA2-related LIGO artifacts are:

Sub-Projects Structure

The sub-projects symlink shared code into their respective directories. Each sub-project has ligo directory that contains all LIGO-related files:

The design of each FA2 contract follows the same pattern and consists of the following source files:

Implemented FA2 Contracts

single_asset

fa2_single_asset.mligo implementation of the FA2 contract that supports single fungible tokens (a.k.a ERC-20).

fa2_single_asset_with_hooks.mligo implementation of the FA2 contract that supports single fungible tokens (a.k.a ERC-20) and sender/receiver hooks.

fa12_lorentz.tz implementation of the FA1.2 contract that supports single fungible tokens (a.k.a. ERC-20).

multi_asset

fa2_multi_asset.mligo implementation of the FA2 contract that supports multiple fungible tokens (a.k.a. ERC-1155).

fa2_granular_multi_asset.mligo implementation of the FA2 contract that supports multiple fungible tokens (a.k.a. ERC-1155) that allows pausing/un-pausing transfers on individual tokens.

fa2_hooks

fa2_multi_asset.mligo implementation of the FA2 contract that supports multiple fungible tokens (a.k.a. ERC-1155) and sender/receiver hooks.

nft_asset

fa2_nft_asset.mligo implementation of the NFT FA2 contract (a.k.a. ERC-721). The contract supports multiple "families" of NFT tokens that share the same token metadata.

collectibles

fa2_fixed_collection_asset.mligo implementation of the fixed collection of NFT tokens (a.k.a. ERC-721). The FA2 contract is originated with the predefined set of NFT tokens. Tokens cannot be minted or burned.

fractional

fractional_dao.mligo implementation of DAO that manages fractional ownership of NFT tokens. The DAO is the owner of an NFT token in the corresponding FA2 NFT contract and also manages fractional ownership fungible token for each owned NFT. Holders of the linked ownership fungible tokens can vote (directly or using signed permit) on transfer of the NFT token to some other address.

generic_fractional_dao

fractional_dao.mligo implementation of a generic fractional DAO user fractional voting to control any generic operation represented by a lambda function. Such lambda can transfer tokens, buy/sell tokens on market place or auction or perform any other generic operation. Fractional ownership is controlled by allocation of the ownership fungible token managed by the DAO. The DAO itself is a FA2 contracts that supports standard FA2 API to manage the ownership token.