Bonsai Exchange Dapp
This demonstrates the three important parts of a dapp and how they should be connected:
- The browser UI (ReactJS + Redux)
- SCORE (Python)
ICON Token Standard have used by app
- BonSai (IRC-3): Each Bonsai has id unique, name and price.
- Oxygen (IRC-2): Generate when user plant bonsai, use buy Bonsai.
Bonsai Exchange :
- Buy bonsai from stock
- Planting bonsai in the collection.
- After a certain period of time (30 second), each bonsai will photosynthesize some oxygen.
- Transfer bonsai to friend.
- The contract has the ability to update properties such as the life of a bonsai, which will display other forms of the bonsai such as sprouting, flowering, and fruiting.
- It is possible to resell the bonsai you have planted
How to play
If you are beginer, you would go a tour with app
You would be received 30 Oxygen to buy first Bonsai
Sign transaction with ICONex extension
Buy Oxygen by ICX
Transfer Bonsai To Friends
Move Position Of Bonsai
How to run project
Copy JSON file of keystore (download from wallet ICONex) to folder keystores
Deployment to local tbears instance
Deploy Bonsai Contract
tbears deploy bonsai -k keystores/keystore.json -c config/deploy_bonsai_local.json
Deploy SunCoin Contract
tbears deploy suncoin -k keystores/keystore.json -c config/deploy_oxygen_local.json
Check result transaction
tbears txresult [txHASH]
Copy the scoreAddress from the result
Deployment to testnet
Faucet ICX testnet
Deploy Bonsai Contract
tbears deploy bonsai -k keystores/keystore.json -c config/deploy_bonsai_testnet.json
Deploy Oxygen Contract
tbears deploy oxygen -k keystores/keystore.json -c config/deploy_oxygen_testnet.json
Update Bonsai contract
tbears deploy bonsai -m update -o [address contract] -k keystores/keystore2.json -c config/deploy_bonsai_testnet.json
tbears txresult <txhash> -c config/depoy_bonsai_testnet.json
Deploy Bonsai Score
docker-compose exec Icon tbears deploy bonsai -k keystores/keystore.json -c config/deploy_bonsai_testnet.json
Deploy Oxygen Score
docker-compose exec Icon tbears deploy oxygen -k keystores/keystore.json -c config/deploy_oxygen_testnet.json
Testnet tracker: https://bicon.tracker.solidwallet.io/ put the score address
cd ui cp .env.example .env yarn
Copy my info of wallet to
View in localhost:3000