https://bonsai-exchange.web.app
This demonstrates the three important parts of a dapp and how they should be connected:
- The browser UI (ReactJS + Redux)
- ICON SDK for JavaScript
- 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.
Future:
- 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
If you are beginer, you would go a tour with app
You would be received 30 Oxygen to buy first Bonsai
Let's buy
Sign transaction with ICONex extension
Tada !
Buy Oxygen by ICX
Transfer Bonsai To Friends
Move Position Of Bonsai
mkdir keystores
Copy JSON file of keystore (download from wallet ICONex) to folder keystores
tbears deploy bonsai -k keystores/keystore.json -c config/deploy_bonsai_local.json
tbears deploy suncoin -k keystores/keystore.json -c config/deploy_oxygen_local.json
tbears txresult [txHASH]
Copy the scoreAddress from the result
tbears deploy bonsai -k keystores/keystore.json -c config/deploy_bonsai_testnet.json
tbears deploy oxygen -k keystores/keystore.json -c config/deploy_oxygen_testnet.json
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
docker-compose up
docker-compose exec Icon tbears deploy bonsai -k keystores/keystore.json -c config/deploy_bonsai_testnet.json
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 .env
yarn start
View in localhost:3000