Skip to content
/ affondra Public
forked from EG-easy/affondra

P2P NFT trading market based on cosmos-sdk

License

Notifications You must be signed in to change notification settings

Osub/affondra

 
 

Repository files navigation

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 "AFFONDRA Presentatoin" 2 "AFFONDRA Presentatoin" 3 "AFFONDRA Presentatoin" 4 "AFFONDRA Presentatoin" 5 "AFFONDRA Presentatoin" 6 "AFFONDRA Presentatoin" 7 "AFFONDRA Presentatoin" 8 "AFFONDRA Presentatoin" 9 "AFFONDRA Presentatoin" 10 "AFFONDRA Presentatoin" 11 "AFFONDRA Presentatoin" 12 "AFFONDRA Presentatoin"

License

Licensed under the MIT.

About

P2P NFT trading market based on cosmos-sdk

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 50.9%
  • Vue 33.5%
  • JavaScript 11.8%
  • HTML 2.8%
  • Other 1.0%