Giter Club home page Giter Club logo

smart-contracts's Introduction

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:

  • symlinked shared common code.
  • src directory with the LIGO implementation of the particular FA2 contract(s).
  • out directory with the contracts compiled to Michelson.

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

  • fa2_xxx_token.mligo - implementation of the FA2 entry points and FA2 core logic.
  • token_manager.mligo - implementation of mint, burn, create token(s) entry points.
  • fa2_xxx_asset.mligo - assembly of different modules into a complete FA2 contract. The assembly includes FA2 entry points and core logic (fa2_xxx_token.mligo), mint/burn entry points (token_manager.mligo) and the administrator entry points (shared/fa2_modules/simple_admin.mligo).

Implemented FA2 Contracts

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).

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_multi_asset.mligo implementation of the FA2 contract that supports multiple fungible tokens (a.k.a. ERC-1155) and sender/receiver hooks.

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.

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_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.

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.

smart-contracts's People

Contributors

emishur avatar michaeljklein avatar ricklove avatar jacobarluck avatar weaverine avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.