affondra

module
v0.0.0-...-ab1d363 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2020 License: MIT

README

Affondra

version Go Report Card

Affondra is a blockchain application using cosmos-sdk that anyone can use when trading NFT items. Users can sell their NFT item peer to peer, and the person who introduce the items can earn affiliate reward in Affondra market.

Implementation

Completed

✔ basic blockchain functions
✔ issue NFT token
✔ create Item based on NFT
✔ update Item infomation
✔ buy Item
✔ affiliate system
✔ faucet system
✔ web wallet

Firstly, watch Demo!

API Endpoint (Swagger)

You can refer to the api endpoint of Affondra module and NFT module.
View in Swagger Hub.

System Architecture

  1. Develop Affondra blockchain application with Starport.
  2. Use Firebase Hosting to host Vue application.
  3. Use Firebase storage to keep item images that users uploaded.
  4. Use Firebase cloud functions to set a faucet function. The faucet account mnemonic keys are stored in the cloud service so that users can get faucet with no time and try our product quickly.
  5. Nginx is used for load balancing and cors setting. It seems that rest server won't response to OPTIONS method request so we proxy frontend request using Nginx server.
  6. Affondra module is originally created to trade NFT, to motivate affliate, and to certify correct payment.

Install

affondrad & affondracli

requirement Go 1.15+ is required for the Cosmos SDK.

$ git clone github.com/EG-easy/affondra.git
$ cd affondra && git checkout -b [branch] tags/[latest release tag]
$ make

Try affondracli version and affondrad version to verify everything is OK!

Initialize configuration files and genesis file

Just use shell scripts bellow.

$ sh scripts/start.sh

Now let's start!

$ affondrad start

Play with CLI

Mint NFT

Firstly, you need to mint(or receive) a NFT. When creating NFT, you can modify the denom, nft id, description, tokenURI.

$ affondracli tx nft mint your-favorite-denom random-nft-id $(affondracli keys show -a user1) --tokenURI http://metadata.com --from user1 -y
Create Item

Now you have a NFT and you can sell it as a Item in the Affondra trading market. Just set the price you want to sell and affiliate reward for those who promote your item.

$ affondracli tx affondra create-item your-favorite-denom random-nft-id 1000affondollar 10affondollar This item is Awesome! true --from=user1 -y
Buy Item

Now your friend A introduces the item to your friend B, and friend B bought the item with the command below. Then you will get 990affondollar and your friend will get 10affondollar as a affiliate reward, and B will successfully receive the NFT from you.

$ affondracli tx buy-item random-nft-id B'address A'address --from B -y

Presentation

1 2 3 4 5 6 7 8 9 10 11 12

License

Licensed under the MIT.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL