Giter Site home page Giter Site logo

tezosmiami / nft-factory-cameligo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ligolang/nft-factory-cameligo

0.0 0.0 0.0 188 KB

Exemple of a NFT Factory contract in CameLIGO

License: MIT License

Shell 0.43% TypeScript 3.25% Makefile 5.28% LigoLANG 91.04%

nft-factory-cameligo's Introduction

Contract VIN (Vinus In Numeris)

This contract implements a factory of FA2 NFT. Each FA2 contract represents a collection of wine bottles. Wine bottles are represented by tokens inside a FA2 contract. When originating a collection of bottle,

  • the creator must specify a collection name and a QR code for each bottle.
  • the creator owns all bottles of the collection

The creator of the collection can also add new bottles to his collection anytime (with the Mint entrypoint)

A bottle owner can transfer one or more bottle to someone else (with the Transfer entrypoint)

A collection of bottles is represented by a FA2 contract. The implementation of the FA2 introduces:

  • a admin address on the storage which represents the creator of the FA2 contract
  • a Mint entrypoint that allows the creator of the FA2 to create new tokens inside the NFT contract
  • a token_usage map that count the number of transfer of a bottle
  • a token_usage view for retrieving the number of transfer of a bottle (for a given token_id)

An extra Marketplace smart contract has been provided to illustrate how to make a secondary market on these Nft. The Marketplace contract allows Nft owners to sell their wine bottles on a secondary market. The Marketplace contract allows users to accept a sell proposal. The Marketplace smart contract is not meant for production purpose.

Compilation

A makefile is provided to compile the "Factory" smart contract, and to launch tests.

cd src/cameligo/
make compile
make test

Tests

A makefile is provided to launch tests.

cd src/cameligo/
make test

Deployment

A typescript script for deployment is provided to originate the smart contrat. This deployment script relies on .env file which provides the RPC node url and the deployer public and private key.

cd src/cameligo
make deploy

nft-factory-cameligo's People

Contributors

frankhillard avatar d-plaindoux avatar oteku 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.