/cnft-framework

Cardano NFTs framework. Can be used to generate tokens, mint, API for the sales, etc.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

CNFT Framework

This is a Cardano NFT framework used to generate NFT's, upload NFTS, mint and send them over Cardano network, an API for the high-demand sale event.

It's scope

The cworker's responsibility is to automate the actions required to happen on the Cardano Blockchain.

  • Receive the payment
  • Record the payment is received
  • Mint a token and send a response to the original payment sender
  • Record the minting and a response were succesfully sent

Extended scope

There are lots of useful scripts residing in tools folder that can be helpful to mass-generate X amount of tokens and upload them to IPFS

Dirty

This project is not properly cleaned up.

It is a proven platform that was used by CryptoDoggies, if you're an experienced developer using it may save you weeks of time. In this case, do not hesitate to do merge requests as you go through and generalize it to fit all sort of CNFT projects.

Install

Update pip to latests

sudo apt-get install python3-setuptools
pip3 install --upgrade pip

Optional install cython

pip3 install cython

Need postgres installed

sudo apt install postgresql-common
sudo apt install libpq-dev

Install memcached

sudo apt-get install memcached libmemcached-dev zlib1g-dev

Install RabbitMQ

https://www.rabbitmq.com/install-debian.html#apt

Then install python deps.

pip3 install -r requirements.txt

Setup

If you get error ShelleyTools has no run_cli method, then install it from the git repository (we're dealing with the bleeding edge technology here)

pip3 install --upgrade git+https://gitlab.com/viper-staking/cardano-tools.git

How to start webserver

  • Have uwsgi installed.
  • Switch to python_src dir
  • Run uwsgi --http :8090 --wsgi-file app.py --processes 1

How to start worker

  • need to execute cardano_worker.create_keys() first.
  • Then backup the keys
  • Change the minting and storage addresses in .env file
  • python3 launch_c_worker.py